DeepLcom / deepl-php

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

php_uname() only works with a single character string #54

Open jimwins opened 2 hours ago

jimwins commented 2 hours ago

https://github.com/DeepLcom/deepl-php/blob/fdf86cce24718d0ca4fa237e809951ec0d4835a8/src/Translator.php#L761

This has never worked as apparently hoped, it has always just used the first character from the string, and in PHP 8.4 will throw a ValueError when more than one character is specified like this.

Originally reported as a bug against PHP at php/php-src#16641 by @that-guy-iain.

that-guy-iain commented 2 hours ago

A breaking change in php-src still needs to be fixed. The documentation suggests that the string should work and there are unknown companies that may be using that string. And their code will be affected by a breaking change which was never mentioned anywhere in RFCS and would need the documentation to be quietly changed to pretend that this didn't happen. Breaking changes are bad and quietly changing documentation is even worse.