Skip to content
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

Less ambitious fix to BuiltinMethodReflection woes #299

Merged
merged 3 commits into from
Aug 18, 2019

Conversation

ondrejmirtes
Copy link
Contributor

I probably got too ambitious with the last fix.

The problem is that I didn' realize that localMacros don't contain strings but anonymous functions. So I reverted this change and did the minimal work required to fix the actual issue.

PHPStan currently does not have a better way of converting anonymous function (as in the actual closure in memory, not just a reflection) to ParametersAcceptor.

This should probably have some kind of test but since I'm not familiar with Laravel, I don't know how the code that's touched by these changes looks like in a Laravel app.

I hope that following versions of PHPStan will be less turbulent for you 👍

@patrickbrouwers
Copy link

Thanks for looking into a fix!

@nunomaduro nunomaduro merged commit 722cfdf into larastan:master Aug 18, 2019
@nunomaduro
Copy link
Collaborator

@ondrejmirtes Can you confirm that your changeset is this? v0.3.19...HEAD. Comparing with the previous code we had.

@ondrejmirtes
Copy link
Contributor Author

ondrejmirtes commented Aug 18, 2019 via email

@nunomaduro
Copy link
Collaborator

Bumping to the latest version of phpstan anyway. Thanks for this.

@szepeviktor
Copy link
Collaborator

Please run it on a real Laravel project before tagging the next version,

CI runs Larastan on the default Laravel app https://github.com/nunomaduro/larastan/blob/master/tests/laravel-test.sh#L6

@nunomaduro
Copy link
Collaborator

@szepeviktor Thanks for that buddy!

@ondrejmirtes
Copy link
Contributor Author

ondrejmirtes commented Aug 18, 2019 via email

@szepeviktor
Copy link
Collaborator

@nunomaduro Should we add 2 tests for the recent two failed releases? What do you think?

@ondrejmirtes
Copy link
Contributor Author

ondrejmirtes commented Aug 19, 2019 via email

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.

None yet

4 participants