diff --git a/.github/patch-types.php b/.github/patch-types.php new file mode 100644 index 0000000000000..d64325f6c8b4d --- /dev/null +++ b/.github/patch-types.php @@ -0,0 +1,45 @@ +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'): + case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'): + case false !== strpos($file, '/src/Symfony/Component/Debug/Tests/Fixtures/'): + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'): + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'): + 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'): + 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); +} + +Symfony\Component\ErrorHandler\DebugClassLoader::disable(); diff --git a/.travis.yml b/.travis.yml index 184398c68f5aa..09bf24640ef4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,12 +25,7 @@ env: matrix: include: - - php: 7.1 - env: php_extra="7.2" - - php: 7.3 - env: deps=high - php: 7.4snapshot - env: deps=low fast_finish: true cache: @@ -79,10 +74,8 @@ before_install: export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n') find ~/.phpenv -name xdebug.ini -delete - if [[ $TRAVIS_PHP_VERSION = 7.4* && $deps ]]; then - export PHPUNIT_X="$PHPUNIT_X,issue-32995" - elif [[ $TRAVIS_PHP_VERSION = 7.4* ]]; then - export PHPUNIT_X="$PHPUNIT --group issue-32995" + if [[ $TRAVIS_PHP_VERSION = 7.4* ]]; then + export PHPUNIT_X="$PHPUNIT_X,issue-32995,legacy" fi nanoseconds () { @@ -163,6 +156,7 @@ before_install: - | # Install extra PHP extensions for PHP in $TRAVIS_PHP_VERSION $php_extra; do + continue export PHP=$PHP phpenv global $PHP INI=~/.phpenv/versions/$PHP/etc/conf.d/travis.ini @@ -270,6 +264,12 @@ install: ([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer config platform.ext-mongodb 1.6.0; composer require --dev --no-update mongodb/mongodb) tfold 'composer update' $COMPOSER_UP tfold 'phpunit install' ./phpunit install + + rm vendor/symfony/contracts -Rf + ln -sd $(realpath src/Symfony/Contracts) vendor/symfony/contracts + composer install --optimize-autoloader + php .github/patch-types.php + if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" elif [[ $deps = low ]]; then diff --git a/composer.json b/composer.json index 93d6b029d8c12..0ff31bbc4a898 100644 --- a/composer.json +++ b/composer.json @@ -142,7 +142,6 @@ "src/Symfony/Bridge/ProxyManager/Legacy/ProxiedMethodReturnExpression.php" ], "exclude-from-classmap": [ - "**/Tests/" ] }, "autoload-dev": {