Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] Add newactive_at,not_active_at andlegal_tender options toCurrencyType#61837
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Form] Add newactive_at,not_active_at andlegal_tender options toCurrencyType#61837
Conversation
Is it necessary to add more tests given that the filtering method |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
active,legal_tender anddate options toCurrencyTypeactive,legal_tender andactive_or_not_at options toCurrencyTypeUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
should we force the new defaults in a deprecated manner? |
@ro0NL |
I don't understand why we need active and active_or_not_at? That's to cover the need of listing only non-active currencies at a given date? Is that a common enough usecase? |
Crovitche-1623 commentedSep 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
IMHO yes it could be a common use case to list only the non-active currencies for a given date, for the following reasons:
WDYT@nicolas-grekas ? |
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
active,legal_tender andactive_or_not_at options toCurrencyTypeactive_at,active_or_not_at andlegal_tender options toCurrencyTypeactive_at,active_or_not_at andlegal_tender options toCurrencyTypeactive_at,not_active_at andlegal_tender options toCurrencyTypeUh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas A part from that I think I forgot to process the eventual |
If we want to account for the TZ, maybe we should put timestamps in the metadata instead of date strings? (if that's what we have right now) |
Crovitche-1623 commentedSep 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, or we could convert the |
it might be more readable to have Y-m-d H:i:s UTC strings indeed |
Crovitche-1623 commentedSep 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ok 👍🏻 Do I create another PR for this or can I do the required changes in the current one ? |
nicolas-grekas commentedSep 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It should be a separate PR targetting branch 6.4 |
Crovitche-1623 commentedSep 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| returnarray_flip($filteredCurrencyNames); | ||
| }, | ||
| ), | ||
| $choiceTranslationLocale.($activeAt ??$notActiveAt)?->format('Y-m-d\TH:i:s').$legalTenderCacheKey, |
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: Some timezones use unusual offsets, with the smallest official step being 15 minutes. I used the seconds as the smallest units but we could use only minutes if we wanted to.
…dity (Crovitche-1623)This PR was squashed before being merged into the 6.4 branch.Discussion----------[Intl] Support time in generated data in currencies validity| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | no| New feature? | yes| Deprecations? | no| Issues | -| License | MIT`@nicolas`-grekassee#61837 (comment)Note: This PR is a prerequisite of#61837Commits-------ed53287 [Intl] Support time in generated data in currencies validity
…s to `CurrencyType`
dcf0f08 toa378fe6CompareThank you@Crovitche-1623. |
c8e4bf8 intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
This PR was merged into the 7.4 branch.Discussion----------[Form] do not install symfony/intl < 7.4| Q | A| ------------- | ---| Branch? | 7.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues || License | MITthe changes done in#61837 require#61431Commits-------badf463 do not install symfony/intl < 7.4
Uh oh!
There was an error while loading.Please reload this page.
Add the options
active_at,not_active_atandlegal_tenderfrom#61431 that give the possibility to filter the currencies more precisely. For instance:active_at(todayby default)Regarding BC compatibility, if people want to have the same results as prior 7.4, they should set the
active_atandlegal_tenderoptions to null explicitely.