File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
setup/src/Magento/Setup/Console/Command Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ private function getExcludedModulePaths(array $modulePaths)
239
239
$ vendorPathsRegExps [] = $ vendorDir
240
240
. '/(?: ' . join ('| ' , $ vendorModules ) . ') ' ;
241
241
}
242
- $ basePathsRegExps [] = $ basePath
242
+ $ basePathsRegExps [] = preg_quote ( $ basePath, ' # ' )
243
243
. '/(?: ' . join ('| ' , $ vendorPathsRegExps ) . ') ' ;
244
244
}
245
245
@@ -258,6 +258,10 @@ private function getExcludedModulePaths(array $modulePaths)
258
258
*/
259
259
private function getExcludedLibraryPaths (array $ libraryPaths )
260
260
{
261
+ $ libraryPaths = array_map (function ($ libraryPath ) {
262
+ return preg_quote ($ libraryPath , '# ' );
263
+ }, $ libraryPaths );
264
+
261
265
$ excludedLibraryPaths = [
262
266
'#^(?: ' . join ('| ' , $ libraryPaths ) . ')/([ \\w]+/)?Test# ' ,
263
267
'#^(?: ' . join ('| ' , $ libraryPaths ) . ')/([ \\w]+/)?tests# ' ,
@@ -274,7 +278,7 @@ private function getExcludedLibraryPaths(array $libraryPaths)
274
278
private function getExcludedSetupPaths ($ setupPath )
275
279
{
276
280
return [
277
- '#^(?: ' . $ setupPath . ')(/[ \\w]+)*/Test# '
281
+ '#^(?: ' . preg_quote ( $ setupPath, ' # ' ) . ')(/[ \\w]+)*/Test# '
278
282
];
279
283
}
280
284
You can’t perform that action at this time.
0 commit comments