symfony/symfony v7.4.8 → v8.0.8

This release is mainly a Symfony 8.0 update with a mix of new DX features and a long list of framework and component fixes. It also raises the minimum PHP requirement for Symfony 8 to PHP 8.4.

What's new

  • UrlGenerator::generate() now accepts a special _query key for query-string parameters. This lets you pass query parameters separately from route parameters when names would otherwise collide, such as generating /admin/stats?siteCode=us while still filling the route placeholder with a different value (#60508).
  • Console commands get better support for invokable command classes. Standalone commands can now be added directly to an Application, CommandTester understands them, and #[AsCommand] can carry usage examples without forcing you to implement configure() just for that (#60394, #60823, #60767).
  • VarDumper can now accept more default casters through AbstractCloner::addDefaultCasters(), making it easier to extend dump output in a supported way (#60480).
  • MailerAssertionsTrait gains assertEmailAddressNotContains(), a negative assertion that complements the existing email content helpers (#60740).
  • ClockMock now includes strtotime(), so date-dependent tests can mock that function too (#60424).
  • FrameworkBundle adds a ControllerHelper service that exposes the helpers from AbstractController without requiring inheritance. #[Target] also gets better support for custom services without the extra suffix in the target name (#60857, #60874).
  • Symfony 8 now requires PHP 8.4 or newer (#60639).

Breaking changes

  • Symfony 8 drops support for PHP versions below 8.4. Upgrade your runtime before moving to this tag (#60639).
  • Callable firewall listeners are now deprecated and should be replaced with FirewallListenerInterface implementations (#60614).
  • Several deprecated APIs were removed in Symfony 8, including Application::add(), #[TaggedIterator] / #[TaggedLocator], ContainerBuilder::getAutoconfiguredAttributes(), AdvancedNameConverterInterface, and ImportMapConfigReader::splitPackageNameAndFilePath() (#60776, #60845, #60844, #60870, #60878).
  • Routing now throws when _query is not an array, so query parameters must be passed as an array value (#60863).
  • Form changes the default protocol for UrlType to null (#60922).

Fixes

  • Fixes several DependencyInjection issues around tagged iterators/locators, inline services, and service locator indexes (#63812, #63823, #60691, #60826).
  • Fixes Serializer edge cases around nested arrays, mixed-typed constructor parameters, can*() support, discriminator handling, promoted self types, and TraceableSerializer in array_map() callables (#63817, #63782, #63787, #60511, #60627, #60809).
  • Fixes Cache behavior for Relay 0.21.0, Psr16Cache::getMultiple(), chain adapter expiry propagation, and tag-aware save failures (#63818, #63747, #63655, #63736).
  • Fixes HttpClient event stream handling and push response cleanup (#63692, #63726).
  • Fixes HttpKernel handling for #[Autowire] references, router locale reset, uploaded file mapping, and MapUploadedFile validation metadata (#63724, #63676, #60816, #60483).
  • Fixes Console table rendering, ASCII formatter performance regression, and CommandTester support for invokable commands (#60042, #63749, #60823).
  • Fixes Dotenv deferred expansion issues with self-references, escaped dollars, and preloading warnings (#63674, #63620, #63766).
  • Fixes Messenger Redis duplicate pending messages and worker memory-limit parsing for float values (#63643, #60759).
  • Fixes JsonPath filter evaluation and improves RFC compliance coverage (#60504, #60699).
  • Fixes Intl locale validation and inconsistent region-code data (#60888, #60711).
  • Fixes Form collection reindexing and NumberToLocalizedStringTransformer empty-string handling (#59910, #60676, #60638).
  • Fixes SecurityBundle profiler status display and the security.http_utils decoration path (#63722, #60803).
  • Fixes WebProfilerBundle toolbar behavior with AJAX requests and pending-request accounting (#60607, #63679).
  • Fixes VarExporter hydration of initialized readonly properties (#63635).

Other notable changes

  • Symfony 8 removes support for amphp/http-client < 5 and renames the Amp v5 classes used by the bridge (#60712).
  • Symfony 8 removes the legacy lazy-object traits from VarExporter in favor of native lazy objects (#60716).
  • Symfony 8 removes deprecated PropertyInfo code and requires PropertyInfo 8.0+ in the Doctrine bridge (#60726, #60736).
  • The container dump used by debug and lint commands now uses php-serialize alongside the XML dump (#60597).
  • Security also deprecates the internal rate-limiter factory alias (#60893).

Contributors

@javiereguiluz @nicolas-grekas @mtarld @pcescon @lyrixx @kira0269 @mp3000mp @wazum @pavelwitassek @sn3mdev @LachlanArthur @sakozoko @valtzu @audain-dg @shyim @rfcdt @eyupcanakman @mpdude @guillaumeVDP @andyexeter @SeverinGloeckle @nicolas-grekas @eyupcanakman @santysisi @IndraGunawan @xabbuh @LachlanArthur @ro0NL @alexandre-daubois @BenMorel @MatTheCat @ruudk @cquintana92 @Valmonzo @jprivet-dev @HypeMC @weitzman @lyrixx @OrestisZag @rdavaillaud @llupa @OskarStark

Only the most active 50 of 176 merged PRs were included. See the full compare view.