Skip to content

Fix a bunch of deprecations#1968

Open
blued-gear wants to merge 24 commits intomainfrom
fix/deprecations
Open

Fix a bunch of deprecations#1968
blued-gear wants to merge 24 commits intomainfrom
fix/deprecations

Conversation

@blued-gear
Copy link
Collaborator

@blued-gear blued-gear commented Jan 25, 2026

@melroy89 @BentiGorlich @jwr1 please comment with log-messages about deprecations you saw in recent time. If no new deprecations are added within a week, I will mark this PR as ready.

Fixes #744

@blued-gear blued-gear marked this pull request as ready for review February 6, 2026 15:16
@melroy89
Copy link
Member

Let me try to switch kbin.melroy.org to this branch now..

@melroy89 melroy89 added the backend Backend related issues and pull requests label Feb 11, 2026
@melroy89
Copy link
Member

melroy89 commented Feb 18, 2026

New messages now in latest Symfony.

{"message":"User Deprecated: Since symfony/framework-bundle 7.3: Not setting the \"property_info.with_constructor_extractor\" option explicitly is deprecated because its default value will change in version 8.0.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: Not setting the \"property_info.with_constructor_extractor\" option explicitly is deprecated because its default value will change in version 8.0.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/framework-bundle/DependencyInjection/Configuration.php:1348"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:47.903629+00:00","extra":{}}
{"message":"User Deprecated: Enabling the controller resolver automapping feature has been deprecated. Symfony Mapped Route Parameters should be used as replacement. (DoctrineExtension.php:932 called by DoctrineExtension.php:541, https://github.com/doctrine/DoctrineBundle/pull/1804, package doctrine/doctrine-bundle)","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Enabling the controller resolver automapping feature has been deprecated. Symfony Mapped Route Parameters should be used as replacement. (DoctrineExtension.php:932 called by DoctrineExtension.php:541, https://github.com/doctrine/DoctrineBundle/pull/1804, package doctrine/doctrine-bundle)","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/doctrine/deprecations/src/Deprecation.php:208"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:47.988578+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/dependency-injection 7.4: XML configuration format is deprecated, use YAML or PHP instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/dependency-injection 7.4: XML configuration format is deprecated, use YAML or PHP instead.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php:48"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.014911+00:00","extra":{}}


{"message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiReadLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Eav1iuP\" service.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiReadLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Eav1iuP\" service.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php:68"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.721802+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $anonymousApiReadLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Eav1iuP\" service.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $anonymousApiReadLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Eav1iuP\" service.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php:68"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.721839+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiDeleteLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.gNCi44s\" service.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiDeleteLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.gNCi44s\" service.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php:68"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.721918+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiVoteLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.fSlmY23\" service.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiVoteLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.fSlmY23\" service.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php:68"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.721990+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiReportLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Upqq_Rd\" service.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/framework-bundle 7.3: The \"Symfony\\Component\\RateLimiter\\RateLimiterFactory $apiReportLimiter\" autowiring alias is deprecated and will be removed in 8.0, use \"RateLimiterFactoryInterface\" instead. It is being referenced by the \".service_locator.Upqq_Rd\" service.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php:68"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:48.722049+00:00","extra":{}}
{

{"message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/validator/Constraint.php:122"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:51.447603+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/validator/Constraint.php:122"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:51.502923+00:00","extra":{}}
{"message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\\Validator\\Unique instead.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/validator/Constraint.php:122"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:51.503013+00:00","extra":{}}
                   

{"message":"User Deprecated: Since symfony/var-exporter 7.3: The \"Symfony\\Component\\VarExporter\\LazyGhostTrait\" trait is deprecated, use native lazy objects instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/var-exporter 7.3: The \"Symfony\\Component\\VarExporter\\LazyGhostTrait\" trait is deprecated, use native lazy objects instead.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/symfony/var-exporter/LazyGhostTrait.php:21"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-02-18T01:27:53.232301+00:00","extra":{}}

@BentiGorlich
Copy link
Member

I saw another one after symfony 7.4:

Symfony\Component\RateLimiter\RateLimiterFactory autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.

@BentiGorlich BentiGorlich mentioned this pull request Feb 18, 2026
@blued-gear
Copy link
Collaborator Author

Not setting the "property_info.with_constructor_extractor" option explicitly is deprecated

The default until version 8 is false but I set it to true now, as I think it might be useful. If someone knows something about this causing issues, we can revert it.

# Conflicts:
#	src/Repository/ContentRepository.php
#	src/Repository/MagazineRepository.php
Copy link
Member

@melroy89 melroy89 left a comment

Choose a reason for hiding this comment

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

If we need a follow-up work, we can always create an additional PR.

Also some deprecation fixes are part of another PR already: #2026

And some remaining deprecation are not part of our project, but due to vendor packages. So updating our composer packages would also help to resolve those remaining deprecations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

revisit controllers/routes and add MapEntity where necessary

3 participants