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

Latest doctrine/instantiator bugs out with patchwork #64

Closed
krodyrobi opened this issue Jul 27, 2017 · 13 comments
Closed

Latest doctrine/instantiator bugs out with patchwork #64

krodyrobi opened this issue Jul 27, 2017 · 13 comments
Assignees

Comments

@krodyrobi
Copy link

krodyrobi commented Jul 27, 2017

Versions

Dependency Version
PHPUnit 5.7.* and 6.2.*
Doctrine/instantiator 1.1.0
PHP 5.6 and 7.1
Patchwork 2.0.7

MCV example

patchwork-doctrine-master.zip

Temporary workaround

Add "doctrine/instantiator": "1.0.x-dev" to composer.json

Edit

Quick-fixed in patchwork==2.0.8. Redefining void hinted functions will be supported in future versions, now they are skipped.

@krodyrobi
Copy link
Author

Cross-linking sebastianbergmann/phpunit#2746

@antecedent antecedent self-assigned this Jul 27, 2017
@tfrommen
Copy link
Contributor

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?

@krodyrobi
Copy link
Author

krodyrobi commented Jul 28, 2017

In your composer.json replace to "antecedent/patchwork": "^2.0", and issue a composer update.
It should download 2.0.8 as of yesterday.

@tfrommen
Copy link
Contributor

I am using 2.0.8.

@antecedent
Copy link
Owner

Also, if there's a cache-path in patchwork.json, please manually clear the folder it refers to.

@tfrommen
Copy link
Contributor

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.

@antecedent
Copy link
Owner

antecedent commented Jul 28, 2017

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.

@tfrommen
Copy link
Contributor

tfrommen commented Jul 28, 2017

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.

@Rarst
Copy link

Rarst commented Aug 1, 2017

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

antecedent added a commit that referenced this issue Aug 1, 2017
@antecedent
Copy link
Owner

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.

@Rarst
Copy link

Rarst commented Aug 1, 2017

Seems to have gotten my issue this time! No errors with 2.0.9 and Instantiator 1.1 so far, thaaank you. :)

@tfrommen
Copy link
Contributor

tfrommen commented Aug 1, 2017

Wow, nice one, @antecedent! Thanks!
Damn use-ing closures, right? 😀

@krodyrobi
Copy link
Author

Yep it seems to have solved the issue completely. Thank you!

antecedent added a commit that referenced this issue Oct 25, 2019
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

No branches or pull requests

4 participants