schmittjoh / JMSTranslationBundle

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

Fix wrong return type-hint depending on which symfony/translation version is installed #582

Closed deguif closed 9 months ago

deguif commented 9 months ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License Apache2

Description

Currently type-hint is based on Kernel version, which in my case is wrong as we use individual package versioning (kernel is in version 5.4 but translation component is on 6.x version).

As the method getCatalogues was added to TranslatorBagInterface in 6.0, checking for this method should be better to handle this case.

goetas commented 9 months ago

could you please check why phpunit is failing for sf 6.x? if it helps feel free to require 6.4 as min version

deguif commented 9 months ago

I updated packages requirements only for require-dev I also excluded php 7.4 in the matrix for symfony version 6.4 All green now.