remove some deprecations

This commit is contained in:
Julien Fastré 2023-12-13 16:06:44 +01:00
parent 47c3be6217
commit 912f7d3211
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
7 changed files with 11 additions and 9 deletions

View File

@ -31,7 +31,7 @@ class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberIn
public function onKernelTerminate(TerminateEvent $event): void public function onKernelTerminate(TerminateEvent $event): void
{ {
if ($event->isMasterRequest()) { if ($event->isMainRequest()) {
$this->persistNotifications(); $this->persistNotifications();
} }
} }

View File

@ -31,7 +31,7 @@
{{ render(controller('Chill\\MainBundle\\Controller\\UIController::showNotificationUserCounterAction')) }} {{ render(controller('Chill\\MainBundle\\Controller\\UIController::showNotificationUserCounterAction')) }}
</b> </b>
{% if is_granted('ROLE_PREVIOUS_ADMIN') %} {% if is_granted('IS_IMPERSONATOR') %}
<i class="fa fa-wrench fa-lg" title="Impersonate mode"></i> <i class="fa fa-wrench fa-lg" title="Impersonate mode"></i>
{% endif %} {% endif %}
@ -39,7 +39,7 @@
<div class="dropdown-menu dropdown-menu-end dropdown-menu-dark" aria-labelledby="menu-user"> <div class="dropdown-menu dropdown-menu-end dropdown-menu-dark" aria-labelledby="menu-user">
{% for menu in menus %} {% for menu in menus %}
{% if is_granted('ROLE_PREVIOUS_ADMIN') and menu.name == 'Logout' %} {% if is_granted('IS_IMPERSONATOR') and menu.name == 'Logout' %}
<a class="dropdown-item list-group-item bg-dark text-white" <a class="dropdown-item list-group-item bg-dark text-white"
href="{{ path('chill_crud_admin_user_index', {'_switch_user': '_exit'}) }}"> href="{{ path('chill_crud_admin_user_index', {'_switch_user': '_exit'}) }}">
{{ 'Exit impersonation'|trans }} {{ 'Exit impersonation'|trans }}

View File

@ -36,7 +36,7 @@ final class PersistNotificationOnTerminateEventSubscriberTest extends TestCase
$em->persist(Argument::type(Notification::class))->shouldBeCalledTimes(1); $em->persist(Argument::type(Notification::class))->shouldBeCalledTimes(1);
$em->flush()->shouldBeCalledTimes(1); $em->flush()->shouldBeCalledTimes(1);
$event = $this->prophesize(TerminateEvent::class); $event = $this->prophesize(TerminateEvent::class);
$event->isMasterRequest()->willReturn(true); $event->isMainRequest()->willReturn(true);
$eventSubscriber = new PersistNotificationOnTerminateEventSubscriber($em->reveal(), $persister); $eventSubscriber = new PersistNotificationOnTerminateEventSubscriber($em->reveal(), $persister);

View File

@ -112,7 +112,7 @@ final class PersonControllerUpdateTest extends WebTestCase
/** /**
* Test the edit page are accessible. * Test the edit page are accessible.
* *
* @dataProvider providePerson * * @dataProvider providePerson
*/ */
public function testEditPageIsSuccessful(int $personId) public function testEditPageIsSuccessful(int $personId)
{ {

View File

@ -38,7 +38,9 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest extends Abstract
public function getFormData() public function getFormData()
{ {
return []; return [
[],
];
} }
public function getModifiersCombination() public function getModifiersCombination()