Closed krodyrobi closed 7 years ago
Cross-linking https://github.com/sebastianbergmann/phpunit/issues/2746
Hey there,
thanks for fixing this. But ... it's not working for me.
I have a repository that depends on Patchwork and PHPUnit 5.7, and thus Instantiator (which I get as version 1.1.0).
Still the fatal error keeps on coming. Any idea why that is?
In your composer.json replace to "antecedent/patchwork": "^2.0"
, and issue a composer update
.
It should download 2.0.8 as of yesterday.
I am using 2.0.8.
Also, if there's a cache-path
in patchwork.json
, please manually clear the folder it refers to.
Thanks for the info. However, I don't use any patchwork.json
( I'm not redefining core stuff such as exit
), and the cache/
folder is also not present.
Please use {"blacklist": ["/path/to/Instantiator.php"]}
for now. I apologize for any inconvenience caused by this bug, and will investigate it further later today.
No problem, and thanks!
For now, I just fix Instantiator to v1.0.5
where it doesn't have the void
return type hint, so no fatal error.
Also having issues with 2.0.8, any failing test or anything produces the fatal error in Instantiator.
Not doing anything with Patchwork directly, using it via Brain Monkey. Downgrading to Instantiator 1.0.5 seems to help for now.
cc @gmazzap
This time, I have successfully reproduced the bug with an actual copy of doctrine/instantiator 1.1, and made a second attempt at the fix.
Seems to have gotten my issue this time! No errors with 2.0.9 and Instantiator 1.1 so far, thaaank you. :)
Wow, nice one, @antecedent! Thanks!
Damn use
-ing closures, right? 😀
Yep it seems to have solved the issue completely. Thank you!
Versions
MCV example
patchwork-doctrine-master.zip
Temporary workaround
Add
"doctrine/instantiator": "1.0.x-dev"
tocomposer.json
Edit
Quick-fixed in
patchwork==2.0.8
. Redefining void hinted functions will be supported in future versions, now they are skipped.