sabbelasichon / typo3_encore

Use Webpack Encore within TYPO3
Other
106 stars 19 forks source link

Refactored Stimulus ViewHelpers #189

Closed svenpet90 closed 1 year ago

svenpet90 commented 1 year ago

See Issue: #188

Refactored Stimulus ViewHelpers to streamline their inner workings with the way symfony/webpack-encore-bundle's twig functions work.

This enables seamless TYPO3 integrations for e.g. Symfony UX packages to easily widen the TYPO3-Symfony-compatibilty.

This PR does not contain any BC Breaks BUT I would suggest renaming the dataOrControllerName viewhelper argument to controllerName since...

1) passing an array as first argument is deprecated since webpack-encore-bundle v1.15 2) The argument is also called controllerName there

Renaming the argument would introduce a BC Break. IMO it's worth it and a quick and easy migration (search-and-replace) for everyone already using the Stimulus ViewHelpers.

What do you think? :)

sabbelasichon commented 1 year ago

Many many thanks. Let's do the BC break and i am going to bump a new major version. Awesome work. Looking forward to see your other Pull Requests in my other TYPO3 Symfony packages ;-)

svenpet90 commented 1 year ago

Thank YOU for providing all of these extensions! (I also love being able to seamlessly use symfony/messenger in TYPO3 btw 😍)

I just pushed the renaming of the argument :-)

EDIT: I also just fixed the failing rector tests + changed the functional tests to reflect the changes

sabbelasichon commented 1 year ago

@svenpet90 You can ignore the PHPStan errors.

sabbelasichon commented 1 year ago

@svenpet90 I would suggest to add the second parameter for the trigger_error function. Anything else looks great.