Skip to content

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