Skip to content

Commit f639fc1

Browse files
Merge branch '4.4' into 5.0
* 4.4: [Http Foundation] Fix clear cookie samesite [Security] Check if firewall is stateless before checking for session/previous session [Form] Support customized intl php.ini settings [Security] Remember me: allow to set the samesite cookie flag [Debug] fix for PHP 7.3.16+/7.4.4+ [Validator] Backport translations [Mailer] Use %d instead of %s for error code in error messages [HttpKernel] fix locking for PHP 7.4+ [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE Prevent warning in proc_open() [FrameworkBundle] Fix Router Cache Fix deprecation messages
2 parents d062b52 + f0ef822 commit f639fc1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Routing/Router.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Psr\Container\ContainerInterface;
1515
use Psr\Log\LoggerInterface;
1616
use Symfony\Component\Config\Loader\LoaderInterface;
17+
use Symfony\Component\Config\Resource\FileExistenceResource;
18+
use Symfony\Component\Config\Resource\FileResource;
1719
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
1820
use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;
1921
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
@@ -71,6 +73,16 @@ public function getRouteCollection()
7173
$this->collection = $this->container->get('routing.loader')->load($this->resource, $this->options['resource_type']);
7274
$this->resolveParameters($this->collection);
7375
$this->collection->addResource(new ContainerParametersResource($this->collectedParameters));
76+
77+
try {
78+
$containerFile = ($this->paramFetcher)('kernel.cache_dir').'/'.($this->paramFetcher)('kernel.container_class').'.php';
79+
if (file_exists($containerFile)) {
80+
$this->collection->addResource(new FileResource($containerFile));
81+
} else {
82+
$this->collection->addResource(new FileExistenceResource($containerFile));
83+
}
84+
} catch (ParameterNotFoundException $exception) {
85+
}
7486
}
7587

7688
return $this->collection;

0 commit comments

Comments
 (0)