Commit c10f602
committed
bug #1444 [StimulusBundle] Handles Windows directory separator when normalizing controller names (tamcy)
This PR was merged into the 2.x branch.
Discussion
----------
[StimulusBundle] Handles Windows directory separator when normalizing controller names
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| 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'
)
```
Commits
-------
41d2cbc [StimulusBundle] Handles Windows directory separator when normalizing controller names (fixes #1422)File tree
1 file changed
+1
-1
lines changed- src/StimulusBundle/src/AssetMapper
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments