Skip to content

[Intl] Make symfony/intl more extendable #60345

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

Open
pontus-mp opened this issue May 5, 2025 · 0 comments
Open

[Intl] Make symfony/intl more extendable #60345

pontus-mp opened this issue May 5, 2025 · 0 comments
Labels

Comments

@pontus-mp
Copy link

Description

symfony/intl has quite a few static methods. It would be nice if things were less static so dependencies could be injected and classes be decorated.

This could be useful for things like tweaking the locales data without editing/patching files in vendor/symfony/intl/Resources/data (yuck!).

Example

namespace Symfony\Component\Intl;

// Maybe an interface to allow decoration?
final class Locales implements LocalesInterface {
    // Injectable BundleEntryReader, supply your own data!
    public function __construct(private BundleEntryReader $entryReader) {}
    // etc etc
}

Same for the other similar classes like Currencies.

@carsonbot carsonbot added the Intl label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants