Bug #74433 [NEW]: Wrong reflection on the Normalizer methods

From: Date: Thu, 13 Apr 2017 11:24:04 +0000
Subject: Bug #74433 [NEW]: Wrong reflection on the Normalizer methods
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208518@lists.php.net to get a copy of this message
From: fabien dot villepinte at gmail dot com Operating system: PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Bug Bug description:Wrong reflection on the Normalizer methods Description: ------------ The methods Normalizer::isNormalized() and Normalizer::normalize() expect the same parameters, input (required) and form (optional). http://php.net/manual/en/normalizer.isnormalized.php http://php.net/manual/en/normalizer.normalize.php However the number of required parameters returned by reflection is wrong (it returns 3). Test script: --------------- <?php $rm = new ReflectionMethod(Normalizer::class, 'isNormalized'); var_dump($rm->getNumberOfParameters()); var_dump($rm->getNumberOfRequiredParameters()); $rm = new ReflectionMethod(Normalizer::class, 'normalize'); var_dump($rm->getNumberOfParameters()); var_dump($rm->getNumberOfRequiredParameters()); Expected result: ---------------- int(2) int(1) int(2) int(1) Actual result: -------------- int(3) int(3) int(3) int(3) -- Edit bug report at https://bugs.php.net/bug.php?id=74433&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74433&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74433&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74433&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74433&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74433&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74433&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74433&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74433&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74433&r=support Expected behavior: https://bugs.php.net/fix.php?id=74433&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74433&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74433&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74433&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74433&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74433&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74433&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74433&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74433&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74433&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74433&r=mysqlcfg

« previous php.bugs (#208518) next »