async-interop / event-loop

An event loop interface for interoperability in PHP.
MIT License
170 stars 9 forks source link

Minimum PHP Version #2

Open AndrewCarterUK opened 8 years ago

AndrewCarterUK commented 8 years ago

Let's open this can of worms!

Do we (or could we) need or want any of the features in PHP 7?

bwoebi commented 7 years ago

In general, as long as we do not pay a high price for doing it [We don't.], I see no issue with supporting at least 5.6.

Especially as 5.6 support will only end simultaneously with 7.0 support in December 2018, there's no point in favoring the one over the other.

davidwdan commented 7 years ago

If requiring 7.0 will hold up v1 of this spec, I'm in favor of leaving it the way it is.

bwoebi commented 7 years ago

2 is something where we just need a decision, I don't think it's something we can solve through discussion.

I agree with @kelunik there. Can we please just have a vote here?

If you agree to not change anything (i.e. PHP 5), please vote 👍 Otherwise, if you prefer PHP 7, please vote 👎

ping @assertchris @jsor @kelunik @trowski @WyriHaximus

kelunik commented 7 years ago

I guess that's a clear enough result.

kelunik commented 7 years ago

Do we have anything that requires PHP 5.5? callable is 5.4, but anything only available on 5.5?

kelunik commented 7 years ago

Currently we use finally, which requires PHP 5.5, but we could change that.

@jsor @clue @WyriHaximus Which version of PHP will react/promise and react/event-loop target with the next version? Still 5.4 like react/promise currently?

WyriHaximus commented 7 years ago

@kelunik Currently everything is 5.4, we have plans for PHP 7 this years starting with the loop and work outwards from there, but @jsor can tell us more what PHP 7 should come to react/promise /cc @clue

kelunik commented 7 years ago

If Amp requires 7.0 and React will require 7.0, then it makes sense to go to 7.0 directly and add scalar types.

clue commented 7 years ago

I'm not trying to cast a vote, but here's how React handles this currently:

Currently, React recommends running PHP 7+ and requires the PHP version with the features it actually requires. This tends to be PHP 5.3 or PHP 5.4, depending on the Component.

There is ongoing effort to target PHP 7+ only in future versions, but expect this to take some time, as the project cares about the existing user base :+1: Also, React will very likely keep supporting older releases for some time (possibly in some sort of maintenance mode).

Crell commented 7 years ago

Brief reminder: As far as the spec is concerned, only features that would be used by the interfaces are relevant. So finally isn't relevant to the spec, and thus to the version the spec targets. Scalar types in method signatures, return types, variadics, those would matter. Would those be of benefit to the spec? I don't know, that's not my call. :smile: But if they would be, go ahead and depend on PHP 7. The uptake on it has been quite good so far so I would support that if it would help the spec. (Don't do it just "on principle", but do it if it would be of use.)

kelunik commented 7 years ago

@Crell The Loop accessor is part of the spec and currently uses finally.

kelunik commented 7 years ago

Major frameworks will drop support for PHP 5: https://thephp.cc/neuigkeiten/2016/12/php-5-active-support-ends-now-what