âá}X bvŇUŔ7bvŇU€'cvŇU€'cvŇU€;ĎsŇUDh bvŇU  bvŇUŔ7bvŇU€'cvŇU( bvŇU°1ĎsŇU°đ¤bvŇU° bvŇUŘ bvŇUŔ7bvŇU0ĄbvŇU0ĄbvŇUÔsŇUĆF ĄbvŇUŔ7bvŇU€'cvŇUh bvŇUđÔsŇUÇ° bvŇUĄbvŇU€ĄbvŇUŔ7bvŇU¸¤bvŇUĄbvŇU@:ĎsŇUĂF—pœbvŇUâă}ČĄbvŇUŔ7bvŇUč bvŇUč bvŇU"ÔsŇUĚŕ˘bvŇUŘĄbvŇU˘bvŇUŔ7bvŇUĄbvŇUĄbvŇU€;ĎsŇU˘bvŇUP˘bvŇUŔ7bvŇUĄbvŇUŘĄbvŇU°1ĎsŇU°@ŁbvŇU¤bvŇU˜˘bvŇUŔ7bvŇUŘĄbvŇU˘bvŇU€;ĎsŇU¤bvŇU¨˘bvŇUТbvŇUŔ7bvŇU@ŁbvŇU`˘bvŇUPAĎsŇUĹ0ŁbvŇUŔ7bvŇU@ŁbvŇUŘĄbvŇUĐÔsŇUPÉFE€ˆŁbvŇUŔŁbvŇU¤bvŇU¨˘bvŇUĄbvŇUxŁbvŇUŔ7bvŇU˘bvŇU`˘bvŇUPĽĎsŇUĘFˆŁbvŇUŔŁbvŇU°ŁbvŇUŔ7bvŇU¸¤bvŇUŔŁbvŇU€;ĎsŇUDřŁbvŇUŔ7bvŇUŕ˘bvŇUŕ˘bvŇU€;ĎsŇUž'¸¤bvŇU@¤bvŇU0¤bvŇUŔ7bvŇU¨˘bvŇU¨˘bvŇUĐâŃsŇUFp¤bvŇUŔ7bvŇUŕ˘bvŇUŔŁbvŇU€jĎsŇUQ‡6€¤bvŇU¨¤bvŇUŔ7bvŇU@¤bvŇU@¤bvŇU0ÖĎsŇU2 "ŕ¤bvŇUŔ7bvŇU€¤bvŇU@¤bvŇU;ĎsŇUF"(ĽbvŇUŔ7bvŇUh bvŇUč bvŇU€;ĎsŇU–DĐ*cvŇUĐ*cvŇUhĽbvŇUŔ7bvŇU@ĎbvŇUxĽbvŇU€jĎsŇUE¸ĽbvŇU¨ĽbvŇUŔ7bvŇU¸ĽbvŇUĐ9ĎsŇU@đĽbvŇUŔ7bvŇU@ŚbvŇU8ĽbvŇU×ĎsŇU&"ŚbvŇU@ŚbvŇU0ŚbvŇUŔ7bvŇU8ĽbvŇU@ŚbvŇU€jĎsŇUEpŚbvŇUŔ7bvŇUŚbvŇU¸ĽbvŇUĐ9ĎsŇU@¸ŚbvŇUŔ7bvŇUĐ*cvŇUĐ*cvŇU€;ĎsŇU " ČŚbvŇU(§bvŇU§bvŇUŔ7bvŇUŠbvŇU(§bvŇU@:ĎsŇUĂF—@œbvŇUâá}X§bvŇUŔ7bvŇUȟbvŇUȟbvŇU€;ĎsŇUDh§bvŇU §bvŇUŔ7bvŇUȟbvŇU(§bvŇU€UĎsŇUąp¨bvŇUř§bvŇUč§bvŇUŔ7bvŇUȟbvŇUh§bvŇUĐMÔsŇUÍř§bvŇU0¨bvŇU ¨bvŇUŔ7bvŇU0¨bvŇU0¨bvŇU;ĎsŇUF`¨bvŇUŔ7bvŇU°§bvŇU°§bvŇUĐ9ĎsŇU€¨¨bvŇUŔ7bvŇUh§bvŇU°§bvŇU ČĎsŇUM¸FVŠbvŇU¸¨bvŇUđ¨bvŇUŔ7bvŇUp¨bvŇUp¨bvŇUŔóĎsŇUŐ0ŠbvŇUŔ7bvŇU@ŠbvŇU@ŠbvŇU;ĎsŇUFxŠbvŇUŔ7bvŇU¸¨bvŇU¸¨bvŇU0ÖĎsŇU F"ˆŠbvŇUčŠbvŇUŘŠbvŇUŔ7bvŇUřŤbvŇUčŠbvŇU@:ĎsŇUĂF—œbvŇUâá}ŞbvŇUŔ7bvŇUČŚbvŇUČŚbvŇU€;ĎsŇUD(ŞbvŇU`ŞbvŇUŔ7bvŇUČŚbvŇUčŠbvŇU€UĎsŇUą0ŤbvŇU¸ŞbvŇU¨ŞbvŇUŔ7bvŇUČŚbvŇU(ŞbvŇUĐMÔsŇU͸ŞbvŇUđŞbvŇUŕŞbvŇUŔ7bvŇUđŞbvŇUđŞbvŇU;ĎsŇUF ŤbvŇUŔ7bvŇUpŞbvŇUpŞbvŇUĐ9ĎsŇU~hŤbvŇUŔ7bvŇU(ŞbvŇUpŞbvŇU ČĎsŇUL¸FVřŤbvŇUxŤbvŇU°ŤbvŇUŔ7bvŇU0ŤbvŇU0ŤbvŇUŔóĎsŇU}ŐčŤbvŇUŔ7bvŇUxŤbvŇUxŤbvŇU0ÖĎsŇU2 F"(ŹbvŇUŔ7bvŇU8ŹbvŇU8ŹbvŇU;ĎsŇUFpŹbvŇUŔ7bvŇUŔŤbvŇUŔŤbvŇU0ÖĎsŇU F"€ŹbvŇUŕŹbvŇUĐŹbvŇUŔ7bvŇUđŽbvŇUŕŹbvŇU@:ĎsŇUĂF—ŕ›bvŇUâá}­bvŇUŔ7bvŇUˆŠbvŇUˆŠbvŇU€;ĎsŇUD ­bvŇUX­bvŇUŔ7bvŇUˆŠbvŇUŕŹbvŇU€UĎsŇUą(ŽbvŇU°­bvŇU ­bvŇUŔ7bvŇUˆŠbvŇU ­bvŇUĐMÔsŇUÍ°­bvŇUč­bvŇUŘ­bvŇUŔ7bvŇUč­bvŇUč­bvŇU;ĎsŇUFŽbvŇUŔ7bvŇUh­bvŇUh­bvŇUĐ9ĎsŇU|`ŽbvŇUŔ7bvŇU ­bvŇUh­bvŇU ČĎsŇUK¸FVđŽbvŇUpŽbvŇU¨ŽbvŇUŔ7bvŇU(ŽbvŇU(ŽbvŇUŔóĎsŇU{ŐŕŽbvŇUŔ7bvŇUpŽbvŇUpŽbvŇU0ÖĎsŇU F" ŻbvŇUŔ7bvŇU0ŻbvŇU0ŻbvŇU;ĎsŇUFhŻbvŇUŔ7bvŇU¸ŽbvŇU¸ŽbvŇU0ÖĎsŇU F"xŻbvŇUŘŻbvŇUČŻbvŇUŔ7bvŇU°ąbvŇUŘŻbvŇU@:ĎsŇUĂF—°›bvŇUâá}°bvŇUŔ7bvŇU€ŹbvŇU€ŹbvŇU€;ĎsŇUDProxyClassNameResolver $resolver): void { $this->proxyClassNameResolver = $resolver; } /** * Lazy initialization of this stuff, especially the metadata driver, * since these are not needed at all when a metadata cache is active. * * @return void */ abstract protected function initialize(); /** * Gets the fully qualified class-name from the namespace alias. * * @deprecated This method is deprecated along with short namespace aliases. * * @param string $namespaceAlias * @param string $simpleClassName * * @return string * @psalm-return class-string */ abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName); /** * Returns the mapping driver implementation. * * @return MappingDriver */ abstract protected function getDriver(); /** * Wakes up reflection after ClassMetadata gets unserialized from cache. * * @psalm-param CMTemplate $class * * @return void */ abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService); /** * Initializes Reflection after ClassMetadata was constructed. * * @psalm-param CMTemplate $class * * @return void */ abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService); /** * Checks whether the class metadata is an entity. * * This method should return false for mapped superclasses or embedded classes. * * @psalm-param CMTemplate $class * * @return bool */ abstract protected function isEntity(ClassMetadata $class); /** * Removes the prepended backslash of a class string to conform with how php outputs class names * * @param string $className * * @return string */ private function normalizeClassName($className) { return ltrim($className, '\\'); } /** * {@inheritDoc} * * @throws ReflectionException * @throws MappingException */ public function getMetadataFor($className) { $className = $this->normalizeClassName($className); if (isset($this->loadedMetadata[$className])) { return $this->loadedMetadata[$className]; } if (class_exists($className, false) && (new ReflectionClass($className))->isAnonymous()) { throw MappingException::classIsAnonymous($className); } // Check for namespace alias if (strpos($className, ':') !== false) { Deprecation::trigger( 'doctrine/persistence', 'https://github.com/doctrine/persistence/issues/204', 'Short namespace aliases such as "%s" are deprecated, use ::class constant instead.', $className ); [$namespaceAlias, $simpleClassName] = explode(':', $className, 2); $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); } else { /** @psalm-var class-string $className */ $realClassName = $this->getRealClass($className); } if (isset($this->loadedMetadata[$realClassName])) { // We do not have the alias name in the map, include it return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; } $loadingException = null; try { if ($this->cache) { $cached = $this->cache->getItem($this->getCacheKey($realClassName))->get(); if ($cached instanceof ClassMetadata) { /** @psalm-var CMTemplate $cached */ $this->loadedMetadata[$realClassName] = $cached; $this->wakeupReflection($cached, $this->getReflectionService()); } else { $loadedMetadata = $this->loadMetadata($realClassName); $classNames = array_combine( array_map([$this, 'getCacheKey'], $loadedMetadata), $loadedMetadata ); assert(is_array($classNames)); foreach ($this->cache->getItems(array_keys($classNames)) as $item) { if (! isset($classNames[$item->getKey()])) { continue; } $item->set($this->loadedMetadata[$classNames[$item->getKey()]]); $this->cache->saveDeferred($item); } $this->cache->commit(); } } else { $this->loadMetadata($realClassName); } } catch (MappingException $loadingException) { $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); if (! $fallbackMetadataResponse) { throw $loadingException; } $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse; } if ($className !== $realClassName) { // We do not have the alias name in the map, include it $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; } return $this->loadedMetadata[$className]; } /** * {@inheritDoc} */ public function hasMetadataFor($className) { $className = $this->normalizeClassName($className); return isset($this->loadedMetadata[$className]); } /** * Sets the metadata descriptor for a specific class. * * NOTE: This is only useful in very special cases, like when generating proxy classes. * * {@inheritDoc} * * @return void */ public function setMetadataFor($className, $class) { $this->loadedMetadata[$this->normalizeClassName($className)] = $class; } /** * Gets an array of parent classes for the given entity class. * * @param string $name * @psalm-param class-string $name * * @return string[] * @psalm-return list */ protected function getParentClasses($name) { // Collect parent classes, ignoring transient (not-mapped) classes. $parentClasses = []; foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { if ($this->getDriver()->isTransient($parentClass)) { continue; } $parentClasses[] = $parentClass; } return $parentClasses; } /** * Loads the metadata of the class in question and all it's ancestors whose metadata * is still not loaded. * * Important: The class $name does not necessarily exist at this point here. * Scenarios in a code-generation setup might have access to XML/YAML * Mapping files without the actual PHP code existing here. That is why the * {@see Doctrine\Common\Persistence\Mapping\ReflectionService} interface * should be used for reflection. * * @param string $name The name of the class for which the metadata should get loaded. * @psalm-param class-string $name * * @return array * @psalm-return list */ protected function loadMetadata($name) { if (! $this->initialized) { $this->initialize(); } $loaded = []; $parentClasses = $this->getParentClasses($name); $parentClasses[] = $name; // Move down the hierarchy of parent classes, starting from the topmost class $parent = null; $rootEntityFound = false; $visited = []; $reflService = $this->getReflectionService(); foreach ($parentClasses as $className) { if (isset($this->loadedMetadata[$className])) { $parent = $this->loadedMetadata[$className]; if ($this->isEntity($parent)) { $rootEntityFound = true; array_unshift($visited, $className); } continue; } $class = $this->newClassMetadataInstance($className); $this->initializeReflection($class, $reflService); $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); $this->loadedMetadata[$className] = $class; $parent = $class; if ($this->isEntity($class)) { $rootEntityFound = true; array_unshift($visited, $className); } $this->wakeupReflection($class, $reflService); $loaded[] = $className; } return $loaded; } /** * Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions * * Override this method to implement a fallback strategy for failed metadata loading * * @param string $className * * @return ClassMetadata|null * @psalm-return CMTemplate|null */ protected function onNotFoundMetadata($className) { return null; } /** * Actually loads the metadata from the underlying metadata. * * @param ClassMetadata $class * @param ClassMetadata|null $parent * @param bool $rootEntityFound * @param string[] $nonSuperclassParents All parent class names * that are not marked as mapped superclasses. * @psalm-param CMTemplate $class * @psalm-param CMTemplate|null $parent * * @return void */ abstract protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents); /** * Creates a new ClassMetadata instance for the given class name. * * @param string $className * @psalm-param class-string $className * * @return ClassMetadata * @psalm-return CMTemplate * * @template T of object */ abstract protected function newClassMetadataInstance($className); /** * {@inheritDoc} * * @psalm-param class-string|string $className */ public function isTransient($className) { if (! $this->initialized) { $this->initialize(); } // Check for namespace alias if (! class_exists($className, false) && strpos($className, ':') !== false) { Deprecation::trigger( 'doctrine/persistence', 'https://github.com/doctrine/persistence/issues/204', 'Short namespace aliases such as "%s" are deprecated, use ::class constant instead.', $className ); [$namespaceAlias, $simpleClassName] = explode(':', $className, 2); $className = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); } /** @psalm-var class-string $className */ return $this->getDriver()->isTransient($className); } /** * Sets the reflectionService. * * @return void */ public function setReflectionService(ReflectionService $reflectionService) { $this->reflectionService = $reflectionService; } /** * Gets the reflection service associated with this metadata factory. * * @return ReflectionService */ public function getReflectionService() { if ($this->reflectionService === null) { $this->reflectionService = new RuntimeReflectionService(); } return $this->reflectionService; } protected function getCacheKey(string $realClassName): string { return str_replace('\\', '__', $realClassName) . $this->cacheSalt; } /** * Gets the real class name of a class name that could be a proxy. * * @psalm-param class-string>|class-string $class * * @psalm-return class-string * * @template T of object */ private function getRealClass(string $class): string { if ($this->proxyClassNameResolver === null) { $this->createDefaultProxyClassNameResolver(); } assert($this->proxyClassNameResolver !== null); return $this->proxyClassNameResolver->resolveClassName($class); } private function createDefaultProxyClassNameResolver(): void { $this->proxyClassNameResolver = new class implements ProxyClassNameResolver { /** * @psalm-param class-string>|class-string $className * * @psalm-return class-string * * @template T of object */ public function resolveClassName(string $className): string { $pos = strrpos($className, '\\' . Proxy::MARKER . '\\'); if ($pos === false) { /** @psalm-var class-string */ return $className; } /** @psalm-var class-string */ return substr($className, $pos + Proxy::MARKER_LENGTH + 2); } }; } } An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.