-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Remove hard dependency on symfony/intl #40298
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine doing it in 5.x personally.
Of course, this should be documented in CHANGELOG+UPGRADE files, in the doc, and the website-skeleton also should be updated (it has explicit "intl" as a dep since 2018).
src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php
Outdated
Show resolved
Hide resolved
The PR is updated and documentation is added. |
@@ -47,6 +48,10 @@ public function configureOptions(OptionsResolver $resolver) | |||
$input = $options['input']; | |||
|
|||
if ($options['intl']) { | |||
if (!class_exists(Intl::class)) { | |||
throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s" with option "intl=true". Try running "composer require symfony/intl".', static::class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this exception message is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
symfony/intl is listed in the website-skeleton since 2018
Thank you @Nyholm. |
Thank you for merging |
… (wouterj) This PR was merged into the 4.4 branch. Discussion ---------- [TwigBridge] Install symfony/intl to run tests on Travis | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | bi | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - The hard dependency on `symfony/intl` was removed from the Form component in 5.3-dev (#40298). I suggest to add the explicit dev dependency on TwigBridge on 4.4 already. Commits ------- b297045 [TwigBridge] Install symfony/intl to run tests on Travis
This was voted down in 2018 (#29229) and will revert #29720 by @chalasr. I reopen it because the Form component is way less dependent on Intl component now.
Im hesitant if we should do this in 5.x or 6.0. If a user don't have
symfony/intl
installed, they will get an error in runtime. That is something that speaks for doing it in 6.0.Could I get some opinions?
TODO
UPGRADE-x.x.md