Given the following piece of code in file src/issue-2425-a.php:
<?php
namespace Project\Sub\Level;
use Project\Other\Level\Issue2425B;
use Project\Other\Level\Issue2425C as Aliased;
/**
* Class summary.
*
* A description containing an inline {@see Issue2425B::bar()} tag
* to a class inside of the project referenced via a use statement.
*
* And here is another inline {@see Aliased::bar()} tag to a class
* aliased via a use statement.
*/
class Issue2425A {}
and this code in file src/issue-2425-b.php:
<?php
namespace Project\Other\Level;
class Issue2425B
{
public function bar() {}
}
and this code in file src/issue-2425-c.php:
<?php
namespace Project\Other\Level;
class Issue2425C
{
public function bar() {}
}
with the following config:
<?xml version="1.0" encoding="UTF-8" ?>
<phpdocumentor
configVersion="3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://www.phpdoc.org"
xsi:noNamespaceSchemaLocation="https://docs.phpdoc.org/latest/phpdoc.xsd"
>
<title>Demo</title>
<version number="latest">
<api format="php">
<source dsn=".">
<path>src</path>
</source>
</api>
</version>
<template name="default"/>
</phpdocumentor>
I'd expect the unqualified names used in the @see tags to be resolved to the fully qualified name using the import use statement and to be recognized as classes within the project for which a documentation page exists.
The unqualified names do not get resolved using the import use statement, but are using the current namespace and therefore cannot be found in the project and don't get linked properly.
php -f /path/to/phpDocumentor/bin/phpdocInvestigated the issue and it seems to be related to the passing of this value into the templates and not with the template itself. As discussed with @jaapio, I am skipping any issue not related to the templates at the moment
I pushed a first draft of the improved version to handle descriptions in a more flexible way. Now switching to some other work, because the reported issue is deeper. Nobody ever tried using aliases in see tags?
Created a second PR to fix the actual issue: https://github.com/phpDocumentor/ReflectionDocBlock/pull/226
@jaapio Thank you for all your work on this! I can't say much about the PRs themselves, but I'm excited to see this handled! :heart:
PR is merged, some pending other PR is holding me back from creating a new tag right now. But I expect this other PR to be merged soon. So we can prepare a new phpDocumentor nightly with this fixed.