Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51b9246

Browse files
weaverryannicolas-grekas
authored andcommitted
Bug fix for paths that start with the same string
1 parent3d6e0bd commit51b9246

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

‎src/Symfony/Component/AssetMapper/AssetMapperRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function findLogicalPath(string $filesystemPath): ?string
7676
}
7777

7878
foreach ($this->getDirectories()as$path =>$namespace) {
79-
if (!str_starts_with($filesystemPath,$path)) {
79+
if (!str_starts_with($filesystemPath,$path.\DIRECTORY_SEPARATOR)) {
8080
continue;
8181
}
8282

‎src/Symfony/Component/AssetMapper/Tests/AssetMapperRepositoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function testFindWithNamespaces()
7070
publicfunctiontestFindLogicalPath()
7171
{
7272
$repository =newAssetMapperRepository([
73+
'dir' =>'',
7374
'dir1' =>'some_namespace',
7475
'dir2' =>'',
7576
],__DIR__.'/fixtures');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('file9.js');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp