Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: use Doctrine\Common\Annotations\AnnotationRegistry; Chris@0: use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; Chris@0: Chris@0: // Detect if we're loaded by an actual run of phpunit Chris@0: if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false)) { Chris@0: return; Chris@0: } Chris@0: Chris@0: // Enforce a consistent locale Chris@0: setlocale(LC_ALL, 'C'); Chris@0: Chris@0: if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { Chris@0: AnnotationRegistry::registerLoader('class_exists'); Chris@0: } Chris@0: Chris@0: if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { Chris@0: DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); Chris@0: }