PsrCachedReader example

return new RecursiveValidator($contextFactory$metadataFactory$validatorFactory$this->initializers);
    }

    private function createAnnotationReader(): Reader
    {
        if (!class_exists(AnnotationReader::class)) {
            throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.');
        }

        if (class_exists(ArrayAdapter::class)) {
            return new PsrCachedReader(new AnnotationReader()new ArrayAdapter());
        }

        throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.');
    }
}
Home | Imprint | This part of the site doesn't use cookies.