Let an agent handle Acorn upgrades

The Acorn upgrade guide notes:

If any packages/dependencies have conflicts while updating, try removing and then re-requiring them after Acorn is bumped to 6.x.

This is something I’ve regularly had to deal with, especially on the Roots site that uses several Laravel packages… the manual back-and-forth wasn’t fun

Agents can surface every conflict up front and resolve them all in one composer require call

Here’s a prompt you can drop into your agent of choice from the root of a Bedrock/Radicle site:

Upgrade this site from Acorn v5 to v6 following https://roots.io/acorn/docs/upgrading-acorn/. Don’t use the remove/re-require workaround from the guide. Instead:

  1. If config/logging.php exists and the stderr channel uses with, rename it to handler_with.
  2. If MAIL_ENCRYPTION is set in .env, rename to MAIL_SCHEME and bump roots/acorn-mail to ^2.0 if present.
  3. Run composer require roots/acorn ^6.0 illuminate/contracts ^13.0 -W --dry-run first — pinning illuminate/contracts forces composer to print every direct-dep conflict at once instead of stopping at the first.
  4. For each locked direct dep that’s blocking the upgrade, check whether its current constraint in composer.json already permits a Laravel-13-compatible release (composer show -a <pkg> and inspect newer versions’ illuminate requirements). If yes, just add the package to the composer require command using its existing constraint — that unlocks it. If the new compatible release requires a major bump, update the constraint.
  5. Run the combined composer require for real, then bump composer.json constraints up to the installed versions and composer update --lock (or composer update <one-pkg> if security-advisories blocks a stale transitive). Finish with wp acorn config:clear && wp acorn optimize:clear.

Don’t touch .env cache/session/redis prefixes — flag them in the summary instead so I can decide.

Claude Code suggested the prompt above. My initial prompt was this simple, and Claude Code ended up doing everything noted in the prompt above on its own:

We’re on Acorn v5 and need to upgrade to v6 —this is the upgrade guide: https://roots.io/acorn/docs/upgrading-acorn/

Claude Code was able to bump the affected packages for Laravel v13 support that we use:
  • codeat3/blade-simple-icons
  • blade-ui-kit/blade-icons
  • blade-ui-kit/blade-heroicons
  • codeat3/blade-line-awesome-icons
  • davidhsianturi/blade-bootstrap-icons
  • graham-campbell/markdown
  • laravel/socialite

It ended up using a single composer require to handle the upgrade, and for sites with a lot of Laravel packages it’s a nice time saver

3 Likes