File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 88use PHPStan \File \FileHelper ;
99use PHPStan \Internal \ComposerHelper ;
1010use function array_filter ;
11+ use function array_map ;
1112use function array_values ;
1213use function str_contains ;
1314
@@ -42,7 +43,7 @@ public function getStubFiles(): array
4243 return $ this ->cachedFiles ;
4344 }
4445
45- $ files = $ this ->stubFiles ;
46+ $ files = array_map ( fn ( $ path ) => $ this ->fileHelper -> normalizePath ( $ path ), $ this -> stubFiles ) ;
4647 $ extensions = $ this ->container ->getServicesByTag (StubFilesExtension::EXTENSION_TAG );
4748 foreach ($ extensions as $ extension ) {
4849 foreach ($ extension ->getFiles () as $ extensionFile ) {
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ public function testGetProjectStubFilesWhenPathContainsWindowsSeparator(): void
4343 $ projectStubFiles = $ defaultStubFilesProvider ->getProjectStubFiles ();
4444 $ this ->assertContains ('/projectStub.stub ' , $ projectStubFiles );
4545 $ this ->assertNotContains ($ thirdPartyStubFile , $ projectStubFiles );
46+
47+ $ fileHelper = new FileHelper (__DIR__ );
48+ $ this ->assertNotContains ($ fileHelper ->normalizePath ($ thirdPartyStubFile ), $ projectStubFiles );
4649 }
4750
4851 /**
You can’t perform that action at this time.
0 commit comments