Skip to content

Add TOKEN_PHPDOC_INLINE_TAG - #298

Open
kubawerlos wants to merge 5 commits into
phpstan:2.6.xfrom
6b7562617765726c6f73:add_TOKEN_PHPDOC_INLINE_TAG
Open

kubawerlos wants to merge 5 commits into
phpstan:2.6.xfrom
6b7562617765726c6f73:add_TOKEN_PHPDOC_INLINE_TAG

Conversation

@kubawerlos

Copy link
Copy Markdown
Contributor

@ondrejmirtes ondrejmirtes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone modifies inlineTags in PhpDocTextNode, we should be able to properly support it in the format-preserving printer. Please add some cases to dataPrintFormatPreserving.

Comment thread src/Printer/Printer.php
}

$pos = $startPos;
$listResult = $this->printArrayFormatPreserving(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting with /** before {@link Foo} after */, I changed the cloned text to changed {@link Target} after and the inline tag’s value to Target. printFormatPreserving() returned /** before {@link Target} after */. Each edit works on its own. Could you add a test for the combined edit so the new prose survives too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sinkleberg fixed, thanks

@kubawerlos
kubawerlos changed the base branch from 2.3.x to 2.6.x December 5, 2026 07:49
@kubawerlos
kubawerlos force-pushed the add_TOKEN_PHPDOC_INLINE_TAG branch from 285f2a0 to 565251a Compare December 5, 2026 07:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants