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
Ugrade packages and add PHP 8 Support #203
Conversation
Perfect! I will spend time on merging this next week. |
This PR must go into But it seems this changes could run on PHP 7.2 or later, so it is better to keep the major version at 4. For the 5.x series, PHP 8.0 (or 8.1) or later is a good choice. It is easy to remember. See auraphp/Aura.Cli_Kernel#12 (comment)
|
Hey, any news/movement on this. Really could use this in my projects moving forward. Thanks |
If this goes 4.x, PHP 7.2 and later. auraphp/Aura.Sql#199 (comment)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This took way too long. Thanks a lot for your PR. I left some remarks. Some are questions to learn why something is changed. Hopefully we can get this released soon!
@@ -206,7 +208,7 @@ public function getUnified(string $class): Blueprint | |||
} | |||
|
|||
// fetch the values for parents so we can inherit them | |||
$parent = get_parent_class($class); | |||
$parent = class_exists($class) ? get_parent_class($class) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this extra call?
@@ -96,7 +97,7 @@ function ($val) { | |||
|
|||
return $val; | |||
}, | |||
$this->params | |||
array_values($this->params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is there reason for this extra call? Arrays are already sorted, right?
throw $re; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we want to catch that ReflectionException
? What is the use-case for that?
|
||
return false; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider making this part of the package itself, rather than only tests. I don't know if would have any value though.
@merlindiavova Thank you very much for this contribution. I added Github actions to ensure our CI process is solid again. Also just tagged 4.2.0 with the support for PHP 8.0. |
@frederikbosch I totally missed this! Sorry you had to finish it off! Glad its in nevertheless! |
@@ -18,18 +18,18 @@ | |||
} | |||
], | |||
"require": { | |||
"php": ">=7.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @kenjis as 7.2 was already there we should not change the php version. If phpunit was the reason switching to 7.4 we should use yoast polyfill.
This PR addresses a few issues regarding exceptions thrown by
get_parent_class
andReflectionClass
.As
get_parent_class
throws an error if the class names is malformed and/or does not exist, I have added aclass_exists
check before passing the class name toget_parent_class
This PR does not introduce any breaking changes. Although PHP 8 is support it uses nothing PHP 8 specific.