From 94ba6a2412e3b27466a1be9820e23e9568408ee3 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:38:15 +0100 Subject: [PATCH 01/12] chore: update doctrine/deprecations recipe --- symfony.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symfony.lock b/symfony.lock index f948f8f..c243016 100644 --- a/symfony.lock +++ b/symfony.lock @@ -19,7 +19,7 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "1.0", - "ref": "87424683adc81d7dc305eefec1fced883084aab9" + "ref": "fdd756167454623e21f1d769c5b814b243782a67" } }, "friendsofphp/php-cs-fixer": { From f6f42ab4d50ddbf793250da5ac669640b519316b Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:38:30 +0100 Subject: [PATCH 02/12] chore: update friendsofphp/php-cs-fixer recipe Keep the ITK Dev .php-cs-fixer.dist.php. It already excludes config/reference.php, which is the only change in the recipe. --- symfony.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/symfony.lock b/symfony.lock index c243016..7c7973b 100644 --- a/symfony.lock +++ b/symfony.lock @@ -23,12 +23,12 @@ } }, "friendsofphp/php-cs-fixer": { - "version": "3.40", + "version": "3.95", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "3.0", - "ref": "be2103eb4a20942e28a6dd87736669b757132435" + "version": "3.39", + "ref": "97aaf9026490db73b86c23d49e5774bc89d2b232" }, "files": [ ".php-cs-fixer.dist.php" From 6293e9cbcbc70500ed29808c60e889907e77a598 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:38:38 +0100 Subject: [PATCH 03/12] chore: update phpunit/phpunit recipe --- bin/phpunit | 21 +-------------------- symfony.lock | 8 ++++---- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/bin/phpunit b/bin/phpunit index 692bacc..ac5eef1 100755 --- a/bin/phpunit +++ b/bin/phpunit @@ -1,23 +1,4 @@ #!/usr/bin/env php = 80000) { - require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; - } else { - define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); - require PHPUNIT_COMPOSER_INSTALL; - PHPUnit\TextUI\Command::main(); - } -} else { - if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { - echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; - exit(1); - } - - require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; -} +require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; diff --git a/symfony.lock b/symfony.lock index 7c7973b..079be04 100644 --- a/symfony.lock +++ b/symfony.lock @@ -71,18 +71,18 @@ ] }, "phpunit/phpunit": { - "version": "12.3", + "version": "13.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "11.1", - "ref": "c6658a60fc9d594805370eacdf542c3d6b5c0869" + "ref": "ca0bc067abfb40a8de1b2561b96cbfc2b833c314" }, "files": [ ".env.test", + "bin/phpunit", "phpunit.dist.xml", - "tests/bootstrap.php", - "bin/phpunit" + "tests/bootstrap.php" ] }, "symfony/console": { From 1c67c4ac777367ae301edce49fa0357f15addaa3 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:39:09 +0100 Subject: [PATCH 04/12] chore: update symfony/framework-bundle recipe --- .env | 1 + config/preload.php | 4 ++-- config/services.yaml | 3 +++ public/index.php | 2 +- symfony.lock | 6 +++--- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 61dd506..bea2c3f 100644 --- a/.env +++ b/.env @@ -21,6 +21,7 @@ ITKDEV_TEMPLATE=symfony-6 ###> symfony/framework-bundle ### APP_ENV=dev APP_SECRET= +APP_SHARE_DIR=var/share ###< symfony/framework-bundle ### ###> app ### diff --git a/config/preload.php b/config/preload.php index 5ebcdb2..14cee66 100644 --- a/config/preload.php +++ b/config/preload.php @@ -1,5 +1,5 @@ Date: Sun, 8 Nov 2026 21:40:31 +0100 Subject: [PATCH 05/12] chore: update symfony/routing recipe debug:router output is unchanged. --- .env | 6 ++++++ config/packages/routing.yaml | 2 +- config/routes.yaml | 14 ++++++++++---- symfony.lock | 6 +++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.env b/.env index bea2c3f..8c6d091 100644 --- a/.env +++ b/.env @@ -54,3 +54,9 @@ INDEX_ORGANIZATION_ALIAS=organization ###> nelmio/cors-bundle ### CORS_ALLOW_ORIGIN='*' ###< nelmio/cors-bundle ### + +###> symfony/routing ### +# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. +# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands +DEFAULT_URI=http://localhost +###< symfony/routing ### diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml index 8166181..0f34f87 100644 --- a/config/packages/routing.yaml +++ b/config/packages/routing.yaml @@ -2,7 +2,7 @@ framework: router: # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands - #default_uri: http://localhost + default_uri: '%env(DEFAULT_URI)%' when@prod: framework: diff --git a/config/routes.yaml b/config/routes.yaml index 41ef814..cef258c 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,5 +1,11 @@ +# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json + +# This file is the entry point to configure the routes of your app. +# Methods with the #[Route] attribute are automatically imported. +# See also https://symfony.com/doc/current/routing.html + +# To list all registered routes, run the following command: +# bin/console debug:router + controllers: - resource: - path: ../src/Controller/ - namespace: App\Controller - type: attribute + resource: routing.controllers diff --git a/symfony.lock b/symfony.lock index 3dbe74e..e5f7cef 100644 --- a/symfony.lock +++ b/symfony.lock @@ -152,12 +152,12 @@ ] }, "symfony/routing": { - "version": "7.3", + "version": "7.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "7.0", - "ref": "21b72649d5622d8f7da329ffb5afb232a023619d" + "version": "7.4", + "ref": "bc94c4fd86f393f3ab3947c18b830ea343e51ded" }, "files": [ "config/packages/routing.yaml", From 0b0cb7655c4f1c5a675df5ce23aace5e6854b5ab Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:40:49 +0100 Subject: [PATCH 06/12] chore: update symfony/security-bundle recipe Keep the project api_user_provider. --- config/packages/security.yaml | 15 +++++++-------- symfony.lock | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 0d1e5f5..282cc70 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -2,6 +2,7 @@ security: # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords password_hashers: Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' + # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider providers: users_in_memory: { memory: null } @@ -9,7 +10,8 @@ security: id: App\Security\ApiUserProvider firewalls: dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ + # Ensure dev tools and static assets are always allowed + pattern: ^/(_profiler(/|$)|(_wdt|assets|build)/) security: false main: stateless: true @@ -17,14 +19,13 @@ security: - App\Security\ApiKeyAuthenticator provider: api_user_provider - # activate different ways to authenticate + # Activate different ways to authenticate: # https://symfony.com/doc/current/security.html#the-firewall # https://symfony.com/doc/current/security/impersonating_user.html # switch_user: true - # Easy way to control access for large sections of your site - # Note: Only the *first* access control that matches will be used + # Note: Only the *first* matching rule is applied access_control: - { path: ^/api/v2/docs, roles: PUBLIC_ACCESS } - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } @@ -33,10 +34,8 @@ security: when@test: security: password_hashers: - # By default, password hashers are resource intensive and take time. This is - # important to generate secure password hashes. In tests however, secure hashes - # are not important, waste resources and increase test times. The following - # reduces the work factor to the lowest possible values. + # Password hashers are resource-intensive by design to ensure security. + # In tests, it's safe to reduce their cost to improve performance. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: algorithm: auto cost: 4 # Lowest possible value for bcrypt diff --git a/symfony.lock b/symfony.lock index e5f7cef..4f655f7 100644 --- a/symfony.lock +++ b/symfony.lock @@ -165,12 +165,12 @@ ] }, "symfony/security-bundle": { - "version": "6.4", + "version": "7.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "6.4", - "ref": "2ae08430db28c8eb4476605894296c82a642028f" + "version": "7.4", + "ref": "02d47835088cd548c827e5d53b3c4b361bca3390" }, "files": [ "config/packages/security.yaml", From 028bab44fd9d769ab0f1c23936d5616c2772998e Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:40:59 +0100 Subject: [PATCH 07/12] chore: update symfony/twig-bundle recipe Do not add the FrankenPHP hot-reload block to templates/base.html.twig. The project uses php-fpm. --- symfony.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony.lock b/symfony.lock index 4f655f7..3faab85 100644 --- a/symfony.lock +++ b/symfony.lock @@ -178,12 +178,12 @@ ] }, "symfony/twig-bundle": { - "version": "6.4", + "version": "7.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "6.4", - "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" + "ref": "06dacf16872358cb1f2494e089070ff2d045233a" }, "files": [ "config/packages/twig.yaml", From 1fe091b5461ce4e8c9468fcea50773e9a72ec202 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:41:10 +0100 Subject: [PATCH 08/12] chore: update vincentlanglet/twig-cs-fixer recipe --- .gitignore | 1 + symfony.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 82d4029..fcb71d2 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ ###< symfony/phpunit-bridge ### ###> vincentlanglet/twig-cs-fixer ### +/.twig-cs-fixer.php /.twig-cs-fixer.cache ###< vincentlanglet/twig-cs-fixer ### diff --git a/symfony.lock b/symfony.lock index 3faab85..7100066 100644 --- a/symfony.lock +++ b/symfony.lock @@ -216,12 +216,12 @@ ] }, "vincentlanglet/twig-cs-fixer": { - "version": "3.7", + "version": "4.1", "recipe": { "repo": "github.com/symfony/recipes-contrib", "branch": "main", "version": "3.0", - "ref": "d42582ae1bce86fd43491d6264c738b0867f8ffe" + "ref": "0a2d420aa6554f632804a3f21624e16314fe8588" } } } From a3fc854e4a9bc33bc44cac4ba37d9644a78838e0 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:42:05 +0100 Subject: [PATCH 09/12] fix: use long ternary in config/preload.php PHPStan strict rules do not allow the short ternary from the framework-bundle recipe. --- config/preload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/preload.php b/config/preload.php index 14cee66..bb358ef 100644 --- a/config/preload.php +++ b/config/preload.php @@ -1,5 +1,6 @@ Date: Sun, 8 Nov 2026 21:43:57 +0100 Subject: [PATCH 10/12] docs: add CHANGELOG entry for recipe updates --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6d6b7..ec652bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [PR-XX](https://github.com/itk-dev/event-database-api/pull/XX) + Update Symfony Flex recipes - [PR-76](https://github.com/itk-dev/event-database-api/pull/76) Update API Platform to 4.4 (OpenAPI 3.2.0, no `charset` in the `application/ld+json` content type) - [PR-75](https://github.com/itk-dev/event-database-api/pull/75) From 848251d6d9ed01fc396caf1ce23978894de3c5e8 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:44:19 +0100 Subject: [PATCH 11/12] docs: set PR number in CHANGELOG entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec652bc..4a4c7ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] -- [PR-XX](https://github.com/itk-dev/event-database-api/pull/XX) +- [PR-77](https://github.com/itk-dev/event-database-api/pull/77) Update Symfony Flex recipes - [PR-76](https://github.com/itk-dev/event-database-api/pull/76) Update API Platform to 4.4 (OpenAPI 3.2.0, no `charset` in the `application/ld+json` content type) From c55c96a3b08a433fba54395fe1248a7432173d89 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Sun, 8 Nov 2026 21:46:58 +0100 Subject: [PATCH 12/12] chore: use COMPOSE_DOMAIN for DEFAULT_URI Use the same pattern as APP_PROJECT_URI. --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 8c6d091..77e9740 100644 --- a/.env +++ b/.env @@ -58,5 +58,5 @@ CORS_ALLOW_ORIGIN='*' ###> symfony/routing ### # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands -DEFAULT_URI=http://localhost +DEFAULT_URI=https://${COMPOSE_DOMAIN} ###< symfony/routing ###