Skip to content

[StimulusBundle] Fix controller name conversion #953

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

Merged

Conversation

jon-ht
Copy link
Contributor

@jon-ht jon-ht commented Jun 19, 2023

Q A
Bug fix? yes
New feature? no
Tickets N/A
License MIT

Stimulus controllers must follow some naming convention/normalization according to https://stimulus.hotwired.dev/reference/controllers#identifiers

There was a case when controllers file with underscores in their name would not be a valid entry for Stimulus.

I wasn't sure about using Symfony\UX\StimulusBundle\Dto\StimulusAttributes::normalizeControllerName because it seems related to Twig (due to its private Environment $env in construct)

@weaverryan
Copy link
Member

Thank you @jon-ht - very thorough work!

@weaverryan weaverryan merged commit 45877a0 into symfony:2.x Jun 23, 2023
@jon-ht jon-ht deleted the fix-stimulus-controller-name-conversion branch June 24, 2023 19:05
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.

2 participants