php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43770 docblock templates with getDocComment()
Submitted: 2008-01-06 15:51 UTC Modified: 2018-09-29 17:08 UTC
From: maikelvm at hotmail dot com Assigned:
Status: Wont fix Package: Reflection related
PHP Version: * 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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
16 + 21 = ?
Subscribe to this entry?

 
 [2008-01-06 15:51 UTC] maikelvm at hotmail dot com
Description:
------------
Can the use of docBlock templates be included when the getDocComment() is called?

Reproduce code:
---------------
class SomeClass {

 /**#@+
   * @access public
   */

 /**
   * @return string
   */
 public function someMethod() { return "" }

 /**#@-*/
}
$o = new ReflectionMethod("SomeClass","someMethod");
echo $o->getDocComment();

Expected result:
----------------
/**
  * Comments...
  * @access public
  * @return string
  */

Actual result:
--------------
/**
  * Comments...
  * @return string
  */

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-09 01:02 UTC] ajf@php.net
-Package: Feature/Change Request +Package: Reflection related
 [2015-01-09 01:02 UTC] ajf@php.net
-Operating System: windows +Operating System: * -PHP Version: 5.2.5 +PHP Version: *
 [2018-09-29 17:08 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2018-09-29 17:08 UTC] nikic@php.net
Phpdoc templates are rarely used, not widely supported by tooling, and absent from contemporary phpdoc specifications. Supporting this feature as described would require us to implement partial phpdoc processing inside PHP core (while currently we just return the doc comment as given). With that in mind, I think I can safely say that we will not support this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 13:01:31 2024 UTC