Merged
Conversation
- Introduced `parseLocale` in `IanaSubtagRegistry` to parse locales into `ParsedTag`. - Added `getParsedTag` in `BCP47Tag` for accessing parsed tag components. - Marked `BCP47Parser` and `BCP47Normalizer` as `readonly` for immutability. - Extended test suite with cases for `ParsedTag` functionality.
- Added `parseTagInternal` to centralize `ParsedTag` creation. - Updated `parseLocale` and `isValidLocale` to reuse `parseTagInternal`, ensuring consistency. - Improved type handling and null checks in `isValidLocale`. - Updated README with examples and method documentation.
- Added `array<string>` type hints to `IanaSubtagRegistry` constructor for improved type safety. - Removed redundant condition in `BCP47Parser::parseTag` for better clarity and reduced false positives. - Updated documentation and passed all tests and PHPStan checks.
…timize lazy loading - Replaced JSON IANA registry with static PHP snapshot for zero parsing overhead - Removed symfony/intl and validator dependency (not needed after refactor) - Implemented singleton lazy loader for registry (OPcache-friendly) - Updated composer with bcp47:refresh script for manual IANA updates - Cleaned up normalizer logic (pure ABNF-based, no external fallback) - Updated README to reflect new structure and performance design - All tests green, code lighter, faster, and fully self-contained
- cleanups - test provider updates - composer lock update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seed docs/worklog.md & readme.md