Skip to content

[Rectify] [Php81] Enable Rectify for Return Never Type only #1381

Merged
samsonasik merged 5 commits intomainfrom
enable-return-never-type
Dec 4, 2021
Merged

[Rectify] [Php81] Enable Rectify for Return Never Type only #1381
samsonasik merged 5 commits intomainfrom
enable-return-never-type

Conversation

@samsonasik
Copy link
Copy Markdown
Member

No description provided.

@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@samsonasik samsonasik force-pushed the enable-return-never-type branch from 87d401c to 8093903 Compare December 4, 2021 12:45
@samsonasik
Copy link
Copy Markdown
Member Author

rebased.

@samsonasik samsonasik force-pushed the enable-return-never-type branch from ee50421 to 5a06104 Compare December 4, 2021 12:50
@samsonasik
Copy link
Copy Markdown
Member Author

rebased.

@TomasVotruba
Copy link
Copy Markdown
Member

Thank you, feel free to rebase and merge 👍

@samsonasik samsonasik enabled auto-merge (squash) December 4, 2021 15:38
@samsonasik samsonasik merged commit 52431ea into main Dec 4, 2021
@samsonasik samsonasik deleted the enable-return-never-type branch December 4, 2021 15:42
* @param HasOffsetType $type
*/
public function mapToPhpParserNode(Type $type, TypeKind $typeKind): ?Node
public function mapToPhpParserNode(Type $type, TypeKind $typeKind): never
Copy link
Copy Markdown
Contributor

@staabm staabm Dec 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this legal, since the return type of ?Node was part of TypeMapperInterface contract/interface?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed at #1390

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants