Skip to content

Make array_map understand union of callables.#2902

Merged
ondrejmirtes merged 2 commits intophpstan:1.10.xfrom
mad-briller:array-map
Feb 20, 2024
Merged

Make array_map understand union of callables.#2902
ondrejmirtes merged 2 commits intophpstan:1.10.xfrom
mad-briller:array-map

Conversation

@mad-briller
Copy link
Copy Markdown
Contributor

@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.

@mad-briller mad-briller changed the base branch from 1.11.x to 1.10.x February 2, 2024 18:07
@ondrejmirtes
Copy link
Copy Markdown
Member

Awesome! This fixes a bunch of issues (https://github.com/phpstan/phpstan-src/actions/runs/7974759948):

Please add regression tests for them - I think type inference tests in NodeScopeResolverTest should be fine. Please put the new files in dataFileAsserts in random places and not at the end, it makes the merge conflict to be less probable :)

@mad-briller
Copy link
Copy Markdown
Contributor Author

mad-briller commented Feb 20, 2024

@ondrejmirtes i've investigated the those issues and found that phpstan/phpstan#3818 appears to be an issue regarding the application of @var phpdocs, and is not fixed by this. However there is an additional try link provided in that issue that is resolved so i've added that as a regression test but this change doesn't close the issue.

however all the others are solved by this change! 🎉 you love to see it

@ondrejmirtes ondrejmirtes merged commit ffa7686 into phpstan:1.10.x Feb 20, 2024
@ondrejmirtes
Copy link
Copy Markdown
Member

Awesome, thank you very much!

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.

array_map ignores union of callables

3 participants