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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: maikelvm at hotmail dot com
New email:
PHP Version: OS:

 

 [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: Thu Apr 18 01:01:28 2024 UTC