DeepLcom / deepl-php

Official PHP library for the DeepL language translation API.
MIT License
202 stars 23 forks source link

mb_str_split() not supported in PHP 7.3 #34

Open Eruantron opened 11 months ago

Eruantron commented 11 months ago

The library officially provides support for PHP 7.3 and later. However, I encountered an error when using PHP 7.3.

In deepl-php/src/GlossaryEntries.php, the function mb_str_split() is utilized, but it is only compatible with PHP 7.4 and newer versions.

daniel-jones-deepl commented 11 months ago

Hi @Eruantron, thanks for creating this issue, good catch. I'm surprised we didn't catch this earlier, because we test using PHP 7.3.

We have to look into how we could fix this, but it may be too much effort. Additionally, we are planning to drop support for PHP 7.3 beginning next year, because official support for PHP 7.3 ended almost two years ago.

Eruantron commented 11 months ago

Thanks for the feedback. I already thought it doesn't make sense to rewrite it for PHP 7.3. I've postponed the PHP migration for too long anyway, and now I have another reason for the revision.