Fix removal of useless @param tag when string|null insteadof ?string is used.#5684
Conversation
|
I'm actually not sure about the change in
|
|
|
||
| // change alias to non-alias | ||
| $normalizedUnionType = TypeTraverser::map( | ||
| TypeTraverser::map( |
There was a problem hiding this comment.
this TypeTraverser::map from line 96 to 106 seems no longer needed, then we can see if that broke something, so we can revert early :)
There was a problem hiding this comment.
You can just remove exactly line 96 to 106, the clone seems still needed.
|
Please use git rebase instead so only your commits shown in this PR |
| return $booleanType->describe(VerbosityLevel::precise()); | ||
| } | ||
|
|
||
| $normalizedUnionType = clone $unionType; |
There was a problem hiding this comment.
the clone is somehow still needed, see error in test https://github.com/rectorphp/rector-src/actions/runs/8169922103/job/22334963648#step:5:93
| $normalizedUnionType = clone $unionType; | |
| $clonedUnionType = clone $unionType; | |
| return $clonedUnionType->describe(VerbosityLevel::precise()); |
b276474 to
098532a
Compare
…is used. Fixed by removing the "skip union types" in ParamTagRemover. This was added to fix a different bug, cause a bug in TypeHasher, where the normalized UnionType was actually overwritten by the last element in the union,
098532a to
d54f5ae
Compare
samsonasik
left a comment
There was a problem hiding this comment.
Thank you @arjenschol , I will clean up in separate PR, or revert if it cause regression
@TomasVotruba I am merging it ;)
Fixed by removing the "skip union types" in ParamTagRemover. This was added to fix a different bug, caused by a bug in TypeHasher, where the normalized UnionType was actually overwritten by the last element in the union,