schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
358 stars 159 forks source link

PHP Fatal error: Declaration of must be compatible with #257

Open NersesM opened 2 years ago

NersesM commented 2 years ago

PHP Fatal error: Declaration of JMS\I18nRoutingBundle\JMSI18nRoutingBundle::getContainerExtension() must be compatible with Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension(): ?Symfony\Component\DependencyInjection\Extension\ExtensionInterface in symfony/vendor/jms/i18n-routing-bundle/JMS/I18nRoutingBundle/JMSI18nRoutingBundle.php on line 39

gjuric commented 2 years ago

This bundle doesn't work with Symfony 6, so this is a duplicate of #255

h2Entwicklung commented 2 years ago

Hello @NersesM and @gjuric, did you find alternative project where this is fixed? It seems that this repo is unfortunentaly dead. @schmittjoh if you can promote me as an maintainer, we can propably fix this great project and keep it alive.

gjuric commented 2 years ago

I did not, but I believe @acasademont is the current maintainer.

h2Entwicklung commented 2 years ago

@gjuric do you also still need the bundle? I thiking about forking the repo and then make it Symfony6 ready. But it would be great to have some help.

gjuric commented 2 years ago

I do, this is currently our only blocker for upgrading to Symfony 6 for some of our projects, but I am not sure how much time I could dedicate in next few weeks to that.

Maybe we could coordinate with @jeremywaguet who did a pull request #252 that incorporated some of the changes I had made previously (#250) that also didn't get merged in last 6 months.

Or maybe @acasademont or who ever else is the current maintainer would be open to spreading the load to a few more people.

h2Entwicklung commented 2 years ago

@gjuric I have exactly the same problem with upgrading a bunch of applications because of this issue.

I think for the first step it would be great ifwe have a working alternative and then make it nice afterwards.

gjuric commented 2 years ago

I have created a fork of the project that you can use until this gets sorted out:

blackarcanis commented 7 months ago

Hi @gjuric ! I appreciate your help. However, using your fork with SF6.4, I got this error message: Compile Error: Type of JMS\I18nRoutingBundle\Router\I18nRouter::$defaultLocale must not be defined (as in class Symfony\Component\Routing\Router) Any idea?

gjuric commented 7 months ago

Hi @blackarcanis plase use version 3.2.2 in your composer.json for Symfony 6.4.

Unfortunately the latest release only works with Symfony 7 and at the moment I have no time to maintain two different versions. Maybe I will release new version (v4) for Symfony 7 and update v3 to keep working with older versions of Symfony.

blackarcanis commented 7 months ago

I fully understand; thank you so much for your quick help, @gjuric !