[TypeDeclaration] Only apply false type on php 8.2+ configured on TypedPropertyFromAssignsRector#3422
Merged
samsonasik merged 22 commits intomainfrom Feb 28, 2023
Merged
Conversation
Member
Author
|
Fixed 🎉 /cc @koko236 |
Member
Author
|
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 |
Member
Author
|
Fixed with handle on |
Member
Author
|
Finally 🎉 🎉 🎉 , All checks have passed 🎉 @TomasVotruba it is ready for review. |
66752f1 to
3c678c1
Compare
Member
Author
|
Rebased. |
Member
|
I think there is some memory leak in paratest |
Member
Author
|
Yes, seems happened this week. I restart the build, we can back to original phpunit if it keep happening. |
Member
Author
|
Let's back to phpunit c282e62 |
Member
|
Feel free to merge when ready 👍 |
samsonasik
added a commit
that referenced
this pull request
May 8, 2023
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It currently apply
falsetype 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