Bug->Doc #73766 [Nab->ReO]: Reflection return method name as lowercases
| From: | cmb@php.net | Date: | Sat, 17 Dec 2016 00:52:36 +0000 |
| Subject: | Bug->Doc #73766 [Nab->ReO]: Reflection return method name as lowercases | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14247@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73766&edit=1
ID: 73766
Updated by: cmb@php.net
Reported by: mozek007 at seznam dot cz
Summary: Reflection return method name as lowercases
-Status: Not a bug
+Status: Re-Opened
-Type: Bug
+Type: Documentation Problem
Package: imagick
Operating System: unix
PHP Version: 7.0.14
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Okay, reopening as doc bug.
Previous Comments:
------------------------------------------------------------------------
[2016-12-17 00:39:47] mozek007 at seznam dot cz
cmb: Thanks for explaining. I think in this case is wrong phpdoc
public function readImageBlob ($image, $filename = null) {}
and web documentation: http://php.net/manual/en/imagick.readimageblob.php.
method names are case-insensitive in PHP: Yes, but united coding style not.
------------------------------------------------------------------------
[2016-12-16 23:40:00] cmb@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Note that readimageblob is the canonical name[1] and that method
names are case-insensitive in PHP, anyway.
[1] <https://github.com/mkoppanen/imagick/blob/3.4.2/imagick_class.c#L3766>
------------------------------------------------------------------------
[2016-12-16 23:36:14] mozek007 at seznam dot cz
same problem here: https://github.com/padraic/mockery/issues/162
------------------------------------------------------------------------
[2016-12-16 23:26:15] mozek007 at seznam dot cz
Description:
------------
PHP Reflection getMethod->getName return method name as lowercase.
Test script:
---------------
```
$ref = new \ReflectionClass('Imagick');
var_dump($ref->getMethod('readImageBlob')->getName()); //return lowercase value
readimageblob.
problem found here:
https://github.com/phpstan/phpstan/pull/40
Expected result:
----------------
readImageBlob
Actual result:
--------------
readimageblob
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73766&edit=1