Skip to content

Conversation

janedbal
Copy link
Member

@janedbal janedbal commented Mar 5, 2025

Since phpstan/phpstan-src#3853, following assignment:

interface SomeInterface {}
class SomeClass {}

function test(SomeInterface & SomeClass $classWithInterface) {
    $classWithInterface = new SomeClass();
}

no longer passes the old condition as those are false:

$previousVariableType->isSuperTypeOf($newVariableType)->yes(); // false
$newVariableType->isSuperTypeOf($previousVariableType)->yes(); // false

@janedbal
Copy link
Member Author

Logic kept, superseded by #296

@janedbal janedbal closed this Mar 10, 2025
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.

1 participant