composer
Composer Errors
Exit codes and exception classes from Composer, PHP's dependency manager. Exit codes indicate the broad outcome; exception classes pinpoint the cause during dependency resolution, download, or configuration parsing.
6 codes
references getcomposer.org/doc/articles/troubleshooting.mdgithub.com/composer/composer/tree/main/src/Composer/Downloader
· All codes 6 codes
- 0 Success The command completed successfully. All packages were resolved, downloaded, and installed without errors.
- 1 General Error A general error occurred. Causes include network failures while downloading packages, file system permission errors, a malformed composer.json, or an authentication failure against a private repository.
- 2 Dependency Resolution Error The dependency solver could not find a consistent set of package versions satisfying all constraints in composer.json. The output lists the conflicting requirements. Relaxing version constraints, running `composer update`, or removing conflicting packages resolves this.
- InvalidRepositoryException InvalidRepositoryException A repository entry in composer.json is malformed, uses an unsupported type, or returned data Composer could not parse. Check the `repositories` key for correct type, url, and options fields.
- SolverProblemsException SolverProblemsException The dependency solver detected conflicts it cannot reconcile. Each 'Problem' in the output identifies a chain of conflicting requirements. This surfaces as a Composer exit code 2 condition.
- TransportException TransportException A network error occurred while downloading a package or fetching repository metadata. The exception message includes the HTTP status code or curl error. Common causes: incorrect repository URL, missing authentication credentials, or an unreachable server.