Symfony UX 3.0 is a new major release. Following Symfony's release process, this version removes all features deprecated during the 2.x cycle and raises the minimum requirements to PHP 8.4 and Symfony 7.4. If your application runs without deprecation notices on Symfony UX 2.x, upgrading should be straightforward.

Removed Packages: Swup, LazyImage, Typed, TogglePassword

Simon André Hugo Alliaume
Contributed by Simon André and Hugo Alliaume in #2985 , #2993 , #2994 and #2995

Four packages have been removed from the Symfony UX ecosystem. These packages provided thin wrappers around third-party JavaScript libraries with minimal PHP integration, and their functionality can be reproduced in a few lines of application code:

  • Swup: install Swup via npm or importmap:require and import it directly in your application
  • LazyImage: native browser lazy loading (loading="lazy") has made this package obsolete
  • Typed: install Typed.js via npm or importmap:require and create a small Stimulus controller
  • TogglePassword: a candidate for migration to UX Toolkit as a reusable component

If you rely on any of these packages, check the UPGRADE-3.0.md file for migration steps.

Deprecation Removals Across All Packages

Simon André Hugo Alliaume
Contributed by Simon André and Hugo Alliaume in #3040 , #3051 , #3054 , #3100 , #3101 , #3102 , #3103 , #3179 , #3180 , #3186 and #3452

All code deprecated during the 2.x cycle has been removed. Here are the most notable changes:

Autocomplete: the ParentEntityAutocompleteType class has been replaced by BaseEntityAutocompleteType, and ExtraLazyChoiceLoader has been removed in favor of Symfony Form's built-in LazyChoiceLoader (available since Symfony 7.2).

LiveComponent: the csrf argument on #[AsLiveComponent] has been removed; same-origin/CORS protection is now the default.

TwigComponent: the twig_component.defaults configuration is now mandatory, the cva Twig function has been replaced by html_cva from twig/html-extra:^3.12, and PreCreateForRenderEvent::getProps() has been renamed to getInputProps().

Map: the render_map() Twig function has been replaced by ux_map(), and the title option on shapes (Polygon, Polyline, Rectangle, Circle) has been replaced by infoWindow.

StimulusBundle: the ux_controller_link_tags() Twig function has been removed, which requires Symfony AssetMapper 6.4 or higher.

Turbo, Vue, Chartjs, Notify, React, Svelte: various internal backward-compatibility layers and deprecated method signatures have been cleaned up.

Consult the full UPGRADE-3.0.md for detailed migration instructions and code diffs.

Cropper: Rotation Always Applied

Matthieu Lempereur
Contributed by Matthieu Lempereur in #3433

The Crop::getCroppedImage() and Crop::getCroppedThumbnail() methods now apply rotation automatically when the crop data includes a rotation angle. The $applyRotation parameter has been removed:

1
2
3
4
5
6
7
// Before (2.x)
$crop->getCroppedImage(applyRotation: true);
$crop->getCroppedThumbnail(200, 200, applyRotation: true);

// After (3.0): rotation is always applied
$crop->getCroppedImage();
$crop->getCroppedThumbnail(200, 200);

Google Maps: Upgraded to @googlemaps/js-api-loader 2.0

Hugo Alliaume
Contributed by Hugo Alliaume in #3115

The Google Map bridge now uses @googlemaps/js-api-loader version ^2.0. If you use Symfony AssetMapper without Symfony Flex, update your import map:

1
$ php bin/console importmap:require @googlemaps/js-api-loader@^2.0

Some UX_MAP_DSN query parameters have changed: the version option has been renamed to v, and options id, nonce, retries, url have been removed. See the UPGRADE-3.0.md for the full list of DSN option changes.

PHPUnit 11 Replaces Symfony PHPUnit Bridge

Hugo Alliaume
Contributed by Hugo Alliaume in #3182

The test infrastructure has been modernized: all packages now use PHPUnit 11 directly instead of the Symfony PHPUnit Bridge. This does not affect application code, but if you run the Symfony UX test suites locally, make sure you have PHPUnit 11 or higher installed.

Full Changelog

  • #3452 [LiveComponent] Remove compatibility layer with Symfony PropertyInfo <7.1 (@Kocal)
  • #3453 Update minimum required Symfony version to 7.4 (@Kocal)
  • #3450 Upgrade minimum required PHP version to 8.4 (@Kocal)
  • #3433 [Cropper] Always apply rotation in Crop::getCroppedImage() and Crop::getCroppedThumbnail() (@MrYamous)
  • #3398 Post-merge fixes for 3.x (@Kocal)
  • #3186 [Autocomplete][Turbo] Remove BC layers for methods and parameters (@Kocal)
  • #3191 Fix 2.x -> 3.x merge (@Kocal)
  • #3187 Add phpunit.dist.xml in .gitattributes (@Kocal)
  • #3182 Drop Symfony PHPUnit Bridge in favor of PHPUnit >= 11.0 (@Kocal)
  • #3180 [StimulusBundle] Remove deprecations for 3.0 (@Kocal)
  • #3179 [Vue] Remove deprecations for 3.0 (@Kocal)
  • #3115 [Map][Google] Upgrade @googlemaps/js-api-loader to ^2.0 (@Kocal)
  • #3105 [TwigComponent] Remove dev-dependency on WebpackEncoreBundle (@Kocal)
  • #3103 [Autocomplete] Remove deprecated code for 3.0 (@smnandre)
  • #3102 [Chartjs][Notify][React][Svelte] Remove StimulusHelper deprecation for 3.0 (@smnandre)
  • #3101 [Vue] Remove deprecations for 3.0 (@smnandre)
  • #3100 [Turbo] Remove deprecations for 3.0 (@smnandre)
  • #3054 [Map] Remove deprecations from Map (@Kocal)
  • #3051 [LiveComponent][UX3] Remove deprecations (@smnandre)
  • #3040 [TwigComponent][UX3] Remove deprecations (@smnandre)
  • #2998 Upgrade minimum required PHP version to 8.2 (@Kocal)
  • #2996 Update minimum required Symfony version to ^6.4 (@Kocal)
  • #2995 [TogglePassword] Remove package (@Kocal)
  • #2994 [LazyImage] Remove package (@Kocal)
  • #2993 [Typed] Remove package (@Kocal)
  • #2985 [Swup] Remove package (@smnandre)
Published in #Releases