-
Notifications
You must be signed in to change notification settings - Fork 1
Fatal error after adding composer packages #8
Comments
@robrecord can you try running |
And add the |
Thanks Iain. After testing, doing Running Is the package required for the plugin to work? |
Sorry @robrecord, i've been running |
and when |
I've seen the suggestion to run I've not ever had to use Hoping there is a chance this plugin can work without having to use extra commands. |
Yeah it's not ideal, and we will look to improve that in the future. |
Thank you! Maybe consider this as a modern alternative if the functionality is required: Or you could not prescribe the requirement, allowing the user to add the requirement if needed (as it is not needed when using roots/bedrock). |
Edit: only seems to be happening now when I do This might be a bug with |
To improve compatibility with Roots Bedrock. Doesn't appear to be required, and produces errors (see spinupwp#8) when using bedrock.
I worked around this by creating a patch. For others to use, do the following: composer config repositories.spinupwp-fork '{"type": "vcs", "url": "https://github.com/robrecord/spinupwp-mu-plugin"}'
composer require "deliciousbrains/spinupwp-mu-plugin:dev-patch-1"
# optional, to remove old requirements
composer clear-cache
composer update --lock To revert/undo this change: composer config --unset repositories.spinupwp-fork
composer require "deliciousbrains/spinupwp-mu-plugin:^1.0"
composer clear-cache
composer update --lock |
I am getting the following errors after I add/remove requirements in composer, which seem to relate to a package that the SpinupWP cache plugin requires:
Looking at the file
mu-plugins/mu-require.php
:This is resolvable by doing
composer update --lock
which changes the contents of the file to this working code:Whenever I do anything that starts with
composer require
, the file mu-require.php changes back again and the fatal error returns.I should mention that I am using bedrock by roots, and that bedrock installs a similar mu-plugin autoloader. Disabling this autoloader has no effect on any of the above process.
I'm not sure why this package lkwdwrd/wp-muplugin-loader is needed, since you seem not to have used it at all? The site seems to work fine without it, though I wouldn't know if your plugin then works correctly or not since it doesn't appear in the plugins list (maybe it should).
The text was updated successfully, but these errors were encountered: