Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4f8916c

Browse files
committed
[ClassLoader][HttpKernel] Remove ClassCollectionLoader & Kernel::loadClassCache BC layer
1 parent 7047b41 commit 4f8916c

File tree

26 files changed

+2
-1303
lines changed

26 files changed

+2
-1303
lines changed

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassCacheCacheWarmer.php

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ public function load(array $configs, ContainerBuilder $container)
9595

9696
$loader->load('web.xml');
9797
$loader->load('services.xml');
98-
99-
if (PHP_VERSION_ID < 70000) {
100-
$definition = $container->getDefinition('kernel.class_cache.cache_warmer');
101-
$definition->addTag('kernel.cache_warmer');
102-
// Ignore deprecation for PHP versions below 7.0
103-
$definition->setDeprecated(false);
104-
}
105-
10698
$loader->load('fragment_renderer.xml');
10799

108100
if (class_exists(Application::class)) {
@@ -288,46 +280,6 @@ public function load(array $configs, ContainerBuilder $container)
288280
->addTag('validator.constraint_validator');
289281
$container->registerForAutoconfiguration(ObjectInitializerInterface::class)
290282
->addTag('validator.initializer');
291-
292-
if (PHP_VERSION_ID < 70000) {
293-
$this->addClassesToCompile(array(
294-
'Symfony\\Component\\Config\\ConfigCache',
295-
'Symfony\\Component\\Config\\FileLocator',
296-
297-
'Symfony\\Component\\Debug\\ErrorHandler',
298-
299-
'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface',
300-
'Symfony\\Component\\DependencyInjection\\Container',
301-
302-
'Symfony\\Component\\EventDispatcher\\Event',
303-
304-
'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener',
305-
'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener',
306-
'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
307-
'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver',
308-
'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver',
309-
'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata',
310-
'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory',
311-
'Symfony\\Component\\HttpKernel\\Event\\KernelEvent',
312-
'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent',
313-
'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent',
314-
'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent',
315-
'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent',
316-
'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent',
317-
'Symfony\\Component\\HttpKernel\\HttpKernel',
318-
'Symfony\\Component\\HttpKernel\\KernelEvents',
319-
'Symfony\\Component\\HttpKernel\\Config\\FileLocator',
320-
321-
'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser',
322-
'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver',
323-
324-
// Cannot be included because annotations will parse the big compiled class file
325-
// 'Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller',
326-
327-
// cannot be included as commands are discovered based on the path to this class via Reflection
328-
// 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle',
329-
));
330-
}
331283
}
332284

333285
/**
@@ -668,16 +620,6 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
668620

669621
$container->setParameter('request_listener.http_port', $config['http_port']);
670622
$container->setParameter('request_listener.https_port', $config['https_port']);
671-
672-
if (PHP_VERSION_ID < 70000) {
673-
$this->addClassesToCompile(array(
674-
'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
675-
'Symfony\\Component\\Routing\\RequestContext',
676-
'Symfony\\Component\\Routing\\Router',
677-
'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
678-
$container->findDefinition('router.default')->getClass(),
679-
));
680-
}
681623
}
682624

683625
/**
@@ -720,24 +662,6 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
720662

721663
$container->setParameter('session.save_path', $config['save_path']);
722664

723-
if (PHP_VERSION_ID < 70000) {
724-
$this->addClassesToCompile(array(
725-
'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener',
726-
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage',
727-
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage',
728-
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler',
729-
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy',
730-
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy',
731-
$container->getDefinition('session')->getClass(),
732-
));
733-
734-
if ($container->hasDefinition($config['storage_id'])) {
735-
$this->addClassesToCompile(array(
736-
$container->findDefinition('session.storage')->getClass(),
737-
));
738-
}
739-
}
740-
741665
$container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']);
742666
}
743667

@@ -805,15 +729,6 @@ private function registerTemplatingConfiguration(array $config, ContainerBuilder
805729
$container->setDefinition('templating.loader', $loaderCache);
806730
}
807731

808-
if (PHP_VERSION_ID < 70000) {
809-
$this->addClassesToCompile(array(
810-
'Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables',
811-
'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateReference',
812-
'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser',
813-
$container->findDefinition('templating.locator')->getClass(),
814-
));
815-
}
816-
817732
$container->setParameter('templating.engines', $config['engines']);
818733
$engines = array_map(function ($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']);
819734

@@ -845,14 +760,6 @@ private function registerTemplatingConfiguration(array $config, ContainerBuilder
845760
$container->setAlias('debug.templating.engine.php', 'templating.engine.php');
846761
}
847762

848-
if (PHP_VERSION_ID < 70000) {
849-
$this->addClassesToCompile(array(
850-
'Symfony\\Component\\Templating\\Storage\\FileStorage',
851-
'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine',
852-
'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader',
853-
));
854-
}
855-
856763
if ($container->has('assets.packages')) {
857764
$container->getDefinition('templating.helper.assets')->replaceArgument(0, new Reference('assets.packages'));
858765
} else {
@@ -1185,13 +1092,6 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
11851092
// Enable warmer only if PHP array is used for cache
11861093
$definition = $container->findDefinition('annotations.cache_warmer');
11871094
$definition->addTag('kernel.cache_warmer');
1188-
1189-
if (PHP_VERSION_ID < 70000) {
1190-
$this->addClassesToCompile(array(
1191-
'Symfony\Component\Cache\Adapter\PhpArrayAdapter',
1192-
'Symfony\Component\Cache\DoctrineProvider',
1193-
));
1194-
}
11951095
} elseif ('file' === $config['cache']) {
11961096
$cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']);
11971097

@@ -1442,14 +1342,6 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
14421342
$propertyAccessDefinition->setArguments(array(0, false));
14431343
}
14441344
}
1445-
1446-
if (PHP_VERSION_ID < 70000) {
1447-
$this->addClassesToCompile(array(
1448-
'Symfony\Component\Cache\Adapter\ApcuAdapter',
1449-
'Symfony\Component\Cache\Adapter\FilesystemAdapter',
1450-
'Symfony\Component\Cache\CacheItem',
1451-
));
1452-
}
14531345
}
14541346

14551347
/**

src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@
2525
<argument type="collection" />
2626
</service>
2727

28-
<service id="kernel.class_cache.cache_warmer" class="Symfony\Bundle\FrameworkBundle\CacheWarmer\ClassCacheCacheWarmer" public="true">
29-
<argument type="collection">
30-
<argument>Symfony\Component\HttpFoundation\ParameterBag</argument>
31-
<argument>Symfony\Component\HttpFoundation\HeaderBag</argument>
32-
<argument>Symfony\Component\HttpFoundation\FileBag</argument>
33-
<argument>Symfony\Component\HttpFoundation\ServerBag</argument>
34-
<argument>Symfony\Component\HttpFoundation\Request</argument>
35-
<argument>Symfony\Component\HttpKernel\Kernel</argument>
36-
</argument>
37-
<deprecated>The "%service_id%" option is deprecated since version 3.3, to be removed in 4.0.</deprecated>
38-
</service>
39-
4028
<service id="cache_clearer" class="Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer" public="true">
4129
<argument type="collection" />
4230
</service>

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ClassCacheCacheWarmerTest.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,6 @@ public function load(array $configs, ContainerBuilder $container)
112112

113113
$container->registerForAutoconfiguration(VoterInterface::class)
114114
->addTag('security.voter');
115-
116-
if (PHP_VERSION_ID < 70000) {
117-
// add some required classes for compilation
118-
$this->addClassesToCompile(array(
119-
'Symfony\Component\Security\Http\Firewall',
120-
'Symfony\Component\Security\Core\User\UserProviderInterface',
121-
'Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager',
122-
'Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage',
123-
'Symfony\Component\Security\Core\Authorization\AccessDecisionManager',
124-
'Symfony\Component\Security\Core\Authorization\AuthorizationChecker',
125-
'Symfony\Component\Security\Core\Authorization\Voter\VoterInterface',
126-
'Symfony\Bundle\SecurityBundle\Security\FirewallConfig',
127-
'Symfony\Bundle\SecurityBundle\Security\FirewallContext',
128-
'Symfony\Component\HttpFoundation\RequestMatcher',
129-
));
130-
}
131115
}
132116

133117
private function aclLoad($config, ContainerBuilder $container)
@@ -204,12 +188,6 @@ private function createAuthorization($config, ContainerBuilder $container)
204188
return;
205189
}
206190

207-
if (PHP_VERSION_ID < 70000) {
208-
$this->addClassesToCompile(array(
209-
'Symfony\\Component\\Security\\Http\\AccessMap',
210-
));
211-
}
212-
213191
foreach ($config['access_control'] as $access) {
214192
$matcher = $this->createRequestMatcher(
215193
$container,

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,6 @@ public function load(array $configs, ContainerBuilder $container)
148148
->addTag('twig.extension');
149149
$container->registerForAutoconfiguration(\Twig_LoaderInterface::class)
150150
->addTag('twig.loader');
151-
152-
if (PHP_VERSION_ID < 70000) {
153-
$this->addClassesToCompile(array(
154-
'Twig_Environment',
155-
'Twig_Extension',
156-
'Twig_Extension_Core',
157-
'Twig_Extension_Escaper',
158-
'Twig_Extension_Optimizer',
159-
'Twig_LoaderInterface',
160-
'Twig_Markup',
161-
'Twig_Template',
162-
));
163-
}
164151
}
165152

166153
private function getBundleHierarchy(ContainerBuilder $container)

0 commit comments

Comments
 (0)