diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 8a222c3f6..998918612 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,8 +3,11 @@ $finder = (new PhpCsFixer\Finder()) ->name('*.php') ->in([ + __DIR__ . '/app', __DIR__ . '/db', - __DIR__ . '/sources/AppBundle', + __DIR__ . '/htdocs', + __DIR__ . '/sources', + __DIR__ . '/tests', ]) ; @@ -12,6 +15,7 @@ ->setRiskyAllowed(true) ->setRules([ '@PSR2' => true, + '@PHP74Migration:risky' => true, 'blank_line_after_opening_tag' => true, 'concat_space' => ['spacing' => 'one'], 'no_alias_functions' => true, diff --git a/app/AppCache.php b/app/AppCache.php index 639ec2cd7..185a6990b 100644 --- a/app/AppCache.php +++ b/app/AppCache.php @@ -1,5 +1,7 @@ getEnvironment(), ['dev', 'test'], true)) { - $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); - $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new DebugBundle(); + $bundles[] = new WebProfilerBundle(); } return $bundles; @@ -37,16 +53,16 @@ public function getRootDir() public function getCacheDir() { - return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); + return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); } public function getLogDir() { - return dirname(__DIR__).'/var/logs'; + return dirname(__DIR__) . '/var/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); } } diff --git a/app/Resources/views/admin/association/membership/register.html.twig b/app/Resources/views/admin/association/membership/register.html.twig index 4f9703f1f..94375c81f 100644 --- a/app/Resources/views/admin/association/membership/register.html.twig +++ b/app/Resources/views/admin/association/membership/register.html.twig @@ -4,7 +4,7 @@ {% block submenu %} {{ render(controller( - 'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction', + 'AppBundle\\Controller\\Website\\SecondaryMenuController::display', { 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ASSOCIATION') } )) }} {% endblock %} diff --git a/app/Resources/views/site/base.html.twig b/app/Resources/views/site/base.html.twig index 1d7facd2e..2bdadb03c 100644 --- a/app/Resources/views/site/base.html.twig +++ b/app/Resources/views/site/base.html.twig @@ -79,7 +79,7 @@
- {{ render(controller('AppBundle:Website\\Newsletter:subscribeForm')) }} + {{ render(controller('AppBundle\\Controller\\Website\\NewsletterController:subscribeForm')) }} Tous les trois mois, des nouvelles de L'AFUP