-
Notifications
You must be signed in to change notification settings - Fork 25
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
Improve PHP 8.3 Support #545
Conversation
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.
Looks like upstream PhpStan updates have identified more issues that should be addressed which are not related to the changes here. @thelovekesh is this something you can investigate?
php: ['8.1','8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6'] | ||
php: ['8.2', '8.1', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6'] |
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 is dropping 8.0
since it is redundant with the include
below?
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.
Exactly!
@@ -330,6 +330,7 @@ private function reset() | |||
* parameters if an int or string is passed. Defaults to an empty array. | |||
* @return bool true on success or false on failure. | |||
*/ | |||
#[\ReturnTypeWillChange] |
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.
So without this, PHP 8.3 was issuing a warning? Is this needed because DOMDocument::loadHTML()
is now defined as strictly returning bool
with type declaration, whereas here we omit the type for back-compat with older PHP? If so, we could alternatively just add the type declarations since we're now only using PHP 7.4 in the AMP plugin and Web Stores plugin. But then we'd need to update:
Line 7 in c79a0fe
"php": "^5.6 || ^7.0 || ^8.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.
Yes it‘s because of the changed return type in 8.3.
Types could be added indeed, though perhaps best to do that separately.
Previously: