Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Required for #62113

@carsonbot carsonbot added this to the 7.4 milestone Oct 23, 2025
@nicolas-grekas nicolas-grekas merged commit f107568 into symfony:7.4 Oct 23, 2025
12 checks passed
if (\is_bool($generator)) {
$prepend = $generator;
$generator = null;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we trigger a deprecation in the else branch ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that we should still support config builders, so we'd always trigger that one (unless we go with an extra silencing argument, but as I wrote the other comment, this might be good enough in practice.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can trigger a deprecation in 8.1

$container->registerExtension(new \AcmeExtension());
$container->prependExtensionConfig('acme', ['foo' => 'bar']);
$loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Fixtures/config'), 'prod', new ConfigBuilderGenerator(sys_get_temp_dir()), true);
$loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Fixtures/config'), 'prod', prepend: true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests should not use named parameters. This hides unintentional BC breaks that would be detected due to tests being forced to be updated, by making tests used the public API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did a quick FC layer, that's true :)
I think all this is confidential enough to make it this way.
We can always improve later on.

@nicolas-grekas nicolas-grekas deleted the config-fc branch October 23, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants