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

Why PHP >= 7.2 for Gettext v5? #270

Open
drzraf opened this issue Jul 9, 2021 · 1 comment
Open

Why PHP >= 7.2 for Gettext v5? #270

drzraf opened this issue Jul 9, 2021 · 1 comment

Comments

@drzraf
Copy link

drzraf commented Jul 9, 2021

As per wp-cli/i18n-command#217, WP-Cli i18n-command still use v4 (which does not provide Twig scanner, among others) because it stick to package supporting PHP 5.6. What is itself a consequence of wp-cli requirements regarding WP core which tend to support old version of PHP for a long time.

I wonder why exactly, in October 2019, f6ca83d bumped the mimimum requirements to PHP 7.2? Isn't the codebase/testsuite compatible with PHP 5.6 at all? And if it is, is lowering the min version back to 5.6 feasible?

@drzraf drzraf changed the title Why PHP 7.2 for v5 Why PHP >= 7.2 for v5? Jul 9, 2021
@drzraf drzraf changed the title Why PHP >= 7.2 for v5? Why PHP >= 7.2 for Gettext v5? Jul 9, 2021
@oscarotero
Copy link
Member

Gettext v5 requires PHP 7.2 because it uses some PHP syntax features not available in older versions:

  • scalar type declarations
  • return type declarations
  • nullable types & void type
  • etc

So it's not feasible to back to 5.6 and nether 7.0 (maybe 7.1, but not sure). Anyway, 7.2 is right now an old and unmaintained version, so it's recommended to use, at least 7.3.

I understand the frustration of being stuck to an old version of PHP due WP policies (PHP 5.6 is not supported since more than 2.5 years ago). Maybe wp-cli shouldn't have the same requirements as WP due the end-user is different (I guess wp-cli is for developers). Anyway, it's just my opinion :)

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

2 participants