On my recent deployment it failed at Clear OpCache with a message:
PHP Fatal error: Trait 'Illuminate\Foundation\Events\Dispatchable' not found in ...vendor/appstract/lush-http/src/Events/RequestEvent.php on line 11
However, this Events folder and all files inside didn't exist in the previous deployment...vendor folder isn't in the git repo anyway. But on deployment the new release contains this new folder and causes a failure on the second last step.
Anyone got a clue a) what is going on and b) what this dispatchable thing is for?
Ok...so this seems to be a bit more of a composer thing and relating to a couple of packages that have been updated.
I inherited this project ready-made so it was already set up on envoyer, github etc... push/pull/deploy had all been going fairly problem free until yesterday. It seems that the second last step of envoyer is to clear OpCache where it fails. I have a second copy of the site on another server for staging and this deployed fine. I looked in vendor/appstract and saw laravel-opcache and lush-http directories. The ones on the staging server seemed to be a different version with less files inside.
I looked on github and see laravel-opcache has been updated recently so at some point it must have applied this update on my live deployment. It's annoying as the version number in composer was set as ^1.2 so you wouldn't expect anything to break.
What I can't quite understand is what exactly is going on with envoyer re:composer. I can't roll back a deployment as I still get the same errors...the vendor directory seems to be set in stone (so how did it change?!?). I've even tried replacing the appstract directory with my staging copy but deployment fails.
Does deploying with envoyer run composer install? or update? or none? Any ideas how I can repair this and fix the versions so it doesn't happen again?
Im doing my deployments through jenkins, still getting this issue (after the update I guess). So yeah if you are basically thinking that this is happening due to envoyer then that might not be the case. I'm still digging myself though.
Hey @deansatch, I currently have a work around for that. I figured out that by downgrading the 'laravel-opcache' plugin one can still use it coz I guess the conflict is within itself, now you may ask how - basically it uses another one of its plugins 'lush-http' with which I think its conflicting on its own latest version i.e. 1.3.3
So I switched back to 'laravel-opcache' 1.3.0 with a subsequent downgrade of 'lush-http' to 0.2.6 and now everything on my jenkins and on the actual server works fine with opcache commands. I guess you can do this in the meantime this issue is not resolved by the author, I have opened up an issue with them here: