[Rectify] [Php81] Enable Rectify for Return Never Type only #1381
Merged
samsonasik merged 5 commits intomainfrom Dec 4, 2021
Merged
[Rectify] [Php81] Enable Rectify for Return Never Type only #1381samsonasik merged 5 commits intomainfrom
samsonasik merged 5 commits intomainfrom
Conversation
Member
Author
|
All checks have passed 🎉 @TomasVotruba I think it is ready. |
87d401c to
8093903
Compare
Member
Author
|
rebased. |
ee50421 to
5a06104
Compare
Member
Author
|
rebased. |
Member
|
Thank you, feel free to rebase and merge 👍 |
staabm
reviewed
Dec 4, 2021
| * @param HasOffsetType $type | ||
| */ | ||
| public function mapToPhpParserNode(Type $type, TypeKind $typeKind): ?Node | ||
| public function mapToPhpParserNode(Type $type, TypeKind $typeKind): never |
Contributor
There was a problem hiding this comment.
Is this legal, since the return type of ?Node was part of TypeMapperInterface contract/interface?
Member
Author
There was a problem hiding this comment.
It seems cause error on scoping https://github.com/rectorphp/rector-src/runs/4418027866?check_suite_focus=true#step:23:7
Run cd remote-repository && bin/rector list --ansi && cd ..
cd remote-repository && bin/rector list --ansi && cd ..
shell: /usr/bin/bash -e {0}
env:
COMPOSER_ROOT_VERSION: dev-main
PHP Fatal error: Declaration of Rector\PHPStanStaticTypeMapper\TypeMapper\HasOffsetTypeMapper::mapToPhpParserNode($type, $typeKind) must be compatible with Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface::mapToPhpParserNode($type, $typeKind): ?PhpParser\Node in /home/runner/work/rector-src/rector-src/remote-repository/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetTypeMapper.php on line 17
Fatal error: Declaration of Rector\PHPStanStaticTypeMapper\TypeMapper\HasOffsetTypeMapper::mapToPhpParserNode($type, $typeKind) must be compatible with Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface::mapToPhpParserNode($type, $typeKind): ?PhpParser\Node in /home/runner/work/rector-src/rector-src/remote-repository/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetTypeMapper.php on line 17
Error: Process completed with exit code 255
I will check.
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.
No description provided.