Bug #78897 [NEW]: ReflectionMethod::getClosure declaration changed silently in 7.4
| From: | dinchev dot dimitar at gmail dot com | Date: | Mon, 02 Dec 2019 11:30:35 +0000 |
| Subject: | Bug #78897 [NEW]: ReflectionMethod::getClosure declaration changed silently in 7.4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224006@lists.php.net to get a copy of this message | ||
From: dinchev dot dimitar at gmail dot com
Operating system: Linux
PHP version: 7.4.0
Package: Reflection related
Bug Type: Bug
Bug description:ReflectionMethod::getClosure declaration changed silently in 7.4
Description:
------------
Since upgrading to PHP 7.4, I get the following PHP Warning:
Declaration of Go\ParserReflection\ReflectionMethod::getClosure($object)
should be compatible with ReflectionMethod::getClosure($object = NULL)
The above framework class is extending ReflectionMethod and until 7.3.x
the declaration of ReflectionMethod::getClosure($object) apparently
didn't have default null value, now making it incompatible with the
subclass declaration.
The change is not reflected in the release notes of PHP 7.4.0 or in the
current documentation:
https://www.php.net/manual/en/reflectionmethod.getclosure.php
Test script:
---------------
<?php
class ReflectionMethodSubclass extends ReflectionMethod {
public function getClosure($object) {
return parent::getClosure($object);
}
}
--
Edit bug report at https://bugs.php.net/bug.php?id=78897&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78897&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78897&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78897&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78897&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78897&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78897&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78897&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78897&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78897&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78897&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78897&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78897&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78897&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78897&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78897&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78897&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78897&r=mysqlcfg