[Down_To_PHP71] Handle Downgrade Param Widening + Downgrade Reflection Get on DowngradeLevelSetList::DOWN_TO_PHP_71#3001
Conversation
|
Fixed 🎉 /cc @leoloso |
|
It seems cause error in other downgrade tests: |
|
That was soooooooooo quick!!!!!!! Thanks @samsonasik 💪 |
|
I tried manually check the It seems needs to use original node instead of latest changed type for this use case. |
|
It seems can be resolved by lookup variable from Param when exists on |
|
Using find first previous to get first from param seems need another tweaking, as the following code will not be processed correctly: use ReflectionClass;
class DowngradeParamReflectionGetAttribute
{
public function run(ReflectionClass $reflectionClass)
{
echo $reflectionClass->getFileName();
if ($reflectionClass->getAttributes()) {
return true;
}
return false;
}
}as first previous is: echo $reflectionClass->getFileName();which will be mixed type already after downgrade parameter type widening. |
|
I added check not param and stil mixed type 0dd5c08 |
|
All checks have passed 🎉 @TomasVotruba it is ready for review. |
|
It seems it will make unreliable when it reassign or unset after pull from Param, marking back to draft. |
|
Let's try tweak by re-run refactor() when node is same and phpdoc info changed |
|
The issue seems when |
28ede78 to
ca4e720
Compare
|
Let's try early refresh doc Node before refresh scope c81df9c |
|
Finally 🎉 🎉 🎉, All checks have passed 🎉 @TomasVotruba I think it is ready now 🎉 🎉 🎉 |
97cabca to
79722fe
Compare
…n Get on DowngradeLevelSetList::DOWN_TO_PHP_71
This reverts commit 9ac3242.
|
Rebased. |
…update printed Node vs update refactored node with PhpDocInfo
|
Thank you 👍 |
Fixes rectorphp/rector#7546