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:
PHP Warning: require_once(/Users/myuser/Sites/mywebsite/vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/Composer/../../../vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/mu-loader.php): failed to open stream: No such file or directory in /Users/myuser/Sites/mywebsite/web/app/mu-plugins/mu-require.php on line 2
PHP Stack trace:
PHP 1. {main}() /usr/local/Cellar/wp-cli/2.1.0/bin/wp:0
PHP 2. include() /usr/local/Cellar/wp-cli/2.1.0/bin/wp:4
PHP 3. include() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/php/boot-phar.php:11
PHP 4. WP_CLI\bootstrap() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:25
PHP 5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:74
PHP 6. WP_CLI\Runner->start() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23
PHP 7. WP_CLI\Runner->load_wordpress() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1114
PHP 8. require() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1191
PHP 9. include_once() /Users/myuser/Sites/mywebsite/web/wp/wp-settings.php:278
PHP Fatal error: require_once(): Failed opening required '/Users/myuser/Sites/mywebsite/vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/Composer/../../../vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/mu-loader.php' (include_path='.:/usr/local/Cellar/valet-php@7.3/7.3.1/share/valet-php@7.3/pear') in /Users/myuser/Sites/mywebsite/web/app/mu-plugins/mu-require.php on line 2
PHP Stack trace:
PHP 1. {main}() /usr/local/Cellar/wp-cli/2.1.0/bin/wp:0
PHP 2. include() /usr/local/Cellar/wp-cli/2.1.0/bin/wp:4
PHP 3. include() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/php/boot-phar.php:11
PHP 4. WP_CLI\bootstrap() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:25
PHP 5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:74
PHP 6. WP_CLI\Runner->start() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23
PHP 7. WP_CLI\Runner->load_wordpress() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1114
PHP 8. require() phar:///usr/local/Cellar/wp-cli/2.1.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1191
PHP 9. include_once() /Users/myuser/Sites/mywebsite/web/wp/wp-settings.php:278
Looking at the file mu-plugins/mu-require.php:
<?php
require_once '/Users/myuser/Sites/mywebsite/vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/Composer' . '/../../../vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/mu-loader.php';
This is resolvable by doing composer update --lock which changes the contents of the file to this working code:
<?php
require_once __DIR__ . '/../../../vendor/lkwdwrd/wp-muplugin-loader/src/lkwdwrd/mu-loader.php';
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).
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 --lockwhich 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).