schmittjoh / JMSTranslationBundle

Puts the Symfony2 Translation Component on steroids
http://jmsyst.com/bundles/JMSTranslationBundle
426 stars 292 forks source link

Symfony 5 dependencies update #517

Closed wumke closed 4 years ago

wumke commented 4 years ago

Symfony 5 was released some weeks ago, so these dependencies should be updated.

Is anyone already looking into this? I'm trying to migrate a legacy project to Symfony 5, If I find some time I'll try to figure out what has to be changed.

goetas commented 4 years ago

Can you send a PR with the needed updates?

burki commented 4 years ago

It's not straight forward since https://github.com/schmittjoh/JMSTranslationBundle/blob/master/Resources/config/services.xml#L64 refers to %kernel.root_dir% which is no longer present (see https://symfony.com/blog/new-in-symfony-4-2-important-deprecations#deprecated-the-kernel-name-and-the-root-dir)

wumke commented 4 years ago

@burki : that can be fixed in multiple ways:

1: Update the parameter to kernel.project_dir, which makes the library incompatible with older Symfony versions... and dont't care. (or see 2) 2: ... and tell users of older symfony versions to create the kernel.project_dir parameter themselves based on the kernel.root_dir . 3: Make the library users inject the directory themselves, tell them that it must reference to the root directory of their project.

I would go for 1, since there might be other incompatible things. This implies that when bug or security fixes are implemented, 2 versions of this library should be updated and pushed to packagist. Since I do not think such fixes will occur I'd say new major release and the previous is no longer updated.

Does that make sense?

goetas commented 4 years ago

done in https://github.com/schmittjoh/JMSTranslationBundle/pull/530