Skip to content

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet force-pushed the fix/xmlHandlerExtraction branch from 2250af8 to 5c5a0fd Compare September 5, 2025 09:51
@ondrejmirtes
Copy link
Member

You can see the effect of your changes here under "Show diff": https://github.com/phpstan/php-8-stubs/actions/runs/17489848300/job/49676952982?pr=129

Is it what you expect?

@@ -820,6 +821,44 @@ private function filterClassPhpDocs(Node\Stmt\ClassLike $class): Node\Stmt\Class
return $class;
}

private function filterFunctionPhpDocs(Node\Stmt\Function_ $function): Node\Stmt\Function_
{
$namespacedName = $function->namespacedName->toString();
Copy link
Member

Choose a reason for hiding this comment

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

Comment with a link to a related discussion why precisely these functions need to be fixed would be appreciated!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the comment inside the if condition if it's ok.

@VincentLanglet
Copy link
Contributor Author

You can see the effect of your changes here under "Show diff": phpstan/php-8-stubs/actions/runs/17489848300/job/49676952982?pr=129

Is it what you expect?

Diff are multiple

-/** @param callable $handler */
+/** @param callable|string|null $handler */

and this is exactly what I expect ; string|null was already supported before PHP 8.4 (and since the beginning) but the stub was incorrect in php-src.

@ondrejmirtes ondrejmirtes merged commit 6ac1096 into phpstan:main Sep 6, 2025
2 checks passed
@ondrejmirtes
Copy link
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.

2 participants