Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 1, 2024

@staabm staabm marked this pull request as ready for review September 1, 2024 08:28
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

Also implementing other casts would be cool as hell in a follow up PR :)

public function getFilePath(): string|false;
}

function bug7685(Reader $reader): void {
Copy link
Member

Choose a reason for hiding this comment

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

Extremely cool! But please follow the usual convention for regression tests - one file per issue, with bug-xxx.php filename and namespace. I'm used to look for them in this format.

@ondrejmirtes ondrejmirtes merged commit 39892b6 into phpstan:1.12.x Sep 1, 2024
488 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the narrow-cast branch September 1, 2024 20:04
alexander-schranz pushed a commit to sulu/skeleton that referenced this pull request Nov 19, 2024
…7. (#258)

* Bump phpstan/phpstan to ^1.12

This includes a fix to issue phpstan/phpstan#7685 "Cast to (bool) on string|false !== false should end in non-empty-string"

* Remove @phpstan-ignore-next-line from config/router.php

Since phpstan v1.12.1 the related issue is fixed.
phpstan/phpstan#7685
phpstan/phpstan-src#3380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants