Skip to content

[String] allow translit rules to be given as closure #38198

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
Sep 16, 2020

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #35061
License MIT
Doc PR -

Instead of trying to fix #35061 at our level, I propose to add a hook so that ppl can use a transliterator that fits their need (eg voku/portable-ascii or behat/transliterator) while still relying on the SluggerInterface.

@nicolas-grekas nicolas-grekas added this to the next milestone Sep 15, 2020
@nicolas-grekas nicolas-grekas changed the title [String] allow translit rules to be give as closure [String] allow translit rules to be given as closure Sep 15, 2020
@fabpot
Copy link
Member

fabpot commented Sep 16, 2020

Thank you @nicolas-grekas.

@kdambekalns
Copy link

Just a note:

Instead of trying to fix #35061 at our level, I propose to add a hook so that ppl can use a transliterator that fits their need (eg voku/portable-ascii or behat/transliterator)

That would not have helped me, as I wanted to use this instead of behat/transliterator, so plugging it in here would not have helped… at all. Anyway, somehow we could probably have worked around the issue. So, thanks.

@stof
Copy link
Member

stof commented Sep 18, 2020

@kdambekalns why do you want to use this instead of the behat package while still getting the result of the behat package ?

@kdambekalns
Copy link

@stof Back then behat/transliterator lacked a version compatible with PHP 7.4, it took them weeks… So I wanted a reliable and maintained drop-in replacement. And "drop-in replacement" required no changes in behavior. 🤷‍♂️

Right now we still use behat/transliterator, but I guess for our next major we'll switch away from it. 😎

@nicolas-grekas nicolas-grekas deleted the str-translit-closure branch October 2, 2020 13:45
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
@fabpot fabpot mentioned this pull request Oct 5, 2020
nicolas-grekas added a commit that referenced this pull request Oct 6, 2020
This PR was submitted for the master branch but it was merged into the 5.x branch instead.

Discussion
----------

[String][AsciiSlugger] Fix typo

| Q             | A
| ------------- | ---
| Branch?       | master<!-- see below -->
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |  -
| License       | MIT
| Doc PR        | -

I guess there was a little mistake on PR #38198 : In exception message it should be `$symbolsMap` instead of `$symbolMap`

;)

Commits
-------

614b8d6 [String][AsciiSlugger] Fix typo
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.

Differences in transliteration compared to behat/transliterator
5 participants