registerUniqueLoader example

if (null === Test::getPreserveGlobalStateSettings(\get_class($test)$test->getName(false))) {
                $test->setPreserveGlobalState(false);
            }
        }

        if (-1 === $this->state) {
            echo "Testing $suiteName\n";
            $this->state = 0;

            if (!class_exists(AnnotationRegistry::class, false) && class_exists(AnnotationRegistry::class)) {
                if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
                    AnnotationRegistry::registerUniqueLoader('class_exists');
                } elseif (method_exists(AnnotationRegistry::class, 'registerLoader')) {
                    AnnotationRegistry::registerLoader('class_exists');
                }
            }

            if ($this->skippedFile = getenv('SYMFONY_PHPUNIT_SKIPPED_TESTS')) {
                $this->state = 1;

                if (file_exists($this->skippedFile)) {
                    $this->state = 2;

                    
if (class_exists(Deprecation::class)) {
    Deprecation::withoutDeduplication();

    if (\PHP_VERSION_ID < 80000) {
        // Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet         Deprecation::ignoreDeprecations('https://github.com/doctrine/orm/issues/10098');
    }
}

if (!class_exists(AnnotationRegistry::class, false) && class_exists(AnnotationRegistry::class)) {
    if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
        AnnotationRegistry::registerUniqueLoader('class_exists');
    } elseif (method_exists(AnnotationRegistry::class, 'registerLoader')) {
        AnnotationRegistry::registerLoader('class_exists');
    }
}

if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) {
    DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER'));
}
Home | Imprint | This part of the site doesn't use cookies.