Drupal and Composer
Composer update in Drupal ended with an error: how to find the conflict without making things worse.
A Composer error usually describes a constraint, platform or package conflict, but the last line doesn’t always point to the original cause. Don’t delete the lockfile and vendor in production without a reproducible plan.
Next step
Keep composer.json, composer.lock, the full command output, the PHP version and the exact command. Remove private repository tokens from the report.
01
Don’t start by deleting things
composer.lock describes a known set of dependencies, and vendor is its result. Deleting them can open up a wide range of new versions and turn one conflict into many changes that are hard to reproduce.
02
Record the environment and the command
Establish the PHP and Composer versions, active extensions, the operating system, package sources and the exact command. Web and CLI may use different PHP, so success locally doesn’t guarantee success on the server.
03
Read the conflict from the top
Find the first constraints that can’t be satisfied and the package blocking core. Composer’s diagnostic options help show who requires a given version or why the target version can’t be installed.
04
Check the scope of the requested change
A partial update without the required dependencies can block the solver, and one that’s too broad can bump many packages at once. Define the goal and the minimal safe set of dependencies needed for this change.
05
Patches and private repositories
An outdated patch, a changed URL, a missing token or an unavailable repository can stop the installation even with correct versions. Verify the source and maintainability of the patch, and don’t disable integrity checks blind.
06
Drupal, modules and PHP
Core, Drush and contrib modules may require different versions of Symfony, PHP or other libraries. For a blocking module, check for a supported release, an alternative or a controlled patch instead of forcing an inconsistent set.
07
Fix on a copy and test
Make the change in a separate branch and environment, commit the lockfile, run a clean install, update hooks, a configuration import and regression tests. Deploy to production a ready artefact or a reproducible process, not an interactive experiment.
Is Composer blocking your Drupal update?
Give the expected core version, the full message without secrets, the PHP and Composer versions, and information about patches and private packages.
Only 3 required fields · reply within 1 business day · no obligation
