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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Wed May 01 07:01:30 2024 UTC