Bug #74433 [Opn->Csd]: Wrong reflection on the Normalizer methods

From: Date: Thu, 13 Apr 2017 12:22:57 +0000
Subject: Bug #74433 [Opn->Csd]: Wrong reflection on the Normalizer methods
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208522@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74433&edit=1 ID: 74433 Updated by: krakjoe@php.net Reported by: fabien dot villepinte at gmail dot com Summary: Wrong reflection on the Normalizer methods -Status: Open +Status: Closed Type: Bug Package: Unknown/Other Function PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of fabien.villepinte@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=f05d74feb886acfd9c9828158ff9af532ff4a75f Log: Fixed bug #74433 Wrong reflection on the Normalizer methods Previous Comments: ------------------------------------------------------------------------ [2017-04-13 11:24:04] fabien dot villepinte at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=74433&edit=1

« previous php.bugs (#208522) next »