Skip to content

[Intl] Cleanup #31366

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

Merged
merged 1 commit into from
May 7, 2019
Merged

[Intl] Cleanup #31366

merged 1 commit into from
May 7, 2019

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented May 2, 2019

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

cleanup of #31365 for 3.4 + some other stuff to keep in sync across branches

'XSU' => true, // Sucre
'XDR' => true, // Special Drawing Rights
'XTS' => true, // Testing Currency Code
'XXX' => true, // Unknown Currency
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's the point of this. Constants were self explanatory, now we need a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintaining the consts is an extra task, not worth it IMHO. i didnt follow it for languages also.

feel free to ignore :) but it reduces noise and makes adding entries more straightforward (the consts are only used here; it's not real API needed)

@@ -13,7 +13,6 @@

use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
use Symfony\Component\Intl\Exception\MissingResourceException;
use Symfony\Component\Intl\Locale;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm... are you sure about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep :)

* @param string $displayLocale Optional. The locale to return the result in
* Defaults to {@link \Locale::getDefault()}.

updated as such below

it's a tiny improvement, but worth clarifying IMHO to rely on the root \Locale (either the real one, or the Intl\Locale\Locale stub.

Intl\Locale extends from \Locale and doesnt own the default, only the default fallback.

This internal, first citizent, Intl\Locale is super confusing, and is really a LocaleFallback util

@fabpot
Copy link
Member

fabpot commented May 4, 2019

@jakzal Are you ok to merge this one?

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 5, 2019
@ro0NL
Copy link
Contributor Author

ro0NL commented May 6, 2019

the sole purpose of the PR is to reduce merge conflicts, if it doesnt matter much we can close (but in master / #31365 we take a different apprach, as im really skeptical about maintaining the lists of consts :D)

@fabpot
Copy link
Member

fabpot commented May 7, 2019

Thank you @ro0NL.

@fabpot fabpot merged commit 70a941e into symfony:3.4 May 7, 2019
fabpot added a commit that referenced this pull request May 7, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Cleanup

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

cleanup of #31365 for 3.4 + some other stuff to keep in sync across branches

Commits
-------

70a941e [Intl] Cleanup
@ro0NL ro0NL deleted the intl-cleanup branch May 7, 2019 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants