From: benjamin dot morel at gmail dot com Operating system: N/A PHP version: Irrelevant Package: Reflection related Bug Type: Feature/Change Request Bug description:Is there a plan for adding a ReflectionParameter::getDocComment() method?
Description: ------------ I've never seen any discussion regarding the addition of a ReflectionParameter::getDocComment() method. The only mention I've found is in this post from 2005(!): http://news.php.net/php.internals/14906 This would be a very useful feature for dependency injection frameworks. For example, if you want to use annotations to configure dependency injection on the following class: class Service { public function __construct(PDO $pdo, $configuration) { } } You would need to do something like: class Service { /** * @InjectParam(name="pdo", value="database.connection") * @InjectParam(name="configuration", value="database.configuration") */ public function __construct(PDO $pdo, $configuration) { } } Whereas we could benefit from the following approach: class Service { public function __construct( /** @Inject("database.connection") */ PDO $pdo, /** @Inject("database.configuration") */ $configuration) { } } -- Edit bug report at https://bugs.php.net/bug.php?id=65056&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65056&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65056&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65056&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65056&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65056&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65056&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65056&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65056&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65056&r=support Expected behavior: https://bugs.php.net/fix.php?id=65056&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65056&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65056&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65056&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65056&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65056&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65056&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65056&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65056&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65056&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65056&r=mysqlcfg