php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67975 Support for method naming resolution
Submitted: 2014-09-08 09:01 UTC Modified: 2021-09-20 14:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mkurczew at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.6.0 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
14 + 9 = ?
Subscribe to this entry?

 
 [2014-09-08 09:01 UTC] mkurczew at gmail dot com
Description:
------------
PHP 5.5.0 introduced ::class, which allows people to write nice unit tests that don't rely on magic strings. However, there is no way to reference a method or function in similar fashion, so in reality most of unit tests still need to rely on magic strings. Having such feature would prevent issues like https://github.com/sebastianbergmann/phpunit-mock-objects/issues/12 from appearing, and could tell me if I'm doing something wrong the second PHP finishes parsing my script's syntax.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-28 14:59 UTC] nikic@php.net
-Package: Reflection related +Package: Scripting Engine problem
 [2021-09-20 14:59 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-09-20 14:59 UTC] cmb@php.net
As of PHP 8.1.0, there will be a first-class callable syntax[1].

[1] <https://wiki.php.net/rfc/first_class_callable_syntax>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC