Skip to content
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

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

Closed
jimwins opened this issue Oct 29, 2024 · 4 comments
Closed

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

jimwins opened this issue Oct 29, 2024 · 4 comments

Comments

@jimwins
Copy link

jimwins commented Oct 29, 2024

$platformStr = php_uname('s r v m');

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
Copy link

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.

@jochensengier
Copy link
Contributor

You can bypass it for now by not sending platform information:

$translator = new \DeepL\Translator('YOUR_AUTH_KEY', ['send_platform_info' => false]);

@JanEbbing
Copy link
Member

Thanks for this report and sorry for the breakage. I will release 1.10.1 today which fixes this

@JanEbbing
Copy link
Member

Fixed in v1.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants