Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Intl] Make symfony/intl more extendable #60345

Open
@pontus-mp

Description

@pontus-mp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions