|
| 1 | +<?php |
| 2 | + |
| 3 | +if (false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { |
| 4 | + putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=force=1&php71-compat=0'); |
| 5 | +} |
| 6 | + |
| 7 | +require __DIR__.'/../.phpunit/phpunit-8.3-0/vendor/autoload.php'; |
| 8 | + |
| 9 | +file_put_contents(__DIR__.'/../vendor/autoload.php', preg_replace('/^return (Composer.*);/m', <<<'EOTXT' |
| 10 | +$loader = \1; |
| 11 | +$loader->addClassMap(['Symfony\Component\Debug\Exception\FlattenException' => \dirname(__DIR__).'/src/Symfony/Component/Debug/Exception/FlattenException.php']); |
| 12 | +
|
| 13 | +return $loader; |
| 14 | + |
| 15 | +EOTXT |
| 16 | +, file_get_contents(__DIR__.'/../vendor/autoload.php'))); |
| 17 | + |
| 18 | +$loader = require __DIR__.'/../vendor/autoload.php'; |
| 19 | + |
| 20 | +Symfony\Component\ErrorHandler\DebugClassLoader::enable(); |
| 21 | + |
| 22 | +foreach ($loader->getClassMap() as $class => $file) { |
| 23 | + switch (true) { |
| 24 | + case false !== strpos(realpath($file), '/vendor/'): |
| 25 | + case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'): |
| 26 | + case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'): |
| 27 | + case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'): |
| 28 | + case false !== strpos($file, '/src/Symfony/Component/Debug/Tests/Fixtures/'): |
| 29 | + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'): |
| 30 | + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'): |
| 31 | + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'): |
| 32 | + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'): |
| 33 | + case false !== strpos($file, '/src/Symfony/Component/ErrorHandler/Tests/Fixtures/'): |
| 34 | + case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php'): |
| 35 | + case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php'): |
| 36 | + case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'): |
| 37 | + case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'): |
| 38 | + case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php') && \PHP_VERSION_ID < 70400: |
| 39 | + continue 2; |
| 40 | + } |
| 41 | + |
| 42 | + class_exists($class); |
| 43 | +} |
| 44 | + |
| 45 | +Symfony\Component\ErrorHandler\DebugClassLoader::disable(); |
0 commit comments