use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
+use Symfony\Component\ClassLoader\ClassCollectionLoader;
+use Symfony\Component\Config\ConfigCache;
+use Symfony\Component\Config\Loader\DelegatingLoader;
+use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
-use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
-use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
-use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
+use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
+use Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-use Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
-use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
-use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
+use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Config\FileLocator;
-use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass;
-use Symfony\Component\Config\Loader\LoaderResolver;
-use Symfony\Component\Config\Loader\DelegatingLoader;
-use Symfony\Component\Config\ConfigCache;
-use Symfony\Component\ClassLoader\ClassCollectionLoader;
+use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
/**
* The Kernel is the heart of the Symfony system.
private $requestStackSize = 0;
private $resetServices = false;
- const VERSION = '3.4.10';
- const VERSION_ID = 30410;
+ const VERSION = '3.4.18';
+ const VERSION_ID = 30418;
const MAJOR_VERSION = 3;
const MINOR_VERSION = 4;
- const RELEASE_VERSION = 10;
+ const RELEASE_VERSION = 18;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '11/2020';
$this->debug = (bool) $debug;
$this->rootDir = $this->getRootDir();
$this->name = $this->getName();
-
- if ($this->debug) {
- $this->startTime = microtime(true);
- }
}
public function __clone()
{
- if ($this->debug) {
- $this->startTime = microtime(true);
- }
-
$this->booted = false;
$this->container = null;
$this->requestStackSize = 0;
}
/**
- * Boots the current kernel.
+ * {@inheritdoc}
*/
public function boot()
{
$this->container->get('services_resetter')->reset();
}
$this->resetServices = false;
+ if ($this->debug) {
+ $this->startTime = microtime(true);
+ }
}
return;
}
+ if ($this->debug) {
+ $this->startTime = microtime(true);
+ }
if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) {
putenv('SHELL_VERBOSITY=3');
$_ENV['SHELL_VERBOSITY'] = 3;
public function getBundle($name, $first = true/*, $noDeprecation = false */)
{
$noDeprecation = false;
- if (func_num_args() >= 3) {
+ if (\func_num_args() >= 3) {
$noDeprecation = func_get_arg(2);
}
if (!$first && !$noDeprecation) {
- @trigger_error(sprintf('Passing "false" as the second argument to %s() is deprecated as of 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
+ @trigger_error(sprintf('Passing "false" as the second argument to "%s()" is deprecated as of 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
}
if (!isset($this->bundleMap[$name])) {
- throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this)));
+ throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, \get_class($this)));
}
if (true === $first) {
foreach ($bundles as $bundle) {
if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
if (null !== $resourceBundle) {
- throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.',
- $file,
- $resourceBundle,
- $dir.'/'.$bundles[0]->getName().$overridePath
- ));
+ throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', $file, $resourceBundle, $dir.'/'.$bundles[0]->getName().$overridePath));
}
if ($first) {
}
}
- if (count($files) > 0) {
+ if (\count($files) > 0) {
return $first && $isResource ? $files[0] : $files;
}
{
if (null === $this->rootDir) {
$r = new \ReflectionObject($this);
- $this->rootDir = dirname($r->getFileName());
+ $this->rootDir = \dirname($r->getFileName());
}
return $this->rootDir;
{
if (null === $this->projectDir) {
$r = new \ReflectionObject($this);
- $dir = $rootDir = dirname($r->getFileName());
+ $dir = $rootDir = \dirname($r->getFileName());
while (!file_exists($dir.'/composer.json')) {
- if ($dir === dirname($dir)) {
+ if ($dir === \dirname($dir)) {
return $this->projectDir = $rootDir;
}
- $dir = dirname($dir);
+ $dir = \dirname($dir);
}
$this->projectDir = $dir;
}
}
// look for orphans
- if (!empty($directChildren) && count($diff = array_diff_key($directChildren, $this->bundles))) {
+ if (!empty($directChildren) && \count($diff = array_diff_key($directChildren, $this->bundles))) {
$diff = array_keys($diff);
throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0]));
if ($this->debug) {
$collectedLogs = array();
- $previousHandler = defined('PHPUNIT_COMPOSER_INSTALL');
+ $previousHandler = \defined('PHPUNIT_COMPOSER_INSTALL');
$previousHandler = $previousHandler ?: set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) {
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
return $previousHandler ? $previousHandler($type, $message, $file, $line) : false;
// Clean the trace by removing first frames added by the error handler itself.
for ($i = 0; isset($backtrace[$i]); ++$i) {
if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) {
- $backtrace = array_slice($backtrace, 1 + $i);
+ $backtrace = \array_slice($backtrace, 1 + $i);
break;
}
}
error_reporting($errorLevel);
}
}
- $oldContainer = is_object($oldContainer) ? new \ReflectionClass($oldContainer) : false;
+ $oldContainer = \is_object($oldContainer) ? new \ReflectionClass($oldContainer) : false;
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
$this->container = require $cache->getPath();
$this->container->set('kernel', $this);
- if ($oldContainer && get_class($this->container) !== $oldContainer->name) {
+ if ($oldContainer && \get_class($this->container) !== $oldContainer->name) {
// Because concurrent requests might still be using them,
// old container files are not removed immediately,
// but on a next dump of the container.
static $legacyContainers = array();
- $oldContainerDir = dirname($oldContainer->getFileName());
+ $oldContainerDir = \dirname($oldContainer->getFileName());
$legacyContainers[$oldContainerDir.'.legacy'] = true;
- foreach (glob(dirname($oldContainerDir).DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) {
+ foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) {
if (!isset($legacyContainers[$legacyContainer]) && @unlink($legacyContainer)) {
(new Filesystem())->remove(substr($legacyContainer, 0, -7));
}
$bundlesMetadata = array();
foreach ($this->bundles as $name => $bundle) {
- $bundles[$name] = get_class($bundle);
+ $bundles[$name] = \get_class($bundle);
$bundlesMetadata[$name] = array(
'parent' => $bundle->getParent(),
'path' => $bundle->getPath(),
*/
protected function getEnvParameters()
{
- if (0 === func_num_args() || func_get_arg(0)) {
- @trigger_error(sprintf('The %s() method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED);
+ if (0 === \func_num_args() || func_get_arg(0)) {
+ @trigger_error(sprintf('The "%s()" method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED);
}
$parameters = array();
));
$rootCode = array_pop($content);
- $dir = dirname($cache->getPath()).'/';
+ $dir = \dirname($cache->getPath()).'/';
$fs = new Filesystem();
foreach ($content as $file => $code) {
$fs->dumpFile($dir.$file, $code);
@chmod($dir.$file, 0666 & ~umask());
}
- @unlink(dirname($dir.$file).'.legacy');
+ @unlink(\dirname($dir.$file).'.legacy');
$cache->write($rootCode, $container->getResources());
}
*/
public static function stripComments($source)
{
- if (!function_exists('token_get_all')) {
+ if (!\function_exists('token_get_all')) {
return $source;
}
// replace multiple new lines with a single newline
$rawChunk .= preg_replace(array('/\n{2,}/S'), "\n", $token[1]);
- } elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
+ } elseif (\in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
$ignoreSpace = true;
} else {
$rawChunk .= $token[1];