Since updating to Acorn 3.2.0, I’ve been seeing the following error when attempting to run wp acorn
in my DDEV container:
$ ddev wp acorn
In Container.php line 891:
Target class [composer] does not exist.
In Container.php line 889:
Class "composer" does not exist
Failed to run wp acorn: exit status 1
I’ve tried clearing cache to no avail. I’ve also re-created the containers with ddev restart
. And, unfortunately, I only see third-party dependencies in the stack trace, so I’m not sure whether this is related to my code. I’m willing to provide some sample code if that’d be helpful, but it’s not clear to me what might be helpful context there.
Here’s the full trace as it appears in application.log
:
[2023-06-26 15:21:00] development.ERROR: Target class [composer] does not exist. {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionExc
eption(code: 0): Target class [composer] does not exist. at /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php:891)
[stacktrace]
#0 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(770): Illuminate\\Container\\Container->build('composer')
#1 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(856): Illuminate\\Container\\Container->resolve('composer', Array, true)
#2 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(706): Illuminate\\Foundation\\Application->resolve('composer', Array)
#3 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->make('composer', Array)
#4 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(1431): Illuminate\\Foundation\\Application->make('composer')
#5 /var/www/html/vendor/illuminate/database/MigrationServiceProvider.php(159): Illuminate\\Container\\Container->offsetGet('composer')
#6 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(885): Illuminate\\Database\\MigrationServiceProvider->Illuminate\\Databa
se\\{closure}(Object(Roots\\Acorn\\Application), Array)
#7 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(770): Illuminate\\Container\\Container->build(Object(Closure))
#8 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(856): Illuminate\\Container\\Container->resolve('Illuminate\\\\Data...', Array, t
rue)
#9 /var/www/html/web/app/themes/logan-center/vendor/illuminate/container/Container.php(706): Illuminate\\Foundation\\Application->resolve('Illuminate\\\\Data..
.', Array)
#10 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->make('Illuminate\\\\Data...', Array)
#11 /var/www/html/vendor/illuminate/console/Application.php(280): Illuminate\\Foundation\\Application->make('Illuminate\\\\Data...')
#12 /var/www/html/vendor/illuminate/console/Application.php(294): Illuminate\\Console\\Application->resolve('Illuminate\\\\Data...')
#13 /var/www/html/web/app/themes/logan-center/vendor/illuminate/support/ServiceProvider.php(404): Illuminate\\Console\\Application->resolveCommands(Array)
#14 /var/www/html/vendor/illuminate/console/Application.php(161): Illuminate\\Support\\ServiceProvider->Illuminate\\Support\\{closure}(Object(Illuminate\\Conso
le\\Application))
#15 /var/www/html/vendor/illuminate/console/Application.php(82): Illuminate\\Console\\Application->bootstrap()
#16 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Console/Kernel.php(417): Illuminate\\Console\\Application->__construct(Object(Roots\\Acorn\\Appl
ication), Object(Illuminate\\Events\\Dispatcher), 'Acorn 3.2.0 (La...')
#17 /var/www/html/vendor/roots/acorn/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Foundation\\Console\\Kernel->getArtisan()
#18 /var/www/html/vendor/roots/acorn/src/Roots/Acorn/Bootloader.php(185): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\I
nput\\StringInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#19 [internal function]: Roots\\Acorn\\Bootloader->Roots\\Acorn\\{closure}(Array, Array)
#20 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(102): call_user_func(Object(Closure), Array, Array)
#21 [internal function]: WP_CLI\\Dispatcher\\CommandFactory::WP_CLI\\Dispatcher\\{closure}(Array, Array)
#22 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
#23 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(419): WP_CLI\\Dispatcher\\Subcommand->invoke(Array, Array, Array)
#24 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(442): WP_CLI\\Runner->run_command(Array, Array)
#25 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1256): WP_CLI\\Runner->run_command_and_exit()
#26 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\\Runner->start()
#27 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\\Bootstrap\\LaunchRunner->process(Object(WP_CLI\\Bootstrap\\BootstrapState)
)
#28 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\\bootstrap()
#29 phar:///usr/local/bin/wp-cli/php/boot-phar.php(11): include('phar:///usr/loc...')
#30 /usr/local/bin/wp-cli(4): include('phar:///usr/loc...')
#31 {main}