[PSR-19] Allow FQSEN in @link

51 views
Skip to first unread message

Alexander Makarov

unread,
May 14, 2019, 7:28:54 AM5/14/19
to PHP Framework Interoperability Group
Currently in @see tag FQSEN is allowed: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#512-see but it's not allowed in @link https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#56-link so there's no way to reference a class in the description such as:

By default, {@link \Yii::$container} refers to a Container instance which is used by {@link \Yii::createObject()} to create new object instances.

For Yii we've invented our own syntax but we'd like to switch to standard one:

By default, [[\Yii::$container]] refers to a Container instance which is used by [[\Yii::createObject()]] to create new object instances.

Google user

unread,
May 15, 2019, 11:27:50 AM5/15/19
to PHP Framework Interoperability Group
why at all do you want to use the @link tag and don't want to use @see tag?
The @see tag indicates a reference from the associated "Structural Elements" to a website or other "Structural Elements".
The @link tag indicates a custom relation between the associated "Structural Element" and a website, which is identified by an absolute URI.
as we can see, the @link tag should be used for uris, and @see tag - for structural elements. why you want to use @link tag for a structural element?

or do you mean that you cannot use the @see tag inside a description using the inline syntax? then why don't you propose to allow the inline syntax for @see tag?

otherwise, are you just proposing to make the @link tag just an alias to the @see tag? what will be the difference between them if php-fig will implement your proposition? i see no difference at all. can you point it out for me please?

Alexander Makarov

unread,
May 19, 2019, 6:51:25 PM5/19/19
to PHP Framework Interoperability Group
Yes. We need both structural element links and regular links in the description. Thanks for the link to the thread. That is exactly what we need.
Reply all
Reply to author
Forward
0 new messages