- Issue created by @andypost
- Merge request !7839[PHP 8.4] ReflectionMethod costructor deprecated with one argument #3444264 → (Closed) created by andypost
- Issue was unassigned.
- Status changed to Needs review
7 months ago 3:16am 30 April 2024 - Status changed to RTBC
7 months ago 1:32pm 30 April 2024 - 🇺🇸United States smustgrave
Seems straight forward.
Should it be tagged 8.4 though?
- 🇫🇷France andypost
No, this change was applied since 8.3 but the pointed issue did not check that
- 🇬🇧United Kingdom alexpott 🇪🇺🌍
Committed and pushed aa2830b3b1 to 11.x and 40898b6120 to 10.3.x. Thanks!
-
alexpott →
committed 40898b61 on 10.3.x
Issue #3444264 by andypost: [PHP 8.4] ReflectionMethod constructor...
-
alexpott →
committed 40898b61 on 10.3.x
- Status changed to Fixed
7 months ago 2:40pm 30 April 2024 -
alexpott →
committed aa2830b3 on 11.x
Issue #3444264 by andypost: [PHP 8.4] ReflectionMethod constructor...
-
alexpott →
committed aa2830b3 on 11.x
- Status changed to Needs work
7 months ago 10:30pm 30 April 2024 - 🇬🇧United Kingdom longwave UK
Reverted this, as PHPStan complains in 10.3.x:
Line core/lib/Drupal/Component/Utility/ArgumentsResolver.php ------ --------------------------------------------------------- 126 Call to an undefined static method ReflectionMethod::createFromMethodName().
Also in 11.x we don't need the
PHP_VERSION_ID
check, the minimum is PHP 8.3 there. -
longwave →
committed 774dcb1b on 10.3.x
Revert "Issue #3444264 by andypost: [PHP 8.4] ReflectionMethod...
-
longwave →
committed 774dcb1b on 10.3.x
-
longwave →
committed 65e7a1ef on 11.x
Revert "Issue #3444264 by andypost: [PHP 8.4] ReflectionMethod...
-
longwave →
committed 65e7a1ef on 11.x
- Status changed to Downport
7 months ago 10:31pm 30 April 2024 - 🇺🇸United States xjm
Better status I guess; it needs to be built for the branch rather than cherry-picked.
- Status changed to Needs work
7 months ago 10:34pm 30 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Bah - PHPStan should be able to work out the version check... anyhow +1 for the reverts... typically that something that seems simple turns out to not.
- 🇫🇷France andypost
Maybe phpstan is not using 8.3 as minimally allowed, otherwise how it possible?
Ref the failed job https://git.drupalcode.org/project/drupal/-/jobs/1481141
- 🇫🇷France andypost
https://www.php.net/manual/en/reflectionmethod.createfrommethodname
since 8.3, and the RFC, probably the issue in phpstan but 11.x surely should not have condition
- Merge request !7864[PHP 8.4] ReflectionMethod constructor deprecated with one argument #3444264 → (Closed) created by andypost
- 🇫🇷France andypost
- Merge request !7865[PHP 8.4] ReflectionMethod constructor deprecated with one argument #3444264 → (Closed) created by andypost
- 🇫🇷France andypost
reported upstream https://github.com/phpstan/phpstan/issues/10954
- Status changed to Needs review
7 months ago 10:27am 1 May 2024 - 🇫🇷France andypost
Maintainers suggested https://github.com/phpstan/phpstan/issues/10954#issuecomment-2088522792
https://phpstan.org/r/690e2da6-8ad3-4f61-9442-d22971dc836d
$callable = "ReflectionMethod::__construct"; if (method_exists(\ReflectionMethod::class, 'createFromMethodName')) { echo "PHP 8.3\n"; $m = \ReflectionMethod::createFromMethodName($callable); } else { echo "older\n"; $m = new \ReflectionMethod($callable); }
- Status changed to RTBC
7 months ago 1:50pm 7 May 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
@smustgrave nope - the messages on the issue about reverts and commits from 11.0.x are the wrong way around.
- Status changed to Fixed
7 months ago 3:12pm 7 May 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Committed and pushed 152b7f0694 to 11.x and a6b7ab7388 to 11.0.x. Thanks!
Committed 9c5eeca and pushed to 10.4.x. Thanks!
Committed 6871694 and pushed to 10.3.x. Thanks!I don't think we should do the suggestion with method exists as this is called a lot - so doing the ignore in PHPStan and the version check in 10.x seems fine.
-
alexpott →
committed 6871694d on 10.3.x
Issue #3444264 by andypost, alexpott, longwave: [PHP 8.4]...
-
alexpott →
committed 6871694d on 10.3.x
-
alexpott →
committed 9c5eecad on 10.4.x
Issue #3444264 by andypost, alexpott, longwave: [PHP 8.4]...
-
alexpott →
committed 9c5eecad on 10.4.x
-
alexpott →
committed a6b7ab73 on 11.0.x
Issue #3444264 by andypost, alexpott, longwave: [PHP 8.4]...
-
alexpott →
committed a6b7ab73 on 11.0.x
-
alexpott →
committed 152b7f06 on 11.x
Issue #3444264 by andypost, alexpott, longwave: [PHP 8.4]...
-
alexpott →
committed 152b7f06 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.