Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace abandoned patchwork/utf8 dependency #2548

Closed
Shadow-Devil opened this issue Nov 3, 2024 · 3 comments
Closed

Replace abandoned patchwork/utf8 dependency #2548

Shadow-Devil opened this issue Nov 3, 2024 · 3 comments
Milestone

Comments

@Shadow-Devil
Copy link
Contributor

It would be great to replace the patchwork/utf8 dependency since it is abandoned.
It is only used four times in the DC_ProductData file to sort some $options_sorter:

        // Sort by option values
        uksort($options_sorter, array(Utf8::class, 'strnatcasecmp'));

There also exists the strnatcasecmp function directly in PHP, but I am unsure if it works the same for non ASCII characters (and if thats even relevant).

If this can simply be replaced then I can also create a PR for this.

@aschempp
Copy link
Member

aschempp commented Nov 4, 2024

@leofeyer @ausi any idea what we replaced that with in Contao core?

@leofeyer
Copy link
Contributor

leofeyer commented Nov 4, 2024

Yes:

See https://github.com/contao/contao/blob/4.13/core-bundle/src/Resources/contao/drivers/DC_Table.php#L5351-L5362

@aschempp
Copy link
Member

aschempp commented Nov 5, 2024

Fixed in 31bcc53

@aschempp aschempp closed this as completed Nov 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants