[BUGFIX] Convert slashes in Windows paths for blacklist generation 39/46039/2
authorNicole Cordes <typo3@cordes.co>
Sun, 17 Jan 2016 22:11:37 +0000 (23:11 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 20 Jan 2016 10:52:38 +0000 (11:52 +0100)
The composer ClassMapGenerator expects the blacklist regular expression
to contain forward slashes. As the realpath of a given file is used it
has to be converted before using it in the expression.

Resolves: #72782
Releases: master, 7.6
Change-Id: Ia61a490be4cee4c8b7c492b4514bff2d720343ae
Reviewed-on: https://review.typo3.org/46039
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/core/Classes/Core/ClassLoadingInformationGenerator.php

index 49261b7..b892bc4 100644 (file)
@@ -148,6 +148,7 @@ class ClassLoadingInformationGenerator
         $blacklistExpression = null;
         if ($ignorePotentialTestClasses) {
             $blacklistPathPrefix = realpath($classesPath);
+            $blacklistPathPrefix = strtr($blacklistPathPrefix, '\\', '/');
             $blacklistExpression = "{($blacklistPathPrefix/tests/|$blacklistPathPrefix/Tests/|$blacklistPathPrefix/Resources/|$blacklistPathPrefix/res/|$blacklistPathPrefix/class.ext_update.php)}";
         }
         foreach (ClassMapGenerator::createMap($classesPath, $blacklistExpression, null, $namespace) as $class => $path) {