2019-08-23 14:32:15 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
|
2019-09-25 16:33:10 +01:00
|
|
|
echo "Please define the SYMFONY_PATCH_TYPE_DECLARATIONS env var when running this script.\n";
|
|
|
|
exit(1);
|
2019-08-23 14:32:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
require __DIR__.'/../.phpunit/phpunit-8.3-0/vendor/autoload.php';
|
|
|
|
|
|
|
|
file_put_contents(__DIR__.'/../vendor/autoload.php', preg_replace('/^return (Composer.*);/m', <<<'EOTXT'
|
|
|
|
$loader = \1;
|
|
|
|
$loader->addClassMap(['Symfony\Component\Debug\Exception\FlattenException' => \dirname(__DIR__).'/src/Symfony/Component/Debug/Exception/FlattenException.php']);
|
|
|
|
|
|
|
|
return $loader;
|
|
|
|
|
|
|
|
EOTXT
|
|
|
|
, file_get_contents(__DIR__.'/../vendor/autoload.php')));
|
|
|
|
|
|
|
|
$loader = require __DIR__.'/../vendor/autoload.php';
|
|
|
|
|
|
|
|
Symfony\Component\ErrorHandler\DebugClassLoader::enable();
|
|
|
|
|
|
|
|
foreach ($loader->getClassMap() as $class => $file) {
|
|
|
|
switch (true) {
|
|
|
|
case false !== strpos(realpath($file), '/vendor/'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
|
2019-12-10 12:53:32 +00:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):
|
2019-08-23 14:32:15 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'):
|
2020-02-03 08:39:20 +00:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/ParseError.php'):
|
2019-08-23 14:32:15 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/Debug/Tests/Fixtures/'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'):
|
2020-06-18 22:16:36 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php'):
|
2020-06-18 22:27:56 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/uniontype_classes.php'):
|
2019-08-23 14:32:15 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'):
|
2020-10-23 18:10:28 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/'):
|
2019-08-23 14:32:15 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/ErrorHandler/Tests/Fixtures/'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php'):
|
2020-06-18 22:39:07 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php'):
|
2019-08-23 14:32:15 +01:00
|
|
|
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
|
|
|
|
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php') && \PHP_VERSION_ID < 70400:
|
|
|
|
continue 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
class_exists($class);
|
|
|
|
}
|
|
|
|
|
2019-09-03 21:36:28 +01:00
|
|
|
Symfony\Component\ErrorHandler\DebugClassLoader::checkClasses();
|