You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncomment the translator: { fallbacks: ['%locale%'] } line in app/config/config.yml
composer up
bin/console c:c -vvv
You'll get the following deprecation logged:
INFO [php] UserDeprecated: The class "Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader" is deprecated since version 3.4 and will be removed in 4.0. Use "Symfony\Component\Translation\Reader\TranslationReader" instead.
[
"exception" => ErrorException {
#message: "User Deprecated: The class "Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader" is deprecated since version 3.4 and will be removed in 4.0. Use "Symfony\Component\Translation\Reader\TranslationReader" instead. "#code: 0#file: "./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/TranslationLoader.php"#line: 17#severity: E_USER_DEPRECATED
trace: {
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/TranslationLoader.php:17 { …}
./vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:143 { …}
Symfony\Component\Debug\DebugClassLoader->loadClass() {}
spl_autoload_call() {}
./vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php:78 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:351 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:344 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:279 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:799 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:851 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:190 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:816 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:634 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:137 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:154 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:180 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:161 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:117 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:252 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:942 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:83 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:225 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:71 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:129 { …}
./bin/console:27 {
› $application = newApplication($kernel);
› $application->run($input);
›
}
}
}
]
It seems the ContainerBuilder::getReflectionClass() method is called with the TranslationLoader as $class argument when collecting lineages, triggering autoloading and the deprecation through ClassExistenceResource::isFresh().
It does not happen when setting container.dumper.inline_class_loader to false.
The text was updated successfully, but these errors were encountered:
…ass might also be (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Skip hot_path tag for deprecated services as their class might also be
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24959
| License | MIT
| Doc PR | -
Commits
-------
1775bba [DI] Skip hot_path tag for deprecated services as their class might also be
Steps to reproduce:
symfony new reproducer 3.4 && cd reproducer
translator: { fallbacks: ['%locale%'] }
line inapp/config/config.yml
composer up
bin/console c:c -vvv
You'll get the following deprecation logged:
It seems the
ContainerBuilder::getReflectionClass()
method is called with theTranslationLoader
as$class
argument when collecting lineages, triggering autoloading and the deprecation throughClassExistenceResource::isFresh()
.It does not happen when setting
container.dumper.inline_class_loader
tofalse
.The text was updated successfully, but these errors were encountered: