lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
419 stars 255 forks source link

Deprecations SF6.3 #437

Closed raziel057 closed 11 months ago

raziel057 commented 11 months ago

SF6.3 raised the following deprecation that we can fix replacing the @required annotation by #[Required] (Symfony\Contracts\Service\Attribute\Required) attribute n top of setRequestStack and setTokenManager methods in https://github.com/lexik/LexikTranslationBundle/blob/master/Util/Csrf/CsrfCheckerTrait.php

The compatibility with lower versions should be right as the class exists since SF5.2 and this package is constraint to Symfony ~6.0 and require PHP >= 8.1. See https://symfony.com/blog/new-in-symfony-5-2-php-8-attributes

1x: Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Lexik\Bundle\TranslationBundle\Controller\RestController::setRequestStack()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead. 1x in DelegationControllerTest::quotaIncreaseProvideData from PTC\AdminBundle\Tests\Controller

1x: Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Lexik\Bundle\TranslationBundle\Controller\RestController::setTokenManager()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead. 1x in DelegationControllerTest::quotaIncreaseProvideData from PTC\AdminBundle\Tests\Controller

1x: Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Lexik\Bundle\TranslationBundle\Controller\TranslationController::setRequestStack()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead. 1x in DelegationControllerTest::quotaIncreaseProvideData from PTC\AdminBundle\Tests\Controller

1x: Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Lexik\Bundle\TranslationBundle\Controller\TranslationController::setTokenManager()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead. 1x in DelegationControllerTest::quotaIncreaseProvideData from PTC\AdminBundle\Tests\Controller

If it's ok for you I open a PR.

bartmcleod commented 11 months ago

@raziel057 That would be great, please go ahead. If you want to make changes that require higher versions of SF that is also fine. In that case, we create a branch and tag for 6.0 and move on.