leogout / SeoBundle

A Symfony bundle to generate SEO meta tags.
39 stars 18 forks source link

SeoGeneratorPass::process return type #32

Open rhyd42 opened 10 months ago

rhyd42 commented 10 months ago

Currently getting a deprecation warning in Symfony 6.3. I've checked the branch for Symfony 7 and it won't actually cause a problem until Symfony 8.

Method "Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process()" might add "void" as a native return type declaration in the future. Do the same in implementation "Leogout\Bundle\SeoBundle\DependencyInjection\Compiler\SeoGeneratorPass" now to avoid errors or add an explicit @return annotation to suppress this message.

Adding the return type will break backwards compatibility, so perhaps this could be a 2.0 version when Symfony 8 is released, For now the @return annotation can be added. I'm happy to create a PR for the return annotation.

See https://symfony.com/blog/symfony-7-0-type-declarations for more details.