Skip to content

Commit 758121b

Browse files
feature #61156 [FrameworkBundle][TwigBundle] Remove options session.sid_length session.sid_bits_per_character router.cache_dir validation.cache and base_template_class (nicolas-grekas)
This PR was merged into the 8.0 branch. Discussion ---------- [FrameworkBundle][TwigBundle] Remove options session.sid_length session.sid_bits_per_character router.cache_dir validation.cache and base_template_class | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | - | License | MIT Commits ------- 0f2dde7 [FrameworkBundle][TwigBundle] Remove options session.sid_length session.sid_bits_per_character router.cache_dir validation.cache and base_template_class
2 parents 5b29404 + 0f2dde7 commit 758121b

File tree

351 files changed

+211
-1692
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+211
-1692
lines changed

UPGRADE-8.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ FrameworkBundle
210210
* Make `TranslationsCacheWarmer` class `final`
211211
* Make `ValidatorCacheWarmer` class `final`
212212
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
213+
* Remove `session.sid_length` and `session.sid_bits_per_character` config options
214+
* Remove the `router.cache_dir` config option
215+
* Remove the `validation.cache` option
213216

214217
HttpFoundation
215218
--------------
@@ -514,6 +517,7 @@ TwigBundle
514517
----------
515518

516519
* Make `TemplateCacheWarmer` class `final`
520+
* Remove the `base_template_class` config option
517521

518522
TypeInfo
519523
--------

src/Symfony/Bridge/PsrHttpMessage/Tests/Fixtures/App/Kernel.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,8 @@ protected function configureRoutes(RoutingConfigurator $routes): void
4747
protected function configureContainer(ContainerConfigurator $container): void
4848
{
4949
$container->extension('framework', [
50-
'router' => ['utf8' => true],
5150
'secret' => 'for your eyes only',
5251
'test' => true,
53-
'annotations' => false,
54-
'http_method_override' => false,
55-
'handle_all_throwables' => true,
56-
'php_errors' => ['log' => true],
5752
]);
5853

5954
$container->services()

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ CHANGELOG
1414
* Make `TranslationsCacheWarmer` class `final`
1515
* Make `ValidatorCacheWarmer` class `final`
1616
* Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead
17+
* Remove `session.sid_length` and `session.sid_bits_per_character` config options
18+
* Remove the `router.cache_dir` config option
19+
* Remove the `validation.cache` option
1720

1821
7.4
1922
---

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ public function getConfigTreeBuilder(): TreeBuilder
162162
$this->addAssetMapperSection($rootNode, $enableIfStandalone);
163163
$this->addTranslatorSection($rootNode, $enableIfStandalone);
164164
$this->addValidationSection($rootNode, $enableIfStandalone);
165-
$this->addAnnotationsSection($rootNode);
166165
$this->addSerializerSection($rootNode, $enableIfStandalone);
167166
$this->addPropertyAccessSection($rootNode, $willBeAvailable);
168167
$this->addTypeInfoSection($rootNode, $enableIfStandalone);
@@ -650,10 +649,6 @@ private function addRouterSection(ArrayNodeDefinition $rootNode): void
650649
->children()
651650
->scalarNode('resource')->isRequired()->end()
652651
->scalarNode('type')->end()
653-
->scalarNode('cache_dir')
654-
->defaultValue('%kernel.build_dir%')
655-
->setDeprecated('symfony/framework-bundle', '7.1', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0.')
656-
->end()
657652
->scalarNode('default_uri')
658653
->info('The default URI used to generate URLs in a non-HTTP context.')
659654
->defaultNull()
@@ -715,16 +710,6 @@ private function addSessionSection(ArrayNodeDefinition $rootNode): void
715710
->defaultValue(0)
716711
->info('Seconds to wait between 2 session metadata updates.')
717712
->end()
718-
->integerNode('sid_length')
719-
->min(22)
720-
->max(256)
721-
->setDeprecated('symfony/framework-bundle', '7.2', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option.')
722-
->end()
723-
->integerNode('sid_bits_per_character')
724-
->min(4)
725-
->max(6)
726-
->setDeprecated('symfony/framework-bundle', '7.2', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option.')
727-
->end()
728713
->end()
729714
->end()
730715
->end()
@@ -1085,9 +1070,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
10851070
->info('Validation configuration')
10861071
->{$enableIfStandalone('symfony/validator', Validation::class)}()
10871072
->children()
1088-
->scalarNode('cache')
1089-
->setDeprecated('symfony/framework-bundle', '7.3', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0.')
1090-
->end()
10911073
->booleanNode('enable_attributes')->{class_exists(FullStack::class) ? 'defaultFalse' : 'defaultTrue'}()->end()
10921074
->arrayNode('static_method')
10931075
->defaultValue(['loadValidatorMetadata'])
@@ -1168,20 +1150,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
11681150
;
11691151
}
11701152

1171-
private function addAnnotationsSection(ArrayNodeDefinition $rootNode): void
1172-
{
1173-
$rootNode
1174-
->children()
1175-
->arrayNode('annotations')
1176-
->canBeEnabled()
1177-
->validate()
1178-
->ifTrue(static fn (array $v) => $v['enabled'])
1179-
->thenInvalid('Enabling the doctrine/annotations integration is not supported anymore.')
1180-
->end()
1181-
->end()
1182-
;
1183-
}
1184-
11851153
private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone): void
11861154
{
11871155
$defaultContextNode = fn () => (new NodeBuilder())

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
164164
use Symfony\Component\RateLimiter\CompoundRateLimiterFactory;
165165
use Symfony\Component\RateLimiter\LimiterInterface;
166-
use Symfony\Component\RateLimiter\RateLimiterFactory;
167166
use Symfony\Component\RateLimiter\RateLimiterFactoryInterface;
168167
use Symfony\Component\RateLimiter\Storage\CacheStorage;
169168
use Symfony\Component\RemoteEvent\Attribute\AsRemoteEventConsumer;
@@ -1317,7 +1316,7 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
13171316
}
13181317

13191318
$container->setParameter('router.resource', $config['resource']);
1320-
$container->setParameter('router.cache_dir', $config['cache_dir']);
1319+
$container->setParameter('router.cache_dir', '%kernel.build_dir%');
13211320
$router = $container->findDefinition('router.default');
13221321
$argument = $router->getArgument(2);
13231322
$argument['strict_requirements'] = $config['strict_requirements'];
@@ -1343,7 +1342,7 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
13431342
$container->setAlias('session.storage.factory', $config['storage_factory_id']);
13441343

13451344
$options = ['cache_limiter' => '0'];
1346-
foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'sid_length', 'sid_bits_per_character'] as $key) {
1345+
foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor'] as $key) {
13471346
if (isset($config[$key])) {
13481347
$options[$key] = $config[$key];
13491348
}

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<xsd:element name="request" type="request" minOccurs="0" maxOccurs="1" />
2424
<xsd:element name="translator" type="translator" minOccurs="0" maxOccurs="1" />
2525
<xsd:element name="validation" type="validation" minOccurs="0" maxOccurs="1" />
26-
<xsd:element name="annotations" type="annotations" minOccurs="0" maxOccurs="1" />
2726
<xsd:element name="property-access" type="property_access" minOccurs="0" maxOccurs="1" />
2827
<xsd:element name="scheduler" type="scheduler" minOccurs="0" maxOccurs="1" />
2928
<xsd:element name="serializer" type="serializer" minOccurs="0" maxOccurs="1" />
@@ -133,7 +132,6 @@
133132
<xsd:attribute name="strict-requirements" type="xsd:string" />
134133
<xsd:attribute name="utf8" type="xsd:boolean" />
135134
<xsd:attribute name="default-uri" type="xsd:string" />
136-
<xsd:attribute name="cache-dir" type="xsd:string" />
137135
</xsd:complexType>
138136

139137
<xsd:complexType name="session">
@@ -155,8 +153,6 @@
155153
<xsd:attribute name="gc-probability" type="xsd:string" />
156154
<xsd:attribute name="save-path" type="xsd:string" />
157155
<xsd:attribute name="metadata-update-threshold" type="xsd:nonNegativeInteger" />
158-
<xsd:attribute name="sid-length" type="sid_length" />
159-
<xsd:attribute name="sid-bits-per-character" type="sid_bits_per_character" />
160156
</xsd:complexType>
161157

162158
<xsd:complexType name="request">
@@ -313,7 +309,6 @@
313309
</xsd:choice>
314310

315311
<xsd:attribute name="enabled" type="xsd:boolean" />
316-
<xsd:attribute name="cache" type="xsd:string" />
317312
<xsd:attribute name="enable-attributes" type="xsd:boolean" />
318313
<xsd:attribute name="static-method" type="xsd:boolean" />
319314
<xsd:attribute name="translation-domain" type="xsd:string" />
@@ -349,13 +344,6 @@
349344
<xsd:attribute name="endpoint" type="xsd:string" />
350345
</xsd:complexType>
351346

352-
<xsd:complexType name="annotations">
353-
<xsd:attribute name="cache" type="xsd:string" />
354-
<xsd:attribute name="debug" type="xsd:string" />
355-
<xsd:attribute name="file-cache-dir" type="xsd:string" />
356-
<xsd:attribute name="enabled" type="xsd:boolean" />
357-
</xsd:complexType>
358-
359347
<xsd:complexType name="property_access">
360348
<xsd:attribute name="magic-call" type="xsd:boolean" />
361349
<xsd:attribute name="magic-get" type="xsd:boolean" />
@@ -572,21 +560,6 @@
572560
</xsd:restriction>
573561
</xsd:simpleType>
574562

575-
<xsd:simpleType name="sid_bits_per_character">
576-
<xsd:restriction base="xsd:positiveInteger">
577-
<xsd:enumeration value="4" />
578-
<xsd:enumeration value="5" />
579-
<xsd:enumeration value="6" />
580-
</xsd:restriction>
581-
</xsd:simpleType>
582-
583-
<xsd:simpleType name="sid_length">
584-
<xsd:restriction base="xsd:positiveInteger">
585-
<xsd:minInclusive value="22" />
586-
<xsd:maxInclusive value="256" />
587-
</xsd:restriction>
588-
</xsd:simpleType>
589-
590563
<xsd:simpleType name="workflow_type">
591564
<xsd:restriction base="xsd:string">
592565
<xsd:enumeration value="state_machine" />

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,7 @@ public function getCacheDir(): string
365365
public function registerContainerConfiguration(LoaderInterface $loader): void
366366
{
367367
$loader->load(static function (ContainerBuilder $container) {
368-
$container->loadFromExtension('framework', [
369-
'annotations' => false,
370-
'handle_all_throwables' => true,
371-
'http_method_override' => false,
372-
'php_errors' => ['log' => true],
373-
]);
368+
$container->loadFromExtension('framework', []);
374369
});
375370
}
376371

src/Symfony/Bundle/FrameworkBundle/Tests/Command/AboutCommand/Fixture/TestAppKernel.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ public function getProjectDir(): string
3333
public function registerContainerConfiguration(LoaderInterface $loader): void
3434
{
3535
$loader->load(static function (ContainerBuilder $container) {
36-
$container->loadFromExtension('framework', [
37-
'annotations' => false,
38-
'http_method_override' => false,
39-
'handle_all_throwables' => true,
40-
'php_errors' => ['log' => true],
41-
]);
36+
$container->loadFromExtension('framework', []);
4237
});
4338
}
4439

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
framework:
2-
annotations: false
3-
http_method_override: false
4-
handle_all_throwables: true
5-
php_errors:
6-
log: true
72
secret: test

0 commit comments

Comments
 (0)