Skip to content

[Defluent] Skip ReturnFluentChainMethodCallToNormalMethodCallRector on possibly not return $this - #418

Merged
TomasVotruba merged 7 commits into
mainfrom
skip-possibly-not-return-this
Jul 10, 2021
Merged

[Defluent] Skip ReturnFluentChainMethodCallToNormalMethodCallRector on possibly not return $this#418
TomasVotruba merged 7 commits into
mainfrom
skip-possibly-not-return-this

Conversation

@samsonasik

Copy link
Copy Markdown
Member

By using existing ReturnTypeInferer service.

…Rector on possibly not return $this"

This reverts commit b312569.
…thodCallRector on possibly not return $this""

This reverts commit 0c0d1c9.
@samsonasik

Copy link
Copy Markdown
Member Author

@TomasVotruba packages tests error seems unrelated as I tested with revert change and it keep get same error:

97) Rector\Nette\Tests\Rector\Property\NetteInjectToConstructorInjectionRector\NetteInjectToConstructorInjectionRectorTest::test with data set #7 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
4735
RangeException: The lexer returned an invalid token (id=38, value=&)

@TomasVotruba

TomasVotruba commented Jul 10, 2021

Copy link
Copy Markdown
Member

I think it might be broken by new phpstan - https://github.com/phpstan/phpstan/releases/tag/0.12.92

Could you lock it in composer.json to 0.12.91?

Downgrade to 0.12.91 in rector-symfony helped tests to pass

@samsonasik

Copy link
Copy Markdown
Member Author

@TomasVotruba thank you, it seems pin to phpstan 0.12.91 make it works 🎉 , I temporary set CI packages test to use "rector/rector-src:dev-skip-possibly-not-return-this as 0.11.15" to make CI run https://github.com/rectorphp/rector-src/pull/418/files#diff-390c8e75450c4c39e24e2e9df7686f35822b34b1eec6832aa3a8f415614773f9R50

@samsonasik

Copy link
Copy Markdown
Member Author

packages_tests.yaml needs to be reverted after merge.

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba
TomasVotruba merged commit 85ae8dc into main Jul 10, 2021
@TomasVotruba
TomasVotruba deleted the skip-possibly-not-return-this branch July 10, 2021 17:19
@TomasVotruba

Copy link
Copy Markdown
Member

Done 👍

@samsonasik

Copy link
Copy Markdown
Member Author

Reverting packages_tests.yaml at #419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants