New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MethodExtensions class-name is case-insensitive #2562
Conversation
You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x. |
@@ -544,3 +544,35 @@ public function doBar(string $s) | |||
} | |||
|
|||
} | |||
|
|||
class TestCaseInsensitiveClassNames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was no exisiting bug to fix for the throw-type-extension case.. but adding test coverage can not hurt
tests DynamicMethodThrowTypeExtension
@@ -18,3 +18,6 @@ | |||
|
|||
$returnType = $closure->call($newThis, new class {}); | |||
assertType('true', $returnType); | |||
|
|||
$staticallyBoundClosureCaseInsensitive = \closure::bind($closure, $newThis); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test DynamicStaticMethodReturnTypeExtension
@@ -95,4 +95,9 @@ public function dateTimeZoneDoesThrows(string $tz): void | |||
new \DateTimeZone($tz); | |||
} | |||
|
|||
public function dateTimeZoneDoesNotThrowCaseInsensitive(): void | |||
{ | |||
new \DaTetImezOnE('UTC'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test DynamicStaticMethodThrowTypeExtension
{ | ||
$xml = new \SimpleXmlElement(''); | ||
$elements = $xml->xpath('//data'); | ||
assertType('array<SimpleXmlElement>', $elements); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test DynamicMethodReturnTypeExtension-case
This pull request has been marked as ready for review. |
Thank you. |
refs phpstan/phpstan#9714 (comment)