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

Increase minimum supported PHP version to 5.4 #4554

danielbachhuber opened this Issue Dec 6, 2017 · 1 comment


3 participants

danielbachhuber commented Dec 6, 2017

Once v1.5.0 is released, we'll want to increase the minimum supported PHP version to 5.4 in:

  • Travis builds on main project.
  • Travis builds on packages.
  • Composer require.
  • Documentation.

See announcement.


This comment has been minimized.


swissspidy commented Jan 22, 2018

The version requirement has come up today in wp-cli/i18n-command#16. I agree with @schlessera that we might need to reinvestigate how to deal with this. Not only for the bump to 5.4, but also for future requirement changes.

For example, the i18n command might consist of multiple sub commands in the future, only one of which has a hard requirement for PHP 5.4 so far. This is being checked using the before_invoke argument. However, that one sub command also relies on a composer package which requires PHP 5.4 or higher.

Now, if you're on PHP 5.3 and still want to use all other i18n commands, you can't do that because of the composer dependency. Alain mentioned that installing WP-CLI over Composer would also break on PHP 5.3 in this case because of the version mismatch (assuming the i18n command is bundled with WP-CLI).

The only solution I can think of right now would be to use --ignore-platform-reqs for the build. This way, you can still use all of the PHP 5.3 commands while the 5.4 command does not work because of before_invoke. If it's a non-bundled package, users will need to use --ignore-platform-reqs as well when trying to manually install it (given that their also using PHP 5.3). I'm not familiar with the build / distribution process, so bear with me 🙂

In addition to that, the packages could also explicitly specify their minimum required PHP version (or even the WP-CLI version if needed. Using * is always tricky). in composer.json to make things more clear during installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment