Support a bookmark suffix on @see FQSEN references#454
Open
lacatoire wants to merge 1 commit intophpDocumentor:6.xfrom
Open
Support a bookmark suffix on @see FQSEN references#454lacatoire wants to merge 1 commit intophpDocumentor:6.xfrom
lacatoire wants to merge 1 commit intophpDocumentor:6.xfrom
Conversation
Allow '@see \\Foo::bar()#<bookmark>' so a docblock can point at a specific anchor inside the target element. The trailing '#<bookmark>' is extracted from the reference token before FQSEN resolution and stored on the Fqsen reference; an empty bookmark (trailing '#') is normalised to null. Fqsen::__toString() keeps returning the bare FQSEN so downstream consumers that feed it back into phpDocumentor\\Reflection\\Fqsen (which forbids '#') keep working. See::__toString() is aware of the bookmark on Fqsen references and re-emits it, so the full tag body round-trips through parse + render. Url references are untouched — their native fragment has always been preserved as-is.
2235352 to
59e56f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parser side of phpDocumentor/phpDocumentor#3710. Accepts
@see \\Foo::bar()#<bookmark>so a docblock can point at a specific anchor inside the target element; the#<bookmark>is extracted before FQSEN resolution and exposed viaReference\\Fqsen::getBookmark().Reference\\Fqsen::__toString()intentionally keeps returning the bare FQSEN so existing consumers that feed it back intophpDocumentor\\Reflection\\Fqsen(which forbids#) keep working.See::__toString()re-attaches the bookmark so the full tag body still round-trips through parse + render.Urlreferences are untouched.