leogout / SeoBundle

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

Warning on sf 5.2 - Seo generator services must be public. #22

Closed ucay closed 3 years ago

ucay commented 3 years ago

Trying this bundle for my Symfony v5.2 (skeleton, not the web-skeleton) got an error

Seo generator services must be public, but "leogout_seo.generator.basic" is not.

it's happen for all generator (basic, og and twitter)

try setting for default, not working

services:
    _defaults:
        public: true

but, add public="true" in the service (seo/basic.xml) can solve the problem, but have no time try to the other major version of symfony.

leogout commented 3 years ago

Hello, I would be happy to accept a PR for this if anyone has time. I haven't used Symfony in years so it wouldn't be wise for me to code this....

leogout commented 3 years ago

I would l'île yo create a realease for this. Is it a breaking change ? Or is the property "public" supported in older versions of symfony ?

sarim commented 3 years ago

In previous versions it was default for services to be public. So if you omitted the tag, it was public. This behavior was changed in 3.4. https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default

EdwinLove commented 3 years ago

Would be really nice if this was released. Can't use the bundle as it is. Older versions (and they would be pretty old being pre 3.4) would not break with the addition of public = true

sarim commented 3 years ago

I'm using it with "dev-master" as version in composer.json

leogout commented 3 years ago

Thanks for the reminder, check out the v1.2.5

EdwinLove commented 3 years ago

Great, many thanks, didn't expect such a quick response!