Skip to content

Conversation

tamcy
Copy link
Contributor

@tamcy tamcy commented Feb 1, 2024

Q A
Bug fix? yes
New feature? no
Issues Fix #1422
License MIT

This fixes the issue that controller name normalization doesn't work as intended in Windows which uses \ as the directory separator. In fact, without the fix, PHPUnit fails when running on Windows platform with the following error:

1) Symfony\UX\StimulusBundle\Tests\AssetMapper\ControllerMapGeneratorTest::testGetControllersMap
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
     4 => 'hello-with-dashes'
     5 => 'hello-with-underscores'
     6 => 'other'
-    7 => 'subdir--deeper'
-    8 => 'subdir--deeper-with-dashes'
-    9 => 'subdir--deeper-with-underscores'
+    7 => 'subdir\deeper'
+    8 => 'subdir\deeper-with-dashes'
+    9 => 'subdir\deeper-with-underscores'
     10 => 'typescript'
 )

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Feb 1, 2024
@weaverryan
Copy link
Member

Thanks for this excellent PR @tamcy!

@weaverryan weaverryan merged commit c10f602 into symfony:2.x Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[StimulusBundle] AssetMapper compiler doesn't handle controllers in subdirectory correctly
3 participants