Skip to content

Conversation

@andrewnicols
Copy link
Contributor

Where an inline docblock is used in another tag, all subsequent tags are removed.

rectorphp/rector#8977

I've tried to keep this as small as possible but have deliberately incldued:

  • a text node
  • a tag before the tag containing the inline tag
  • a tag after the tag containing the inline tag
  • the tag we want to convert to attribute

@TomasVotruba
Copy link
Member

Thanks! Are all the docblock lines needed to trigger the bug? I've just tried to remove the first one, and bug remains.
The less code there is the better, as in docblock parser every line and every element is split into token we have to debug.

@andrewnicols
Copy link
Contributor Author

No - I've simplified the test to the bare minimum.

@samsonasik
Copy link
Member

@andrewnicols please remove these commited files:

  • rules-tests/CodeQuality/Rector/Class_/YieldDataProviderRector/Fixture/should_not_remove_doc_blocks.php
  • rules-tests/CodeQuality/Rector/MethodCall/UseSpecificWillMethodRector/Fixture/will.php

Where an inline docblock is used in another tag, all subsequent tags are
removed.

rectorphp/rector#8977
@andrewnicols
Copy link
Contributor Author

andrewnicols commented Jan 16, 2025

Done - Not sure how those got there. I literally cloned the repo to create these tests.

Edit: The tests themselves pollute the test fixtures directories and if you abort the test midway through you end up with these.

@samsonasik samsonasik enabled auto-merge (squash) January 16, 2025 02:10
@samsonasik samsonasik merged commit c0eaa38 into rectorphp:main Jan 16, 2025
6 checks passed
@samsonasik
Copy link
Member

Thank you @andrewnicols

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