New Symfony Releases Announced

https://github.com/symfony/symfony

On December 9th 2021 Symfony announced several new releases:

  • Version 2.0 of all symfony/ux libraries
  • Version 3.0 of @symfony/stimulus-bridge
  • Version 2.0 of @symfony/stimulus-testing

Symfony UX is an initiative and set of libraries centered around the Stimulus JavaScript library.

Stimulus 3 Support

Stimulus 3.0 - a new major version - was released in September. It includes a few nice new features - like a "debug" mode and "values defaults" - but no major changes and no backwards compatibility breaks.

Why the new major version?

The library was renamed from stimulus to @hotwired/stimulus. Just the name of the library changed but not much anything else. However, the name change required Symfony's UX libraries to need a new major version.

Symfony UX Changes

There are a few big changes with the new Symfony UX releases:

1) Support changed from stimulus to @hotwired/stimulus: The biggest change with the new major releases listed above is that support for stimulus was dropped and replaced with @hotwired/stimulus (i.e. version 3 of the library). This difference won't be noticeable in your applications, except that you'll need to adjust the import { Controller } from 'stimulus' lines in your code.

2) Support for IE11 was dropped: Support for IE11 is dropped in Version 3 of Stimulus and also in Symfony UX libraries, incorporating a brand new build system. The result is smaller final JavaScript sizes. For continued support of IE 11, use Stimulus 2 and the previous version of the UX libraries.

3) data- Attributes Changed to the Values API: Many of the UX packages allowed users to configure things by adding data- attributes to an element. Those have been replaced by using the "Values API" from Stimulus.

In addition to the above items, symfony/ux-chartjs was updated to use chart.js version 3, and various new events were added to UX controllers to make them more configurable.

To know more and how to upgrade read: Symfony blog

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Advertisement Here

Call for Support