From d242f2d46206866ffa90c11478e7879e8ac3e9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 4 Aug 2026 10:23:13 +0200 Subject: [PATCH 1/4] Removed strictBooleans --- docs/update_and_migration/from_4.6/update_to_5.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 9217395f37..fbbd920a97 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -504,7 +504,6 @@ return RectorConfig::configure() naming: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-naming instanceOf: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-instanceof earlyReturn: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-early-return - strictBooleans: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-strict-booleans rectorPreset: true, symfonyCodeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-code-quality symfonyConfigs: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-configs From 761617edd4eb0d5a0d1fa5105a2a0c062017f363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 4 Aug 2026 10:23:20 +0200 Subject: [PATCH 2/4] Run SF 7.3, 7.4 rules --- .../back_office/images/src/SvgExtension.php | 16 ++-------------- rector.php | 2 ++ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/code_samples/back_office/images/src/SvgExtension.php b/code_samples/back_office/images/src/SvgExtension.php index de6826d22f..3f9891936f 100644 --- a/code_samples/back_office/images/src/SvgExtension.php +++ b/code_samples/back_office/images/src/SvgExtension.php @@ -5,10 +5,8 @@ namespace App\Twig; use Symfony\Component\Routing\RouterInterface; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; -class SvgExtension extends AbstractExtension +class SvgExtension { /** * SvgExtension constructor. @@ -17,17 +15,7 @@ public function __construct(protected RouterInterface $router) { } - /** - * @return \Twig\TwigFunction[] - */ - #[\Override] - public function getFunctions(): array - { - return [ - new TwigFunction('ibexa_svg_link', $this->generateLink(...)), - ]; - } - + #[\Twig\Attribute\AsTwigFunction(name: 'ibexa_svg_link')] public function generateLink(int $contentId, string $fieldIdentifier, string $filename): string { return $this->router->generate('app.svg_download', [ diff --git a/rector.php b/rector.php index 091043e174..fb17a9d1d8 100644 --- a/rector.php +++ b/rector.php @@ -25,4 +25,6 @@ SymfonySetList::SYMFONY_70, SymfonySetList::SYMFONY_71, SymfonySetList::SYMFONY_72, + SymfonySetList::SYMFONY_73, + SymfonySetList::SYMFONY_74, ]); From 0d136fb0ff0e4b004e543286b01ffccc11009477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 4 Aug 2026 10:34:32 +0200 Subject: [PATCH 3/4] Removed SensioLabSetList --- docs/update_and_migration/from_4.6/update_to_5.0.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index fbbd920a97..7d60180688 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -470,7 +470,6 @@ As this update spans across a broad range of versions, multiple rules can be con //… use Ibexa\Contracts\Rector\Sets\IbexaSetList; use Rector\Config\RectorConfig; -use Rector\Symfony\Set\SensiolabsSetList; use Rector\Symfony\Set\SymfonySetList; return RectorConfig::configure() @@ -489,7 +488,6 @@ return RectorConfig::configure() SymfonySetList::SYMFONY_72, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-72 SymfonySetList::SYMFONY_73, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-73 SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, - SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, ] ) ->withPhpSets() From 71158f38b637d3e26d9c451851ced5a3b27e2a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 4 Aug 2026 11:34:54 +0200 Subject: [PATCH 4/4] PHP-CS-Fixer --- code_samples/back_office/images/src/SvgExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code_samples/back_office/images/src/SvgExtension.php b/code_samples/back_office/images/src/SvgExtension.php index 3f9891936f..351661e476 100644 --- a/code_samples/back_office/images/src/SvgExtension.php +++ b/code_samples/back_office/images/src/SvgExtension.php @@ -5,6 +5,7 @@ namespace App\Twig; use Symfony\Component\Routing\RouterInterface; +use Twig\Attribute\AsTwigFunction; class SvgExtension { @@ -15,7 +16,7 @@ public function __construct(protected RouterInterface $router) { } - #[\Twig\Attribute\AsTwigFunction(name: 'ibexa_svg_link')] + #[AsTwigFunction(name: 'ibexa_svg_link')] public function generateLink(int $contentId, string $fieldIdentifier, string $filename): string { return $this->router->generate('app.svg_download', [