-
Notifications
You must be signed in to change notification settings - Fork 456
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
Fix crash on a union type including null #1106
Conversation
Does that test pass without the code change? When I originally wrote this code |
No it does not, see https://travis-ci.com/github/LeSuisse/mockery/jobs/452045803 which correspond to LeSuisse@d328ed6 (the test without the code change). |
The CI failures with |
NB This PR should target the 1.3 branch. PHPUnit issues can be fixed by replacing |
28f6a29
to
f3757c0
Compare
The PR now targets the 1.3 branch. Not exactly sure to understand how to fix the PHPUnit/Xdebug 3.0 issues on it since we need PHPUnit ^5 .7 to run the tests on PHP 5.6 and this version also covers PHP ^7.0. |
Hmm, mockery should probably just drop it's prefer-lowest tests. They don't add any value, since Mockery has basically no dependencies. |
This looks good to me and I'm happy to drop the prefer-lowest tests, to be honest that all confuses me anyway. |
I opened #1107 to drop the prefer-lowest tests. I will rebase this PR once the other is merged :) . |
This change prevents the generation of type hints with 2 "null". For example, "string|array|null" should generate the code "string|array|null" instead of "string|array|null|null" to avoid a PHP fatal error "Duplicate type null is redundant". Closes mockery#1105.
f3757c0
to
849a681
Compare
Sorry for the delay, just tagged 1.4.3 and 1.3.4 |
This change prevents the generation of type hints with 2 "null".
For example, "string|array|null" should generate the code "string|array|null" instead of "string|array|null|null" to avoid a PHP fatal error "Duplicate type null is redundant".
Closes #1105.