Skip to content

MethodExtensions class-name is case-insensitive#2562

Merged
ondrejmirtes merged 3 commits intophpstan:1.10.xfrom
staabm:bug9714_2
Aug 5, 2023
Merged

MethodExtensions class-name is case-insensitive#2562
ondrejmirtes merged 3 commits intophpstan:1.10.xfrom
staabm:bug9714_2

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Aug 2, 2023

@staabm staabm changed the base branch from 1.11.x to 1.10.x August 2, 2023 19:42
@phpstan-bot
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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

$returnType = $closure->call($newThis, new class {});
assertType('true', $returnType);

$staticallyBoundClosureCaseInsensitive = \closure::bind($closure, $newThis);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

test DynamicStaticMethodReturnTypeExtension


public function dateTimeZoneDoesNotThrowCaseInsensitive(): void
{
new \DaTetImezOnE('UTC');
Copy link
Copy Markdown
Contributor Author

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);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

test DynamicMethodReturnTypeExtension-case

@staabm staabm marked this pull request as ready for review August 3, 2023 08:48
@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 1c9e90f into phpstan:1.10.x Aug 5, 2023
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you.

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.

3 participants