Closed simonhamp closed 3 years ago
We are only requiring mockery 1.2.3 https://github.com/statamic/cms/blob/master/composer.json#L33
You might have a higher version locked in your own project's composer.lock.
Using PHP 7.4 is fine though. I didn't realize Netlify supported it.
This was a fresh install of Laravel + Statamic so I've not done anything out of the ordinary here :)
Right but if you're running PHP 7.4 locally, it would have had no problem installing that higher version of mockery. Then it gets written to your lock file. Then you try and use those locked dependencies on an environment with 7.2 and it fails.
Your options here would be either use 7.4 on Netlify like you've already done, or composer require "mockery/mockery ^1.3"
(because 1.4 dropped support for <7.3)
@jasonvarga shouldn’t we recommend 7.4 always tho?
Right but if you're running PHP 7.4 locally, it would have had no problem installing that higher version of mockery.
I’m sure other folks are going to be running 7.3 and higher. As Netlify now supports 7.4 it feels like the right thing to recommend.
Feels like a painless PR to merge :)
Yeah! Don't know why I closed, really.
If Netlify lets you use 7.4 then 👍
When using
PHP_VERSION: 7.2
, I get the following error:mockery/mockery 1.4.2 requires php ^7.3 || ^8.0 -> your PHP version (7.2.32) does not satisfy that requirement.
Switching to
7.4
fixes this.