-
Notifications
You must be signed in to change notification settings - Fork 134
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 8 compatibility #701
Comments
I mean, PHP 8 support is certainly to be added, but no work has been done here so far because we're all quite busy with other work at the moment, so I would expect us to be somewhere close to compliance in January or such :D If the patches are QA'd properly (reads: tests + acceptable MT) and made separate, they are very welcome! 👍 |
PHP8.0 was released. |
please support PHP8, thanks |
As I mentioned above:
If you want to help out, send patches for the bullet points that @ondrejmirtes wrote above |
Marking this issue as a blocker for |
I notice that |
@huangzhhui nay: busy with other work, but please send patches, if you can help out. |
I think the result we are aiming here is to support ^7.4 and ^8.0 or do we want to drop 7.4 support? |
@DanielBadura at first |
Hello, gentlemen! Are there any ETA on when PHP8 will be supported by BR? @ondrejmirtes maybe you can work on this? Unfortunately, I don't have too much time now to maintain my libraries and |
On my end, I had almost zero time for OSS since December: trying to mostly
fit it when something work-related requires intervention.
The whole COVID situation is a massive deterrent to invest more time than
necessary in OSS, and it will likely stay like this until I'm free to leave
my home again, or else the net result will be a clear computer-related
burnout 😩
Any help in improving the lib is very welcome, and I'll certainly react to
any patches sent (review/merges).
…On Sat, Mar 27, 2021, 14:03 Alexander Lisachenko ***@***.***> wrote:
Hello, gentlemen! Are there any ETA on when PHP8 will be supported by BR?
@ondrejmirtes <https://github.com/ondrejmirtes> maybe you can work on
this? Unfortunately, I don't have too much time now to maintain my
libraries and goaop/parser-reflection is one of them which can be
replaced with BR, but if BR won't have PHP8 support soon, I might opt to
keep supporting it...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABFVEFAM6NV46ZWM6TR3JTTFXJTFANCNFSM4TEYLPDQ>
.
|
Thank you @Ocramius! I can completely understand this, no worries. It is very important to prevent OSS burn out, especially for you, as half of most popular PHP libraries were invented/developed by you, so want just to say thank you for working on all of them 👍 It's a spring time, so relax a little bit, drink your favourite beer, prepare a BBQ and of course, stay healthy! PS. There are small chances that I'll have some time for OSS, but want to work more on my own libraries and |
@kukulich Ok awesome, then let you get that in first before we divide and conquer. Unless there is something I can already start on. Have time reserved for this tomorrow so I'll also get familiar with the code and the changes Ondřej did. |
@WyriHaximus I think you can try anything based on my branch. I will try to make the build green as a start. |
@kukulich Cool, starting with |
Now that I'm working on it, will probably do the named and union type changes in one go for reflection type |
These are fixed/implemented in #750 and #752 :
|
|
|
@WyriHaximus Btw I'll try |
@kukulich Came across that in a few places already <3 |
Note: this removes BC checks, which are currently not running for PHP 8.x Ref: laminas/laminas-ci-matrix-action#59 Ref: laminas/laminas-ci-matrix-action#60 Ref: Roave/BackwardCompatibilityCheck#283 Ref: Roave/BetterReflection#701
I think we're only missing:
Then we're probably ready to go with |
Promoted properties: #785 |
Attributes: #787 |
@WyriHaximus Nope, PHP 8 is “done”. You can try to do something in PHP 8.1 - eg. intersection types :) |
@kukulich Looks like a royal pain in the ass, I'm on it |
@WyriHaximus you can start here: #767 |
@kukulich Cool will rebase it off that one later. So far it looks very similar to the work I've done on the named and union types so this could be a lot easier than I thought. |
@Ocramius @kukulich Was just looking at |
#787 is the last bit missing here, but beware that we will only support |
Closing here: we'll probably still finish up PHP 8.1 support before releasing, but all the topics in here are pretty much exhausted 👍 |
Thank you, I'm really happy about this 😊 I'm probably gonna have to devote November and December to bringing PHP 8.1 support into PHPStan, and this is gonna help me a lot 😊 |
I already did most of these steps in my fork because I want PHPStan to be ready for PHP 8 on day one or sonner.
This is what needs to be done in BetterReflection in order to fully support PHP 8:
mixed
type (ondrejmirtes@fabd259)static
type (ondrejmirtes@e6f9b72)ReflectionType::__toString
breaking change in PHP 8 - nullable type includes?
again (https://3v4l.org/CmTA1)ReflectionSourceStubber
misses to generate return types (ondrejmirtes@6a87721)isBuiltin()
is supposed to be only onReflectionNamedType
in PHP 8 (ondrejmirtes@86c5ce7)Stringable
(ondrejmirtes@e9f99da)PhpStormStubsSourceStubberTest
will fail a lot when building on PHP 8 because a lot of stuff changed between PHP 8 and PHP 7Property
node, the other based onParam
node.__construct
methods can be considered constructorsnull
as a default parameter value no longer makes the parameter type nullableThe
Stringable
commit and the obsoleted old-style constructors require anif
based on the PHP version. I did that with a public static property onBetterReflection
but a different way can be fine too.Some of these items require a new major version, but some of them can be done in a minor version before that.
I'm creating this issue because I plan to send PRs for these (in case someone isn't faster than me) but I'd like to hear your opinions first :)
The text was updated successfully, but these errors were encountered: