Phpdocumentor: Local file support in @see and @link

Created on 20 Feb 2013  路  8Comments  路  Source: phpDocumentor/phpDocumentor

It would be great if I could link to local (e.g. Markdown) files, which would get included into the documentation.

For example inside package, classes and methods I could use something like

@link Documentation/Guide/How-to-use-lala.md Guide on using lala

I think I can remember that it was supported in phpDoc 1.x, but it seems to be gone in 2.x.

enhancement

Most helpful comment

Any news on this?

All 8 comments

As far as I know relative links were not supported and it wasn't possible to include such files other than with the tutorial functionality (@ashnazg: is this correct).

We definitely want to be able to include external documents in the documentation, I will get back to this at a later moment (might be after 2.0 is released as we cannot add this before the 2.0 release!)

Any news on this?

ping @mvriel

We will implement this in the future. But currently our focus is on support for php7 features.

In VSCode I'm using this extension and it works pretty well.
image

Lets me just click on @link project://templates/somefile.twig

Ok, so well in 2019.

Seems like this has been partially implimented in version 2018.3

If I have a comment like this at the top of a file:

<?php
/**
 * Template for something.
 * @see Foo\Controller\Bar::assign_form()
 */

I can see a link when I Ctrl + hover over Foo or Controller but when I hover over Bar or assign_form it says "Cannot find decleration to go to" even though that class and method exists.

Any ideas?

@dahousecat most likely your namespace is not a subset of the file its in.
e.g. I suppose you need to add a beginning backslash

 * @see \Foo\Controller\Bar::assign_form()

+1 Linking to relative local files would be excellent,

 * @see docs/markdown.md

+1. My use case is to be able to link to config files.

/**
 * @var array - Refer config/service.php
 */
protected $serviceCfg;

A @see config/service.php directive would have been good.

Was this page helpful?
0 / 5 - 0 ratings