Skip to content

[DependencyInjection] Do not preload functions #59713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

biozshock
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Ensure preload.php does not have functions in preloaded class names:

$ grep "current" var/cache/prod/App_KernelProdContainer.preload.php 
$classes[] = 'current';

Happens because the DI declares a factory, which uses built-in \current: https://github.com/symfony/symfony/blob/v6.4.18/src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client.php#L39
And then the "class" is added by https://github.com/symfony/symfony/blob/v6.4.18/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L2317

Similar to the #36866

@carsonbot carsonbot added this to the 6.4 milestone Feb 7, 2025
@carsonbot carsonbot changed the title [DI] Do not preload functions. [DependencyInjection] Do not preload functions. Feb 7, 2025
@OskarStark OskarStark changed the title [DependencyInjection] Do not preload functions. [DependencyInjection] Do not preload functions Feb 7, 2025
@nicolas-grekas
Copy link
Member

Thank you @biozshock.

@nicolas-grekas nicolas-grekas merged commit 818423e into symfony:6.4 Feb 10, 2025
17 of 19 checks passed
This was referenced Feb 26, 2025
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.

3 participants