From b15ca4fdd9915a98f3833494ccdcd237dc191be3 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Wed, 7 Jan 2026 17:12:31 +0100 Subject: [PATCH 01/19] update php to 8.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bf110ae..14722c7 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "project", "license": "proprietary", "require": { - "php": "^8.4", + "php": "^8.5", "ext-ctype": "*", "ext-iconv": "*", "ext-sodium": "*", From 77a656b9167e2dc162652706cfc8c95ec97ca02d Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Wed, 7 Jan 2026 17:13:43 +0100 Subject: [PATCH 02/19] upgrade to symfony 8.0 --- composer.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 14722c7..19b4c1a 100644 --- a/composer.json +++ b/composer.json @@ -15,23 +15,23 @@ "sentry/sentry-symfony": "^5.1", "sumocoders/framework-core-bundle": "^16.0", "symfony/apache-pack": "^1.0.1", - "symfony/asset-mapper": "^7.3", - "symfony/debug-bundle": "^7.3", - "symfony/dotenv": "^7.3", - "symfony/expression-language": "^7.3", + "symfony/asset-mapper": "^8.0", + "symfony/debug-bundle": "^8.0", + "symfony/dotenv": "^8.0", + "symfony/expression-language": "^8.0", "symfony/flex": "^2.4", - "symfony/http-client": "^7.3", - "symfony/mailer": "^7.3", - "symfony/messenger": "^7.3", + "symfony/http-client": "^8.0", + "symfony/mailer": "^8.0", + "symfony/messenger": "^8.0", "symfony/monolog-bundle": "^3.10", - "symfony/rate-limiter": "^7.3", - "symfony/runtime": "^7.3", - "symfony/security-bundle": "^7.3", + "symfony/rate-limiter": "^8.0", + "symfony/runtime": "^8.0", + "symfony/security-bundle": "^8.0", "symfony/stimulus-bundle": "^2.22", "symfony/ux-turbo": "^2.22", - "symfony/validator": "^7.3", - "symfony/web-profiler-bundle": "^7.3", - "symfony/yaml": "^7.3", + "symfony/validator": "^8.0", + "symfony/web-profiler-bundle": "^8.0", + "symfony/yaml": "^8.0", "symfonycasts/sass-bundle": "^0.8", "twbs/bootstrap": "^5.3", "twbs/bootstrap-icons": "^1.13", @@ -49,7 +49,7 @@ "squizlabs/php_codesniffer": "^4.0", "symfony/debug-pack": "*", "symfony/maker-bundle": "*", - "symfony/stopwatch": "^7.3", + "symfony/stopwatch": "^8.0", "tijsverkoyen/deployer-sumo": "^4.1", "vincentlanglet/twig-cs-fixer": "*" }, From 34ea62bfd436939a1132a4e3da4ae5083a6865cb Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Wed, 7 Jan 2026 17:14:25 +0100 Subject: [PATCH 03/19] upgrade nelmio security bundle --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 19b4c1a..5e4c11c 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "symfonycasts/sass-bundle": "^0.8", "twbs/bootstrap": "^5.3", "twbs/bootstrap-icons": "^1.13", - "nelmio/security-bundle": "^3.5" + "nelmio/security-bundle": "^3.7" }, "require-dev": { }, From e77e20dd3efb221ade3c6cba87d2817e34221ded Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Wed, 7 Jan 2026 17:14:59 +0100 Subject: [PATCH 04/19] add dev branch for testing --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5e4c11c..d082cec 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "beberlei/doctrineextensions": "^1.5", "doctrine/doctrine-migrations-bundle": "^3.3", "sentry/sentry-symfony": "^5.1", - "sumocoders/framework-core-bundle": "^16.0", + "sumocoders/framework-core-bundle": "dev-ilariaorlando-symfony-80", "symfony/apache-pack": "^1.0.1", "symfony/asset-mapper": "^8.0", "symfony/debug-bundle": "^8.0", From 3b5a85043d2b8a2286d5e5117f7f1ef8eeeae961 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 08:59:21 +0100 Subject: [PATCH 05/19] upgrade doctrine fixtures bundle to be compatible with symfony 8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d082cec..a276e5a 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ }, "flex-require-dev": { "dama/doctrine-test-bundle": "^8.3", - "doctrine/doctrine-fixtures-bundle": "^3.7", + "doctrine/doctrine-fixtures-bundle": "^4.3", "micheh/phpcs-gitlab": "^2.0", "phpstan/phpstan-symfony": "^2.0", "phpstan/phpstan-doctrine": "^2.0", From b39852004ca86f350db080ea92299c3faddefdee Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 09:46:31 +0100 Subject: [PATCH 06/19] upgrade deployer-sumo to be compatible with symfony 8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a276e5a..c66626f 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "symfony/debug-pack": "*", "symfony/maker-bundle": "*", "symfony/stopwatch": "^8.0", - "tijsverkoyen/deployer-sumo": "^4.1", + "tijsverkoyen/deployer-sumo": "^4.3", "vincentlanglet/twig-cs-fixer": "*" }, "config": { From a14312d72d9cd144f44d4afd7f86b4d87ffec9a6 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 10:11:06 +0100 Subject: [PATCH 07/19] fix reconfigureAnnotations method so it works with new symfony routes.yaml structure --- src/Skeleton/PostCreateProject.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index a7e47f5..ed1161d 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -180,12 +180,12 @@ private static function reconfigureAnnotations(Event $event): void $io->notice('→ Reconfigure annotations'); $content = file_get_contents($projectDir . '/config/routes.yaml'); $matches = []; - preg_match('|controllers:.*attribute|smU', $content, $matches, PREG_OFFSET_CAPTURE); - $offset = $matches[0][1] + mb_strlen($matches[0][0]); + preg_match('|controllers:\s*.*type:\s*attribute|smU', $content, $matches, PREG_OFFSET_CAPTURE); $offset = $matches[0][1] + mb_strlen($matches[0][0]); + $offset = $matches[0][1] + strlen($matches[0][0]); $insert = [ ' prefix: /{_locale}', ' requirements:', - ' _locale: \'%locales_regex%\'', + ' _locale: \'%locales_regex%\'', ' trailing_slash_on_root: false', ]; $content = self::insertStringAtPosition( From 11b33e31bb05d89848a5686a948c16e246d4fb13 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 10:55:01 +0100 Subject: [PATCH 08/19] fix reconfigureAnnotations method so it works with new symfony routes.yaml structure --- src/Skeleton/PostCreateProject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index ed1161d..9322856 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -180,7 +180,7 @@ private static function reconfigureAnnotations(Event $event): void $io->notice('→ Reconfigure annotations'); $content = file_get_contents($projectDir . '/config/routes.yaml'); $matches = []; - preg_match('|controllers:\s*.*type:\s*attribute|smU', $content, $matches, PREG_OFFSET_CAPTURE); $offset = $matches[0][1] + mb_strlen($matches[0][0]); + preg_match('|controllers:\s*\n\s*resource:.*|', $content, $matches, PREG_OFFSET_CAPTURE); $offset = $matches[0][1] + strlen($matches[0][0]); $insert = [ ' prefix: /{_locale}', From 3c6239be7d8937f92ba20aef48312b4a8e1f85bb Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 11:01:31 +0100 Subject: [PATCH 09/19] upgrade to php version 8.5 --- .gitlab-ci.yml | 26 +++++++++++++------------- .php-version | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b077f4..258f44e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ cache: &global_cache # Build section Install dependencies and build assets: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - COMPOSER_MEMORY_LIMIT=-1 composer install --no-scripts --no-progress - COMPOSER_MEMORY_LIMIT=-1 composer run-script post-autoload-dump @@ -35,7 +35,7 @@ Install dependencies and build assets: # Code Quality section PHP_CodeSniffer - check code styling: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - php vendor/bin/phpcs --colors --report-full --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-report.json artifacts: @@ -48,7 +48,7 @@ PHP_CodeSniffer - check code styling: - docker PHPStan - check for bugs: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest before_script: - php bin/console cache:warmup --env=dev script: @@ -69,7 +69,7 @@ PHPStan - check for bugs: - docker Twig-CS-Fixer - check code styling: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - php vendor/bin/twig-cs-fixer lint templates/ --report=junit > twigcs-report.xml after_script: @@ -124,7 +124,7 @@ StandardJS - check code styling: # Dependency Scanning section NPM packages - check for vulnerabilities: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - php bin/console importmap:audit --no-interaction --ansi stage: dependency scanning @@ -134,7 +134,7 @@ NPM packages - check for vulnerabilities: allow_failure: true PHP packages - composer audit: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - composer audit --ansi --no-interaction stage: dependency scanning @@ -146,7 +146,7 @@ PHP packages - composer audit: # Outdated packages Scanning section NPM packages - check for outdated packages: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - php bin/console importmap:outdated --no-interaction --ansi stage: outdated packages @@ -156,7 +156,7 @@ NPM packages - check for outdated packages: allow_failure: true PHP packages - composer outdated: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - composer outdated --ansi --no-interaction --strict stage: outdated packages @@ -168,7 +168,7 @@ PHP packages - composer outdated: # Test section PHPUnit - Run tests: - image: sumocoders/framework-php84:latest + image: sumocoders/framework-php85:latest services: - mysql:8.0 before_script: @@ -203,7 +203,7 @@ PHPUnit - Run tests: # Scheduled tasks section Task - Update dependencies: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest script: - git config --global user.email "bot@sumocoders.be" - git config --global user.name "Sumo Bot" @@ -220,7 +220,7 @@ Task - Update dependencies: # Deploy section Deploy - to staging: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest before_script: # Add the private SSH key to the CI environment - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' @@ -234,7 +234,7 @@ Deploy - to staging: - php vendor/bin/dep deploy stage=staging environment: name: staging - url: https://$project.$client.php84.sumocoders.eu + url: https://$project.$client.php85.sumocoders.eu only: - staging stage: deploy @@ -244,7 +244,7 @@ Deploy - to staging: USER: "CI/CD gitlab-runner" Deploy - to production: - image: sumocoders/cli-tools-php84:latest + image: sumocoders/cli-tools-php85:latest before_script: # Add the private SSH key to the CI environment - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' diff --git a/.php-version b/.php-version index c9dc049..188c409 100644 --- a/.php-version +++ b/.php-version @@ -1 +1 @@ -8.4 +8.5 From ed3b8cb4dc810c387a8da1e86f61d0cd2eefaf62 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 11:46:24 +0100 Subject: [PATCH 10/19] add controller resource path back in routes.yaml --- src/Skeleton/PostCreateProject.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 9322856..cf464f1 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -178,10 +178,19 @@ private static function reconfigureAnnotations(Event $event): void $projectDir = realpath($event->getComposer()->getConfig()->get('vendor-dir') . '/..'); $io->notice('→ Reconfigure annotations'); - $content = file_get_contents($projectDir . '/config/routes.yaml'); - $matches = []; - preg_match('|controllers:\s*\n\s*resource:.*|', $content, $matches, PREG_OFFSET_CAPTURE); - $offset = $matches[0][1] + strlen($matches[0][0]); + $routesFile = $projectDir . '/config/routes.yaml'; + $content = file_get_contents($routesFile); + + $replacement = implode(PHP_EOL, [ + ' resource:', + ' path: ../src/Controller/', + ' namespace: App\Controller', + ' type: attribute', + ]); + $content = str_replace('resource: routing.controllers', $replacement, $content); + + $offset = strpos($content, 'type: attribute') + strlen('type: attribute'); + $insert = [ ' prefix: /{_locale}', ' requirements:', @@ -193,7 +202,8 @@ private static function reconfigureAnnotations(Event $event): void $offset, PHP_EOL . implode(PHP_EOL, $insert) ); - file_put_contents($projectDir . '/config/routes.yaml', $content); + + file_put_contents($routesFile, $content); } private static function reconfigureRouting(Event $event): void From 147139c184feae39e258330bc92a54b321dcc499 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 11:53:24 +0100 Subject: [PATCH 11/19] remove commented lines i routes.yaml, add resource at correct indent --- src/Skeleton/PostCreateProject.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index cf464f1..0c76d5c 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -191,17 +191,19 @@ private static function reconfigureAnnotations(Event $event): void $offset = strpos($content, 'type: attribute') + strlen('type: attribute'); - $insert = [ + $insert = implode(PHP_EOL, [ ' prefix: /{_locale}', ' requirements:', ' _locale: \'%locales_regex%\'', ' trailing_slash_on_root: false', - ]; - $content = self::insertStringAtPosition( - $content, - $offset, - PHP_EOL . implode(PHP_EOL, $insert) - ); + ]); + $content = self::insertStringAtPosition($content, $offset, PHP_EOL . $insert); + + $lines = explode(PHP_EOL, $content); + if (count($lines) > 9) { + $lines = array_slice($lines, 9); + } + $content = implode(PHP_EOL, $lines); file_put_contents($routesFile, $content); } From 4aa359614d3fb4c2f62be01d241d927e3e109a6f Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:00:35 +0100 Subject: [PATCH 12/19] fix indents for routes.yaml --- src/Skeleton/PostCreateProject.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 0c76d5c..a5c4945 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -182,20 +182,20 @@ private static function reconfigureAnnotations(Event $event): void $content = file_get_contents($routesFile); $replacement = implode(PHP_EOL, [ - ' resource:', - ' path: ../src/Controller/', - ' namespace: App\Controller', - ' type: attribute', + ' resource:', + ' path: ../src/Controller/', + ' namespace: App\Controller', + ' type: attribute', ]); $content = str_replace('resource: routing.controllers', $replacement, $content); $offset = strpos($content, 'type: attribute') + strlen('type: attribute'); $insert = implode(PHP_EOL, [ - ' prefix: /{_locale}', - ' requirements:', - ' _locale: \'%locales_regex%\'', - ' trailing_slash_on_root: false', + ' prefix: /{_locale}', // 2 spaces → aligns with resource/type + ' requirements:', + ' _locale: \'%locales_regex%\'', + ' trailing_slash_on_root: false', ]); $content = self::insertStringAtPosition($content, $offset, PHP_EOL . $insert); From 8f0311c66b95959754d66e39bd54929b13c0696d Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:07:22 +0100 Subject: [PATCH 13/19] Just replace block completely instead of 2 seperate blocks so indents are correct --- src/Skeleton/PostCreateProject.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index a5c4945..8a98570 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -186,18 +186,12 @@ private static function reconfigureAnnotations(Event $event): void ' path: ../src/Controller/', ' namespace: App\Controller', ' type: attribute', - ]); - $content = str_replace('resource: routing.controllers', $replacement, $content); - - $offset = strpos($content, 'type: attribute') + strlen('type: attribute'); - - $insert = implode(PHP_EOL, [ - ' prefix: /{_locale}', // 2 spaces → aligns with resource/type + ' prefix: /{_locale}', ' requirements:', ' _locale: \'%locales_regex%\'', ' trailing_slash_on_root: false', ]); - $content = self::insertStringAtPosition($content, $offset, PHP_EOL . $insert); + $content = str_replace('resource: routing.controllers', $replacement, $content); $lines = explode(PHP_EOL, $content); if (count($lines) > 9) { From 51accdf711c9ad786fe6165980cd7119027f84d2 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:15:34 +0100 Subject: [PATCH 14/19] Use different way to reconfigure routes.yaml so the indents are not messed up --- src/Skeleton/PostCreateProject.php | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 8a98570..95594d6 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -179,27 +179,23 @@ private static function reconfigureAnnotations(Event $event): void $io->notice('→ Reconfigure annotations'); $routesFile = $projectDir . '/config/routes.yaml'; - $content = file_get_contents($routesFile); - - $replacement = implode(PHP_EOL, [ - ' resource:', - ' path: ../src/Controller/', - ' namespace: App\Controller', - ' type: attribute', - ' prefix: /{_locale}', - ' requirements:', - ' _locale: \'%locales_regex%\'', - ' trailing_slash_on_root: false', - ]); - $content = str_replace('resource: routing.controllers', $replacement, $content); - - $lines = explode(PHP_EOL, $content); + $lines = file($routesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (count($lines) > 9) { $lines = array_slice($lines, 9); } - $content = implode(PHP_EOL, $lines); - file_put_contents($routesFile, $content); + $lines[] = 'controllers:'; + $lines[] = ' resource:'; + $lines[] = ' path: ../src/Controller/'; + $lines[] = ' namespace: App\Controller'; + $lines[] = ' type: attribute'; + $lines[] = ' prefix: /{_locale}'; + $lines[] = ' requirements:'; + $lines[] = ' _locale: \'%locales_regex%\''; + $lines[] = ' trailing_slash_on_root: false'; + + file_put_contents($routesFile, implode(PHP_EOL, $lines)); } private static function reconfigureRouting(Event $event): void From 471c1347f0a11e6f20e156cc57aa0ded9911b98e Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:23:23 +0100 Subject: [PATCH 15/19] just rebuild routes.yaml entirely --- src/Skeleton/PostCreateProject.php | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 95594d6..e071ecc 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -179,23 +179,20 @@ private static function reconfigureAnnotations(Event $event): void $io->notice('→ Reconfigure annotations'); $routesFile = $projectDir . '/config/routes.yaml'; - $lines = file($routesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (count($lines) > 9) { - $lines = array_slice($lines, 9); - } - - $lines[] = 'controllers:'; - $lines[] = ' resource:'; - $lines[] = ' path: ../src/Controller/'; - $lines[] = ' namespace: App\Controller'; - $lines[] = ' type: attribute'; - $lines[] = ' prefix: /{_locale}'; - $lines[] = ' requirements:'; - $lines[] = ' _locale: \'%locales_regex%\''; - $lines[] = ' trailing_slash_on_root: false'; - - file_put_contents($routesFile, implode(PHP_EOL, $lines)); + $content = implode(PHP_EOL, [ + 'controllers:', + ' resource:', + ' path: ../src/Controller/', + ' namespace: App\Controller', + ' type: attribute', + ' prefix: /{_locale}', + ' requirements:', + ' _locale: \'%locales_regex%\'', + ' trailing_slash_on_root: false', + ]); + + file_put_contents($routesFile, $content); } private static function reconfigureRouting(Event $event): void From 9af35c56989070f38c7324a8bbe4cc743ef7a87b Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:47:33 +0100 Subject: [PATCH 16/19] add email_validation_mode in validator.yaml instead of replacing --- src/Skeleton/PostCreateProject.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index e071ecc..8988aa3 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -300,13 +300,18 @@ private static function reconfigureValidator(Event $event): void $projectDir = realpath($event->getComposer()->getConfig()->get('vendor-dir') . '/..'); $io->notice('→ Reconfigure validator'); - $content = file_get_contents($projectDir . '/config/packages/validator.yaml'); - $content = preg_replace( - '/email_validation_mode: .+/', - 'email_validation_mode: strict', - $content - ); - file_put_contents($projectDir . '/config/packages/validator.yaml', $content); + $file = $projectDir . '/config/packages/validator.yaml'; + $lines = file($file, FILE_IGNORE_NEW_LINES); + + $newLines = []; + foreach ($lines as $line) { + $newLines[] = $line; + if (preg_match('/^\s*validation:/', $line)) { + $newLines[] = ' email_validation_mode: strict'; + } + } + + file_put_contents($file, implode(PHP_EOL, $newLines)); } private static function reconfigureMonolog(Event $event): void From 46ec30d7b29da58ff024092239a140c3a88a1b2f Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 12:55:11 +0100 Subject: [PATCH 17/19] only add email_validation_mode once --- src/Skeleton/PostCreateProject.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 8988aa3..3636a5b 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -304,10 +304,14 @@ private static function reconfigureValidator(Event $event): void $lines = file($file, FILE_IGNORE_NEW_LINES); $newLines = []; + $added = false; + foreach ($lines as $line) { $newLines[] = $line; - if (preg_match('/^\s*validation:/', $line)) { - $newLines[] = ' email_validation_mode: strict'; + + if (!$added && preg_match('/^\s*validation:/', $line)) { + $newLines[] = ' email_validation_mode: strict'; + $added = true; } } From f9c4548f38fa1fecd1020adba9cff827a6db4860 Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 14:02:44 +0100 Subject: [PATCH 18/19] update framework-core-bundle to v17.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c66626f..cb1294c 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "beberlei/doctrineextensions": "^1.5", "doctrine/doctrine-migrations-bundle": "^3.3", "sentry/sentry-symfony": "^5.1", - "sumocoders/framework-core-bundle": "dev-ilariaorlando-symfony-80", + "sumocoders/framework-core-bundle": "^17.0", "symfony/apache-pack": "^1.0.1", "symfony/asset-mapper": "^8.0", "symfony/debug-bundle": "^8.0", From 8452ef61f7390e89ed9bff07a33d0265a56c7bdb Mon Sep 17 00:00:00 2001 From: Ilaria Orlando Date: Thu, 8 Jan 2026 14:58:40 +0100 Subject: [PATCH 19/19] update deploy and github workflow to php 8.5 --- .github/workflows/php.yml | 2 +- deploy.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f030d26..82d6b15 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: php-version: - - "8.4" + - "8.5" steps: - name: "Install PHP" diff --git a/deploy.php b/deploy.php index 001ec84..61496eb 100644 --- a/deploy.php +++ b/deploy.php @@ -12,7 +12,7 @@ set('repository', '$repository'); set('production_url', '$productionUrl'); set('production_user', '$productionUser'); -set('php_version', '8.4'); +set('php_version', '8.5'); // Define staging host('dev03.sumocoders.eu')