Skip to content

chore: dependency updates - Symfony 8.1, PHP 8.4.23, recipes and frontend - #27

Merged
chr-hertel merged 22 commits into
mainfrom
chore/dependency-updates
Jul 31, 2026
Merged

chr-hertel merged 22 commits into
mainfrom
chore/dependency-updates

Conversation

@chr-hertel

Copy link
Copy Markdown
Owner

Brings the project up to date after a long gap.

Backend — Symfony 7.2 → 8.1, composer platform pinned to PHP 8.4.23 to match production. Clears all 38 security advisories composer reported against the old lock. Also Doctrine bundle 3, migrations bundle 4, monolog-bundle 4, openai-php 0.19, deployer 8.

Recipes — all 10 updated via composer recipes:update, one commit each.

Frontend — Encore 7 / Babel 8, Tailwind 3, FontAwesome 7, sass-loader 17. npm audit goes from 24 vulnerabilities to 0, and Tailwind's JIT takes the production stylesheet from 3.02 MiB to 110 KiB.

Three things worth a look during review:

  • niels-de-blaauw/php-doc-check pins nikic/php-parser to ^4, which caps PHPUnit at 10.x and forced dropping Infection — 0.27 was its last php-parser-4 release and it capped symfony/console at ^7, blocking Symfony 8. PHPMD hit the same wall via pdepend and now lives in tools/phpmd/ with its own lock file.
  • Encore 7 no longer bundles a CSS minifier, so the production build silently emitted unminified CSS. cssnano is added and selected explicitly.
  • jQuery 4 breaks the app (CodeMirror editors never initialise), so it stays on 3.7.1. CodeMirror 6 and Tailwind 4 held for the same reason.

Verified with the full bin/check suite plus a browser smoke test of both editors, the calculate round-trip, and a permalink created and reloaded.

chr-hertel and others added 22 commits July 31, 2026 01:07
Production runs PHP 8.4.23, so let composer resolve dependencies against
that exact version instead of the outdated 8.4.2 pin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
phpmd depends on pdepend, which caps symfony/config and
symfony/dependency-injection at ^7 and therefore blocks upgrading the
application to Symfony 8. Since phpmd is a standalone dev tool and shares
no code with the app, install it from tools/phpmd with its own lock file
instead of letting it constrain the application's dependency graph.

bin/check installs it on demand and runs the binary from there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
infection 0.27 is the last release that works with nikic/php-parser ^4,
and it caps symfony/console at ^7, which blocks the Symfony 8 upgrade.
Newer infection needs php-parser ^5, which the app cannot have as long as
niels-de-blaauw/php-doc-check pins it to ^4 - and infection resolves
php-parser through the project autoloader, so neither a standalone
composer install nor the phar sidesteps the collision.

Mutation testing therefore stands down in favour of a current framework.
infection.json.dist is kept so the step can be restored once php-doc-check
supports php-parser ^5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Moves the application from Symfony 7.2 to the current 8.1 release and
pulls the companions that had to move with it: doctrine-bundle 3,
doctrine-migrations-bundle 4, monolog-bundle 4 and openai-php 0.19.
This clears all 38 security advisories composer reported against the
previous lock file.

Config changes required by DoctrineBundle 3:
- use_savepoints, auto_generate_proxy_classes, enable_lazy_ghost_objects
  and report_fields_where_declared were removed as options, their former
  values are now the built-in behaviour
- controller_resolver.auto_mapping is deprecated and only accepted false

Symfony 8 ships the bundle routing resources as PHP instead of XML, so
the imports in config/routes were repointed accordingly.

The php-cs-fixer bump that came along normalises "integer" to "int"
inside the array shape annotation in Snippet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
php-cs-fixer 3.95 supports PHP 8.4 natively and deprecates the env var in
favour of the unsupportedPhpVersionAllowed config option. Neither is
needed here since the toolchain and CI both run 8.4.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All variables and tasks deploy.php relies on (composer_options,
console_options, database:migrate, deploy:cache:clear, deploy:unlock)
still exist in the 8.0 symfony recipe, so the deployment definition is
unchanged.

Bumps the deployer-version pin in the deployment workflow to match, since
the action installs its own copy rather than using the locked one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Flex bookkeeping left over from taking those packages out of the root
dependency graph.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds .editorconfig and APP_SHARE_DIR, declares the JSON schema for
services.yaml, drops the now-default container excludes, makes the front
controller closure static and adds Kernel::getAllowedEnvs().

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Switches routes.yaml to the routing.controllers resource shorthand,
declares the routing JSON schema and wires router.default_uri to the new
DEFAULT_URI env var.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
No file changes: the only upstream edit targets base.html.twig, which
this project replaced with layout.html.twig, and it adds FrankenPHP
hot-reload markup that does not apply to this setup.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Simplifies the profiler config to the current defaults and drops the
deprecated collect_serializer_data option.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stops logging deprecations twice in prod and drops the commented-out
firephp/chromephp handlers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up the DoctrineBundle 3.0 recipe: the naming strategy alias becomes
underscore, which has been number aware since ORM v3 - dumping the schema
under both aliases produces byte-identical SQL, so no migration is needed.
Also refreshes the commented sqlite DSN to be per-environment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Refreshes the commented monolog integration block for MonologBundle 4 and
the structured logging handler. The project's own ignore_exceptions
entries for 400/404/405 are kept.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Moves the frontend build to Webpack Encore 7 with Babel 8 and replaces
the preset-env useBuiltIns polyfilling with babel-plugin-polyfill-corejs3,
and drops the now obsolete regenerator-runtime.

Encore 7 no longer ships a CSS minifier: the minimizer plugin takes it
from an optional peer dependency. Without one the production build
silently emitted unminified CSS (3.77 MiB), so cssnano is added and
selected explicitly via configureCssMinimizerPlugin - output is back to
the previous 3.01 MiB.

webpack-notifier is dropped along with it since enableBuildNotifications()
is not used.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Excludes the generated config/bundles.php and config/reference.php from
the finder. The project's own global_namespace_import rule is untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adopts the PHPUnit 10+ config: cacheDirectory replaces the loose
.phpunit.result.cache file, ignoreSuppressionOfDeprecations is enabled,
and the SymfonyTestsListener is treated as an extension.

tests/bootstrap.php no longer falls back to config/bootstrap.php, which
made that Symfony 4 era file unreachable - Dotenv::bootEnv() covers it, so
it is removed.

The unused PANTHER_* variables go away with the recipe, the project's
DATABASE_URL is kept.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The test DATABASE_URL still announced serverVersion=11 while compose.yaml
runs postgres:15, which made DBAL emit a "Support for Postgres < 12 is
deprecated" notice - now visible because the PHPUnit recipe stopped
ignoring suppressed deprecations.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FontAwesome 7 still ships every icon class the templates use
(fa-times-circle, fa-exclamation-triangle, fa-share-nodes, fa-copy,
fa-github), sass-loader 17 builds unchanged, jquery moves to the latest
3.x.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Clears the last 5 high severity npm advisories, which all came from
tailwind 2 pulling purgecss -> glob -> minimatch -> brace-expansion.

Migration was limited to the two v2 -> v3 breaking changes this project
touches: purge becomes content, and the blueGray palette is renamed to
slate (identical values, verified against the built CSS). None of the 130
utilities used via @apply were renamed in v3.

JIT content scanning replaces the unpurged v2 build, taking the production
stylesheet from 3.02 MiB to 110 KiB. Every class the templates reference,
all six complexity-level variants and the responsive grid variants were
verified present in the output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The framework-bundle recipe added this method; it overrides a private
hook that Symfony's KernelTrait calls on itself, so neither PHPStan nor
PHPMD can see the call site.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Covers the build/test/lint commands, the architecture that spans several
files, and the dependency ceilings that the update sweep uncovered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chr-hertel
chr-hertel merged commit fe04923 into main Jul 31, 2026
1 check passed
@chr-hertel
chr-hertel deleted the chore/dependency-updates branch July 31, 2026 00:07
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.

1 participant