heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Refactor Patchwork\Utf8 to UnicodeString #48

Closed rabauss closed 2 years ago

rabauss commented 2 years ago

I found the code by accident while looking for all the places with \Patchwork\Utf8 in a customer project. I'm not entirely sure about the correct refactoring of the second parameter (empty substring) of the previous Utf8::toAscii - maybe someone can test the correct behavior or do we have to add some rules to ->ascii(), don't we?

At the moment the code could fail if patchwork/utf8 is not installed - because it's no requirement of this extension!

koertho commented 2 years ago

Hi @rabauss , thanks for your contribution! I just tested it and didn't get it to return the same result. I tried the slugger from ausi and got it it working, so I will use that instead. So I will close this PR in favor of #50 . I hope you're ok with it.

rabauss commented 2 years ago

I absolutely agree with that! As I said, I wasn't sure if it will result in the same output - but the requirement was missing.

koertho commented 2 years ago

It is :) https://github.com/heimrichhannot/contao-utils-bundle/blob/f89b4927a60e7659bab70e7db4c18810d19129f7/composer.json#L9

EDIT: oh, you already saw it :D