Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fatal error: Call to undefined function patchwork\callrerouting\deployqueue() #39
I'm using patchwork for mocking functions in unit tests via https://packagist.org/packages/brain/monkey . The package I'm working on is a
The composer.json define these requirements:
The PHPUnit test runner uses
The actuall installed versions are
I don't use any
All tests run without problems as expected in the PHPUnit CLI runner. Now when I'm starting my »application« by just making a HTTP request to the Web-Frontend (
For what I see, this comes as both processes (test and web frontend) share the same composer autoloader. Composers
So to overcome this issue, I just deleted the complete
At this moment there were no patchwork sources at all. But the error still occurred. Only after I restarted apache, the error was gone.
I know, that patchwork is not meant to use in production and therefore I have to make sure, it never goes into the autoloader on any production system. But I want to understand what exactly goes on here. Is it the PHP OPcache, that caches the streams of patchwork? How can I make sure that I can switch between testing-processes and web frontend-processes on a developing system without running into these caching issues?
I'll keep that in mind. I still didn't found a way to reproduce it. But nice to see, the hypothesis is addressed in these commits. Thanks!