Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/phpunit-bridge/bootstrap.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
10 */ | 10 */ |
11 | 11 |
12 use Doctrine\Common\Annotations\AnnotationRegistry; | 12 use Doctrine\Common\Annotations\AnnotationRegistry; |
13 use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; | 13 use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; |
14 | 14 |
15 // Detect if we need to serialize deprecations to a file. | |
16 if ($file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { | |
17 DeprecationErrorHandler::collectDeprecations($file); | |
18 | |
19 return; | |
20 } | |
21 | |
15 // Detect if we're loaded by an actual run of phpunit | 22 // Detect if we're loaded by an actual run of phpunit |
16 if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false)) { | 23 if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { |
17 return; | 24 return; |
18 } | 25 } |
19 | 26 |
20 // Enforce a consistent locale | 27 // Enforce a consistent locale |
21 setlocale(LC_ALL, 'C'); | 28 setlocale(LC_ALL, 'C'); |
22 | 29 |
23 if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { | 30 if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { |
24 AnnotationRegistry::registerLoader('class_exists'); | 31 if (method_exists('Doctrine\Common\Annotations\AnnotationRegistry', 'registerUniqueLoader')) { |
32 AnnotationRegistry::registerUniqueLoader('class_exists'); | |
33 } else { | |
34 AnnotationRegistry::registerLoader('class_exists'); | |
35 } | |
25 } | 36 } |
26 | 37 |
27 if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { | 38 if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { |
28 DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); | 39 DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); |
29 } | 40 } |