Repository navigation
Support portable-ascii 1.x on 8.0.x - #17
Merged
Merged
Conversation
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.
Allows
voku/portable-ascii1.x on the8.0.xline (^1.6.1 || ^2.0), for release as8.0.4.Laravel 7 and 8 require portable-ascii 1.x, while every 8.x line of this package required 2.x, so
pharaonic/php-slugifycould not be installed next to them. This blockspharaonic/laravel-sluggable7.x and 8.x.Same output with 1.x and 2.x
Comparing every BMP letter (49,638) across every portable-ascii language, 1.x and 2.x differ on only a few letters:
پ(binstead ofp) and the Cyrillicё ъ ы э ю я. 1.x also turnsэintoe', which split words:Мэрgaveme-r.fa(پ,ج),uk(16 letters, already covered by the Ukrainian override) andlatin(4 letters).When 1.x is installed,
PortableAsciiTransliteratorreplaces those letters with the 2.x result before calling portable-ascii. Generic replacements are skipped where the language has its own entry, sorukeepsyolka. The table lives insrc/Resources/portable-ascii-1.php. Detection is a single cached check (پ→bonly on 1.x), and nothing changes when 2.x is installed.After the change, the same comparison gives 0 differences, and the test suite (including the locale corpus) passes on both 1.6.1 and 2.1.1. The CI
lowestdependency jobs now run on 1.6.1.Note on portable-ascii 2.1
portable-ascii 2.1 has a fast path for strings up to 64 bytes that gives different results from its full path on longer strings when no locale is set (
ёлка+ 40 letters →elka, + 60 letters →iolka). This change matches the per-letter results, which is also what the corpus expects. With 1.x, the result no longer depends on the string length.The CHANGELOG has an
8.0.4entry, and the installation docs list both versions.