Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Symfony 7 #2888

Closed
wants to merge 5 commits into from
Closed

Conversation

evertharmeling
Copy link
Contributor

Tried to make the library compatible with Symfony 7

  • Followed the same setup using the Lazy implementation already used for the Translator class, to handle the incompatible return types and type hinted arguments.
  • Not sure how to cope with the change of Translator::setLocale returning void (throwing \Symfony\Component\Translation\Exception\InvalidArgumentException) instead of bool. As I have the feeling it's just a BC break? It's getting more and more quirky to keep supporting older versions (of Symfony). Symfony 5.4 is the lowest LTS version atm, see https://symfony.com/releases
    • For now added skipping tests when the return type is void

Thoughts?

@kylekatarnls
Copy link
Collaborator

Symfony 7 will be supported on Carbon 3, you can test it with

composer require nesbot/carbon:^3.0@dev

@evertharmeling
Copy link
Contributor Author

Ah missed that, cool will do!

@VincentLanglet
Copy link

Symfony 7 will be supported on Carbon 3, you can test it with

composer require nesbot/carbon:^3.0@dev

Hi @kylekatarnls, can't it be supported on Carbon 2 without BC break ?
This would allow to make a release now with SF 7 support to allow other open source library working on SF 7 from now (also without having to bump a new major dependencies).

Or at least could a stable release of the v3 could be done ?
This will allow other libraries to not rely on a @dev version.

Thanks a lot

@kylekatarnls
Copy link
Collaborator

Hello, version 2 is there since 2018, PHP 7.1, we're now at 2.71 minor version, and it's already a huge gap to fill to be compatible from Symfony 3.4 to 6, it's time for it to end.

Next step will be to provide adjustments in Laravel for them to be able to upgrade smoothly, then 3.0 will get a stable release.

@kylekatarnls kylekatarnls mentioned this pull request Nov 30, 2023
@kylekatarnls
Copy link
Collaborator

v3 compatibility with Laravel is now being checked: laravel/framework#49764

If you are on Laravel or have a composer constraint in your project needed carbon v2, you can still try the v3 using:

composer require "nesbot/carbon:3.x-dev as 2.99"

Do not hesitate to give it a try, your help in testing this new version will be gratefully welcome. The more it can be tested, the faster it will reach the stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants