Behat: 3.4 breaks compat with PHP 5.3

Created on 21 Sep 2017  路  5Comments  路  Source: Behat/Behat

The 3.4 release uses the callable typehint in MixedArgumentOrganiser, which breaks support for PHP 5.3.

While dropping support for PHP 5.3 is fine with me, doing it without telling composer about it is not.
If the composer.json says that the release wants 5.4+, Composer will ensure to use an older version of Behat when running on 5.3. If the composer.json still advocates support for 5.3, we force users to manage their dependencies by hand again.

Most helpful comment

I see only 2 ways to fix this:

  • make a new 3.4.x release which is actually compatible with PHP 5.3, so that the highest version selected by Composer actually works (and then drop support properly in a later version of Behat)
  • rewrite the history to change the composer.json of the 3.4.0 and 3.4.1 releases (just deleting the tags won't help, as it is very easy to re-add them by mistake in the future due to the way Git works; tags are not meant to be deleted after they got shared; and rewriting tags is also painful).

And btw, this is a good example of why keeping composer support for a PHP version when we don't have CI for it anymore is a bad idea. Compatibility will get broken without seeing it, and then we would be lying to Composer (and so hurting our users). Dropping compat properly actually has less impact on users.

All 5 comments

Really we need to fix it.

If 3.4.1 disallows PHP 5.3 users, they'll still get 3.4.0 installed

I think dropping older version support explicitly is a good idea in future though (even 3.4.2)

I see only 2 ways to fix this:

  • make a new 3.4.x release which is actually compatible with PHP 5.3, so that the highest version selected by Composer actually works (and then drop support properly in a later version of Behat)
  • rewrite the history to change the composer.json of the 3.4.0 and 3.4.1 releases (just deleting the tags won't help, as it is very easy to re-add them by mistake in the future due to the way Git works; tags are not meant to be deleted after they got shared; and rewriting tags is also painful).

And btw, this is a good example of why keeping composer support for a PHP version when we don't have CI for it anymore is a bad idea. Compatibility will get broken without seeing it, and then we would be lying to Composer (and so hurting our users). Dropping compat properly actually has less impact on users.

There aren't many places that php 5.3 are failing, so it's probably best to fix those -- I think the idea of re-writing history is wrong, but it may also cause strange issues to folk who have older versions cached by Composer.

+1 for making a new release with the 5.3 fixes in place and watched by CI, followed by a proper deprecation in the 3.5 or 4, whichever comes first.

I agree that rewriting history is a bad idea.

Removed the typehint

Was this page helpful?
0 / 5 - 0 ratings

Related issues

beeblebrox3 picture beeblebrox3  路  8Comments

RynnHeldeD picture RynnHeldeD  路  5Comments

RusHiiii picture RusHiiii  路  6Comments

patxi1980 picture patxi1980  路  9Comments

mdrost picture mdrost  路  4Comments