Hey team,
I have 3-year-old site that I am updating some premium plugins on. The site is using Trellis, Bedrock, and Sage 10, which have not been upgraded since the site was launched due to budget constraints. As such, Acorn 2 is being used.
When I attempt to deploy to my staging site after updating one of the plugins, which are not managed via composer since they are premium plugins that don’t provide a path for doing so, wp acorn optimize
fails because a Class(es) that was removed in the updated version of the plugin cannot be found.
TASK [deploy : Run Acorn optimize] *********************************************
System info:
Ansible 2.10.16; Darwin
Trellis version (per changelog): "Create mysql my.cnf credentials file earlier"
---------------------------------------------------
non-zero return code
Fatal error: Uncaught Error: Class
"ElementorPro\Core\Compatibility\Compatibility" not found in ...
I imagine it could be related to this issue, which was apparently resolved on newer versions of Acorn: Removing a provider breaks Acorn until removing the packages cache · Issue #270 · roots/acorn · GitHub
I attempted upgrading Acorn straight to 4.0, which ran into a bucket of issues. I then tried upgrading to 3.0, which caused what seemed to be a PHP version issue like this thread (Same error, except for roots/sage instead of roots/bedrock): https://discourse.roots.io/t/composer-could-not-detect-the-root-package-roots-bedrock-version/26895
That struck me as odd given that I am running PHP 8.1, so maybe I’m missing something there.
Obviously I am down the rabbit hole here and getting a bit lost. Again, I am working with a tight budget, so upgrading the full stack is not really an option right now (hopefully it will be possible in the future). So, I’m looking for a workaround for now, or even just an explanation of how and why the Acorn cache might be causing this issue in order to point me in the right direction.
Any help would be greatly appreciated!
Edit: I also tried removing the cache manually before deploying to no success.