Skip to content

Commit 358b56e

Browse files
feature #62113 [Config][DependencyInjection] Remove support for the fluent PHP config format (nicolas-grekas)
This PR was merged into the 8.0 branch. Discussion ---------- [Config][DependencyInjection] Remove support for the fluent PHP config format | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | - | License | MIT Following #62092 and #62135 Commits ------- 8da03cb [DependencyInjection][Config] Remove support for the fluent PHP config format
2 parents e7aa0b7 + 8da03cb commit 358b56e

File tree

83 files changed

+18
-5586
lines changed

Some content is hidden

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

83 files changed

+18
-5586
lines changed

UPGRADE-8.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Config
3131
* Add argument `$singular` to `NodeBuilder::arrayNode()`
3232
* Add argument `$info` to `ArrayNodeDefinition::canBeDisabled()` and `canBeEnabled()`
3333
* Ensure configuration nodes do not have both `isRequired()` and `defaultValue()`
34+
* Remove generation of fluent methods in config builders
3435

3536
Console
3637
-------
@@ -116,6 +117,15 @@ DependencyInjection
116117
* Remove `!tagged` tag, use `!tagged_iterator` instead
117118
* Remove the `ContainerBuilder::getAutoconfiguredAttributes()` method, use `getAttributeAutoconfigurators()` instead to retrieve all the callbacks for a specific attribute class
118119
* Add argument `$target` to `ContainerBuilder::registerAliasForArgument()`
120+
* Remove support for the fluent PHP format for semantic configuration, instantiate builders inline with the config array as argument and return them instead:
121+
```diff
122+
-return function (AcmeConfig $config) {
123+
- $config->color('red');
124+
-}
125+
+return new AcmeConfig([
126+
+ 'color' => 'red',
127+
+]);
128+
```
119129

120130
DoctrineBridge
121131
--------------

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
* Remove the `router.cache_dir` config option
2020
* Remove the `validation.cache` option
2121
* Remove `TranslationUpdateCommand` in favor of `TranslationExtractCommand`
22+
* Deprecate `ConfigBuilderCacheWarmer`, return PHP arrays from your config instead
2223

2324
7.4
2425
---

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

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

0 commit comments

Comments
 (0)