logo
Failed opening required '/var/www/marchebe/var/cache/prod/doctrine/orm/Proxies/__CG__AcMarchePivotEntityTypeOffre.php' (include_path='.:/usr/share/php') (500 Internal Server Error)

Symfony Exception

Error

HTTP 500 Internal Server Error

Failed opening required '/var/www/marchebe/var/cache/prod/doctrine/orm/Proxies/__CG__AcMarchePivotEntityTypeOffre.php' (include_path='.:/usr/share/php')

Exception

Error

  1. if (! class_exists($proxyClassName, false)) {
  2. $fileName = $this->proxyGenerator->getProxyFileName($className);
  3. switch ($this->autoGenerate) {
  4. case self::AUTOGENERATE_NEVER:
  5. require $fileName;
  6. break;
  7. case self::AUTOGENERATE_FILE_NOT_EXISTS:
  8. if (! file_exists($fileName)) {
  9. $this->proxyGenerator->generateProxyClass($classMetadata, $fileName);
  1. *
  2. * @throws OutOfBoundsException
  3. */
  4. public function getProxy($className, array $identifier)
  5. {
  6. $definition = $this->definitions[$className] ?? $this->getProxyDefinition($className);
  7. $fqcn = $definition->proxyClassName;
  8. $proxy = new $fqcn($definition->initializer, $definition->cloner);
  9. foreach ($definition->identifierFields as $idField) {
  10. if (! isset($identifier[$idField])) {
  1. * {@inheritDoc}
  2. */
  3. public function getProxy($className, array $identifier)
  4. {
  5. if (! $this->isLazyGhostObjectEnabled) {
  6. return parent::getProxy($className, $identifier);
  7. }
  8. $proxyFactory = $this->proxyFactories[$className] ?? $this->getProxyFactory($className);
  9. return $proxyFactory($identifier);
  1. $normalizedAssociatedId = $this->normalizeIdentifier($targetClass, $associatedId);
  2. switch (true) {
  3. // We are negating the condition here. Other cases will assume it is valid!
  4. case $hints['fetchMode'][$class->name][$field] !== ClassMetadata::FETCH_EAGER:
  5. $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $normalizedAssociatedId);
  6. $this->registerManaged($newValue, $associatedId, []);
  7. break;
  8. // Deferred eager load only works for single identifier classes
  9. case isset($hints[self::HINT_DEFEREAGERLOAD]) &&
  1. $this->registerManaged($this->_metadataCache[$className], $this->_hints[Query::HINT_REFRESH_ENTITY], $data);
  2. }
  3. $this->_hints['fetchAlias'] = $dqlAlias;
  4. return $this->_uow->createEntity($className, $data, $this->_hints);
  5. }
  6. /**
  7. * @param class-string $className
  8. * @phpstan-param array<string, mixed> $data
  1. if (! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || $this->_uow->isUninitializedObject($reflFieldValue)) {
  2. // we only need to take action if this value is null,
  3. // we refresh the entity or its an uninitialized proxy.
  4. if (isset($nonemptyComponents[$dqlAlias])) {
  5. $element = $this->getEntity($data, $dqlAlias);
  6. $reflField->setValue($parentObject, $element);
  7. $this->_uow->setOriginalEntityProperty($oid, $relationField, $element);
  8. $targetClass = $this->_metadataCache[$relation['targetEntity']];
  9. if ($relation['isOwningSide']) {
  1. protected function hydrateAllData()
  2. {
  3. $result = [];
  4. while ($row = $this->statement()->fetchAssociative()) {
  5. $this->hydrateRowData($row, $result);
  6. }
  7. // Take snapshots from all newly initialized collections
  8. foreach ($this->initializedCollections as $coll) {
  9. $coll->takeSnapshot();
  1. $this->_em->getEventManager()->addEventListener([Events::onClear], $this);
  2. $this->prepare();
  3. try {
  4. $result = $this->hydrateAllData();
  5. } finally {
  6. $this->cleanup();
  7. }
  8. return $result;
  1. $rsm = $this->getResultSetMapping();
  2. if ($rsm === null) {
  3. throw new LogicException('Uninitialized result set mapping.');
  4. }
  5. $data = $this->_em->newHydrator($this->_hydrationMode)->hydrateAll($stmt, $rsm, $this->_hints);
  6. $setCacheEntry($data);
  7. return $data;
  8. }
in /var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php -> executeIgnoreQueryCache (line 1172)
  1. {
  2. if ($this->cacheable && $this->isCacheEnabled()) {
  3. return $this->executeUsingQueryCache($parameters, $hydrationMode);
  4. }
  5. return $this->executeIgnoreQueryCache($parameters, $hydrationMode);
  6. }
  7. /**
  8. * Execute query ignoring second level cache.
  9. *
  1. * @throws NonUniqueResultException
  2. */
  3. public function getOneOrNullResult($hydrationMode = null)
  4. {
  5. try {
  6. $result = $this->execute(null, $hydrationMode);
  7. } catch (NoResultException $e) {
  8. return null;
  9. }
  10. if ($this->_hydrationMode !== self::HYDRATE_SINGLE_SCALAR && ! $result) {
  1. return $this->createQBL()
  2. ->andWhere('typeOffre.urn = :urn')
  3. ->setParameter('urn', $urn)
  4. ->orderBy('typeOffre.name', 'ASC')
  5. ->getQuery()
  6. ->getOneOrNullResult();
  7. }
  8. /**
  9. * @return TypeOffre[]
  10. */
  1. public function findByUrns(array $typesOffreData): array
  2. {
  3. $typesOffre = [];
  4. foreach ($typesOffreData as $typeOffreId) {
  5. try {
  6. if (($typeOffre = $this->findOneByUrn($typeOffreId)) instanceof TypeOffre) {
  7. $typesOffre[] = $typeOffre;
  8. }
  9. } catch (Exception) {
  10. }
  11. }
  1. $urns = [];
  2. foreach ($referringOffer->tags as $category) {
  3. $urns[] = $category->urn;
  4. }
  5. foreach ($this->typeOffreRepository->findByUrns($urns) as $typeOffre) {
  6. $filtres[] = $typeOffre;
  7. }
  8. if ($filtres === []) {
  9. return [];
  10. }
PivotRepository->fetchSameOffres() in /var/www/marchebe/wp-content/themes/marchebe/Lib/WpRepository.php (line 123)
  1. if (count($offerRefer->see_also)) {
  2. $offres = $offerRefer->see_also;
  3. } else {
  4. $pivotRepository = PivotContainer::getPivotRepository();
  5. $offres = $pivotRepository->fetchSameOffres($offerRefer, 10);
  6. }
  7. PostUtils::setLinkOnOffres($offres, $category->term_id, $language);
  8. $recommandations = PostUtils::convertRecommandationsToArray($offres, $language);
  9. $count = count($recommandations);
  10. $data = [];
WpRepository->recommandationsByOffre() in /var/www/marchebe/wp-content/themes/marchebe/single-event.php (line 112)
  1. 'name' => $category->labelByLanguage('fr'),
  2. 'url' => $urlCategoryAgenda.'?filtre='.$category->urn,
  3. ];
  4. }
  5. $recommandations = $wpRepository->recommandationsByOffre($offre, WpRepository::getCategoryAgenda(), 'fr');
  6. $relations = [];
  7. /*
  8. RouterMarche::setRouteEvents($recommandations);
  9. foreach ($recommandations as $item) {
include('/var/www/marchebe/wp-content/themes/marchebe/single-event.php') in /var/www/marchebe/wp-includes/template-loader.php (line 106)
  1. *
  2. * @param string $template The path of the template to include.
  3. */
  4. $template = apply_filters( 'template_include', $template );
  5. if ( $template ) {
  6. include $template;
  7. } elseif ( current_user_can( 'switch_themes' ) ) {
  8. $theme = wp_get_theme();
  9. if ( $theme->errors() ) {
  10. wp_die( $theme->errors() );
  11. }
require_once('/var/www/marchebe/wp-includes/template-loader.php') in /var/www/marchebe/wp-blog-header.php (line 19)
  1. // Set up the WordPress query.
  2. wp();
  3. // Load the theme template.
  4. require_once ABSPATH . WPINC . '/template-loader.php';
  5. }
require('/var/www/marchebe/wp-blog-header.php') in /var/www/marchebe/index.php (line 17)
  1. * @var bool
  2. */
  3. define( 'WP_USE_THEMES', true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ . '/wp-blog-header.php';

Stack Trace

Error
Error:
Failed opening required '/var/www/marchebe/var/cache/prod/doctrine/orm/Proxies/__CG__AcMarchePivotEntityTypeOffre.php' (include_path='.:/usr/share/php')

  at /var/www/marchebe/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php:199
  at Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition()
     (/var/www/marchebe/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php:111)
  at Doctrine\Common\Proxy\AbstractProxyFactory->getProxy()
     (/var/www/marchebe/vendor/doctrine/orm/src/Proxy/ProxyFactory.php:208)
  at Doctrine\ORM\Proxy\ProxyFactory->getProxy()
     (/var/www/marchebe/vendor/doctrine/orm/src/UnitOfWork.php:3114)
  at Doctrine\ORM\UnitOfWork->createEntity()
     (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:272)
  at Doctrine\ORM\Internal\Hydration\ObjectHydrator->getEntity()
     (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:449)
  at Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData()
     (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:149)
  at Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData()
     (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/AbstractHydrator.php:272)
  at Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll()
     (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:1231)
  at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache()
     (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:1172)
  at Doctrine\ORM\AbstractQuery->execute()
     (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:959)
  at Doctrine\ORM\AbstractQuery->getOneOrNullResult()
     (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/TypeOffreRepository.php:146)
  at AcMarche\Pivot\Repository\TypeOffreRepository->findOneByUrn()
     (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/TypeOffreRepository.php:112)
  at AcMarche\Pivot\Repository\TypeOffreRepository->findByUrns()
     (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/PivotRepository.php:188)
  at AcMarche\Pivot\Repository\PivotRepository->fetchSameOffres()
     (/var/www/marchebe/wp-content/themes/marchebe/Lib/WpRepository.php:123)
  at AcMarche\Theme\Lib\WpRepository->recommandationsByOffre()
     (/var/www/marchebe/wp-content/themes/marchebe/single-event.php:112)
  at include('/var/www/marchebe/wp-content/themes/marchebe/single-event.php')
     (/var/www/marchebe/wp-includes/template-loader.php:106)
  at require_once('/var/www/marchebe/wp-includes/template-loader.php')
     (/var/www/marchebe/wp-blog-header.php:19)
  at require('/var/www/marchebe/wp-blog-header.php')
     (/var/www/marchebe/index.php:17)