-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TypeDeclaration] Only apply false type on php 8.2+ configured on TypedPropertyFromAssignsRector #3422
Conversation
Fixed 🎉 /cc @koko236 |
It seems cause error on pseudo false type test on union: There was 1 failure:
1) Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\UnionTypesRectorTest::test with data set #20
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
final class FalsePseudoType
{
- public function go($value): false|int
+ public function go($value): bool|int
{
return (int) $value ?? false; which allowed on php < 8.2 |
Fixed with handle on |
Finally 🎉 🎉 🎉 , All checks have passed 🎉 @TomasVotruba it is ready for review. |
66752f1
to
3c678c1
Compare
Rebased. |
I think there is some memory leak in paratest |
Yes, seems happened this week. I restart the build, we can back to original phpunit if it keep happening. |
Let's back to phpunit c282e62 |
Feel free to merge when ready 👍 |
…edPropertyFromAssignsRector (#3422) * [TypeDeclaration] Only apply false type on php 8.2+ configured on TypedPropertyFromAssignsRector * Fixed 🎉 * add true type fixtures * map * clean up comment * Fixed with handle in UnionTypeMapper * [ci-review] Rector Rectify * [ci-review] Rector Rectify * fix phpstan * Revert [ci-review] Rector Rectify This reverts commit f765610. * Revert [ci-review] Rector Rectify This reverts commit e3f75ec. * skip return type override on abstract Method Reflection * Fix phpstan * [ci-review] Rector Rectify * [ci-review] Rector Rectify * skip abstract class * Final touch: clean up with isInterface() check for detect all method are abstract * [ci-review] Rector Rectify * [ci-review] Rector Rectify * back to phpunit * add back RunTestsInSeparateProcesses * clean up fixture --------- Co-authored-by: GitHub Action <action@github.com>
It currently apply
false
type on php <8.2, which should only apply when configured on php 8.2+ only, ref https://getrector.com/demo/2b9d1a69-3d9d-4293-8a3d-c93f47560bf0Fixes rectorphp/rector#7809