Skip to content

Commit bfad70a

Browse files
[7.0] Cleanup legacy code paths
1 parent fe9b172 commit bfad70a

File tree

9 files changed

+1
-43
lines changed

9 files changed

+1
-43
lines changed

CacheWarmer/SerializerCacheWarmer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

14-
use Doctrine\Common\Annotations\AnnotationException;
1514
use Symfony\Component\Cache\Adapter\ArrayAdapter;
1615
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
1716
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
@@ -51,8 +50,6 @@ protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter, string
5150
foreach ($loader->getMappedClasses() as $mappedClass) {
5251
try {
5352
$metadataFactory->getMetadataFor($mappedClass);
54-
} catch (AnnotationException) {
55-
// ignore failing annotations
5653
} catch (\Exception $e) {
5754
$this->ignoreAutoloadException($mappedClass, $e);
5855
}

CacheWarmer/ValidatorCacheWarmer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

14-
use Doctrine\Common\Annotations\AnnotationException;
1514
use Symfony\Component\Cache\Adapter\ArrayAdapter;
1615
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
1716
use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory;
@@ -50,8 +49,6 @@ protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter, string
5049
if ($metadataFactory->hasMetadataFor($mappedClass)) {
5150
$metadataFactory->getMetadataFor($mappedClass);
5251
}
53-
} catch (AnnotationException) {
54-
// ignore failing annotations
5552
} catch (\Exception $e) {
5653
$this->ignoreAutoloadException($mappedClass, $e);
5754
}

DependencyInjection/Configuration.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,6 @@ private function addAssetMapperSection(ArrayNodeDefinition $rootNode, callable $
899899
->info('The directory to store JavaScript vendors.')
900900
->defaultValue('%kernel.project_dir%/assets/vendor')
901901
->end()
902-
->scalarNode('provider')
903-
->setDeprecated('symfony/framework-bundle', '6.4', 'Option "%node%" at "%path%" is deprecated and does nothing. Remove it.')
904-
->end()
905902
->end()
906903
->end()
907904
->end()

DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,6 @@ public function load(array $configs, ContainerBuilder $container): void
564564
$this->registerHtmlSanitizerConfiguration($config['html_sanitizer'], $container, $loader);
565565
}
566566

567-
$this->addAnnotatedClassesToCompile([
568-
'**\\Controller\\',
569-
'**\\Entity\\',
570-
571-
// Added explicitly so that we don't rely on the class map being dumped to make it work
572-
AbstractController::class,
573-
]);
574-
575567
if (ContainerBuilder::willBeAvailable('symfony/mime', MimeTypes::class, ['symfony/framework-bundle'])) {
576568
$loader->load('mime_type.php');
577569
}

FrameworkBundle.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,7 @@ public function boot(): void
9595

9696
$handler = ErrorHandler::register(null, false);
9797

98-
// When upgrading an existing Symfony application from 6.2 to 6.3, and
99-
// the cache is warmed up, the service is not available yet, so we need
100-
// to check if it exists.
101-
if ($this->container->has('debug.error_handler_configurator')) {
102-
$this->container->get('debug.error_handler_configurator')->configure($handler);
103-
}
98+
$this->container->get('debug.error_handler_configurator')->configure($handler);
10499

105100
if ($this->container->getParameter('kernel.http_method_override')) {
106101
Request::enableHttpMethodParameterOverride();

Resources/config/cache.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@
5656
->private()
5757
->tag('cache.pool')
5858

59-
->set('cache.annotations')
60-
->parent('cache.system')
61-
->private()
62-
->tag('cache.pool')
63-
6459
->set('cache.property_info')
6560
->parent('cache.system')
6661
->private()

Resources/config/services.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
use Symfony\Component\HttpKernel\HttpKernelInterface;
4949
use Symfony\Component\HttpKernel\KernelEvents;
5050
use Symfony\Component\HttpKernel\KernelInterface;
51-
use Symfony\Component\HttpKernel\UriSigner as HttpKernelUriSigner;
5251
use Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner;
5352
use Symfony\Component\Runtime\Runner\Symfony\ResponseRunner;
5453
use Symfony\Component\Runtime\SymfonyRuntime;
@@ -158,8 +157,6 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
158157
param('kernel.secret'),
159158
])
160159
->alias(UriSigner::class, 'uri_signer')
161-
->alias(HttpKernelUriSigner::class, 'uri_signer')
162-
->deprecate('symfony/framework-bundle', '6.4', 'The "%alias_id%" alias is deprecated, use "'.UriSigner::class.'" instead.')
163160

164161
->set('config_cache_factory', ResourceCheckerConfigCacheFactory::class)
165162
->args([

Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Psr\Cache\CacheItemPoolInterface;
1515
use Psr\Log\LoggerAwareInterface;
16-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
1716
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
1817
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
1918
use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage;
@@ -91,8 +90,6 @@
9190

9291
abstract class FrameworkExtensionTestCase extends TestCase
9392
{
94-
use ExpectDeprecationTrait;
95-
9693
private static array $containerCache = [];
9794

9895
abstract protected function loadFromFile(ContainerBuilder $container, $file);

Tests/Test/WebTestCaseTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\HttpFoundation\Cookie as HttpFoundationCookie;
2424
use Symfony\Component\HttpFoundation\Request;
2525
use Symfony\Component\HttpFoundation\Response;
26-
use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHeaderLocationSame;
2726

2827
class WebTestCaseTest extends TestCase
2928
{
@@ -62,10 +61,6 @@ public function testAssertResponseRedirectsWithLocation()
6261

6362
public function testAssertResponseRedirectsWithLocationWithoutHost()
6463
{
65-
if (!class_exists(ResponseHeaderLocationSame::class)) {
66-
$this->markTestSkipped('Requires symfony/http-foundation 6.3 or higher.');
67-
}
68-
6964
$this->getResponseTester(new Response('', 301, ['Location' => 'https://example.com/']))->assertResponseRedirects('/');
7065
$this->expectException(AssertionFailedError::class);
7166
$this->expectExceptionMessage('is redirected and has header "Location" matching "/".');
@@ -74,10 +69,6 @@ public function testAssertResponseRedirectsWithLocationWithoutHost()
7469

7570
public function testAssertResponseRedirectsWithLocationWithoutScheme()
7671
{
77-
if (!class_exists(ResponseHeaderLocationSame::class)) {
78-
$this->markTestSkipped('Requires symfony/http-foundation 6.3 or higher.');
79-
}
80-
8172
$this->getResponseTester(new Response('', 301, ['Location' => 'https://example.com/']))->assertResponseRedirects('//example.com/');
8273
$this->expectException(AssertionFailedError::class);
8374
$this->expectExceptionMessage('is redirected and has header "Location" matching "//example.com/".');

0 commit comments

Comments
 (0)