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
 [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

Pull Requests

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 Dec 26 13:01:30 2024 UTC