Skip to content

chore: update Symfony Flex recipes - #77

Merged
turegjorup merged 12 commits into
developfrom
feature/symfony-recipes
Nov 8, 2026
Merged

turegjorup merged 12 commits into
developfrom
feature/symfony-recipes

Conversation

@turegjorup

@turegjorup turegjorup commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Update the 8 outdated Symfony Flex recipes, one commit for each recipe. This is step 7 of the quarterly update.

Changes

  • doctrine/deprecations: only the recipe reference in symfony.lock.
  • friendsofphp/php-cs-fixer: only the recipe reference. Keep the ITK Dev .php-cs-fixer.dist.php. It already excludes config/reference.php, which is the only change in the recipe.
  • phpunit/phpunit: simplify bin/phpunit. The date.timezone default is removed. PHP 8 uses UTC when no time zone is set. phpunit.dist.xml does not change.
  • symfony/framework-bundle:
    • Add APP_SHARE_DIR=var/share to .env (the Symfony 7.4 share directory).
    • config/preload.php loads all var/cache/prod/*.preload.php files.
    • config/services.yaml: comments and a schema line only.
    • public/index.php: static closure.
  • symfony/routing:
    • default_uri comes from the new DEFAULT_URI variable. Before, it was a comment. This affects only URLs that CLI commands generate. In .env, DEFAULT_URI=https://${COMPOSE_DOMAIN}, the same pattern as APP_PROJECT_URI, instead of the recipe default http://localhost.
    • config/routes.yaml loads the controllers with the routing.controllers resource (Symfony 7.4).
  • symfony/security-bundle: keep the project api_user_provider. The dev firewall pattern changes to ^/(_profiler(/|$)|(_wdt|assets|build)/). The other changes are comments.
  • symfony/twig-bundle: only the recipe reference. Do not add the FrankenPHP hot-reload block to templates/base.html.twig, because the project uses php-fpm.
  • vincentlanglet/twig-cs-fixer: ignore a local /.twig-cs-fixer.php in .gitignore.
  • Change the short ternary in config/preload.php to a long ternary, because PHPStan strict rules do not allow it.

Why

The quarterly update keeps the recipes current. composer recipes --outdated now reports no outdated recipes.

The routes and the services must not change:

  • bin/console debug:router: the output is the same before and after.
  • bin/console debug:container --env=prod: only 2 internal .security.request_matcher.* IDs change. Their names are hashes of the firewall pattern, and the dev firewall pattern changed.
  • bin/console lint:container: no errors.

Checks

  • PHPStan: no errors. Rector dry-run: no changes.
  • PHP-CS-Fixer and Prettier (YAML in config/): no changes.
  • PHPUnit with coverage on PHP 8.5.12: all tests pass.

After the deploy

  • .env has new defaults for APP_SHARE_DIR and DEFAULT_URI. DEFAULT_URI uses COMPOSE_DOMAIN, the same as APP_PROJECT_URI. The server .env.local does not need a change if APP_PROJECT_URI is already correct there.

Keep the ITK Dev .php-cs-fixer.dist.php. It already excludes config/reference.php, which is the only change in the recipe.
debug:router output is unchanged.
Keep the project api_user_provider.
Do not add the FrankenPHP hot-reload block to templates/base.html.twig. The project uses php-fpm.
PHPStan strict rules do not allow the short ternary from the framework-bundle recipe.
@turegjorup turegjorup self-assigned this Nov 8, 2026
@codecov-commenter

codecov-commenter commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.39%. Comparing base (7136c17) to head (c55c96a).
⚠️ Report is 24 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #77   +/-   ##
==========================================
  Coverage      74.39%   74.39%           
  Complexity       264      264           
==========================================
  Files             30       30           
  Lines            738      738           
==========================================
  Hits             549      549           
  Misses           189      189           
Flag Coverage Δ
unittests 74.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Use the same pattern as APP_PROJECT_URI.
@turegjorup
turegjorup merged commit a031277 into develop Nov 8, 2026
10 checks passed
@turegjorup
turegjorup deleted the feature/symfony-recipes branch November 8, 2026 20:48
@turegjorup turegjorup mentioned this pull request Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants