Skip to content

Composer

Categories: php

Renovate supports updating Composer dependencies.

File Matching

By default, Renovate will check any files matching the following regular expression: /(^|/)([\w-]*)composer\.json$/.

For details on how to extend a manager's managerFilePatterns value, please follow this link.

Supported datasources

This manager supports extracting the following datasources: bitbucket-tags, git-tags, packagist.

Dependency types

This manager extracts the following depType values:

depType Description
require Production dependency from require section
require-dev Development dependency from require-dev section

Default config

{
  "managerFilePatterns": [
    "/(^|/)([\\w-]*)composer\\.json$/"
  ],
  "versioning": "composer"
}

Lock File Maintenance

This manager supports lockFileMaintenance for the following file(s):

  • composer.lock

Lock file maintenance is delegated to the underlying package manager, which Renovate runs as an external command.

Additional Information

Extracts dependencies from composer.json files, and keeps the associated composer.lock file updated too.

If you use VCS repositories then Renovate needs a hint via the name property, which must match the relevant package. For example, the package acme/foo would need an entry in repositories similar to the following:

{
  "name": "acme/foo",
  "type": "vcs",
  "url": "http://vcs-of-acme.org/acme/foo.git"
}

By default, Renovate will invoke composer update with the --with-dependencies flag. Add composerWithAll to your postUpdateOptions array to use the --with-all-dependencies flag instead.