Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Deprecating the stimulus functionality in favor of an upcoming StimulusBundle #211

Merged
merged 1 commit into from
May 26, 2023

Conversation

weaverryan
Copy link
Member

Hi!

This isn't ready yet, but a new StimulusBundle is being created that will now be the home of the stimulus_ Twig functions 🎆 . This PR is to deprecate those functions and only load them if the StimulusBundle is not present.

Cheers!

@weaverryan
Copy link
Member Author

weaverryan commented May 22, 2023

I'm going to keep this open, but delay merging it for a bit - as StimulusBundle will initially start as experimental, just to be safe. I don't want to put in the deprecation and force people to switch to an experimental library.

Instead, in StimulusBundle - symfony/ux#887 - I'll set its Twig extension priority to a higher priority so that itsstimulus_ functions take priority over the ones from WebpackEncoreBundle. The idea is that, once you install StimulusBundle, you're opting into the new stimulus_ functions.

For the most part, the stimulus_ functions between StimulusBundle & WebpackEncoreBundle are identical. However, internally, they use different objets to accomplish things. So if you're doing something more advanced, you will notice that difference as soon as StimulusBundle is installed.

Update: on 3rd thought, to keep everything clean, we'll merge and tag this soon, and tag a 2.0 without this. That will also help us have separate recipes - the old "style" and the new style.

@weaverryan weaverryan force-pushed the deprecate-stimulus-functions branch from 808b6f8 to 2a15b75 Compare May 26, 2023 00:15
@weaverryan weaverryan merged commit b8ff4a6 into symfony:main May 26, 2023
@weaverryan weaverryan deleted the deprecate-stimulus-functions branch May 26, 2023 00:40
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.

None yet

1 participant