---
name: "dh_phpcomposer"
section: "1"
platform: "linux"
package: "pkg-php-tools"
version: "1.49"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_phpcomposer"
---

# dh\_phpcomposer(1)

calculates PHP Composer substvars

## NAME

dh\_phpcomposer - calculates PHP Composer substvars

## SYNOPSIS

**dh\_phpcomposer** \[*debhelper options*\] \[*options*\]

## DESCRIPTION

**dh\_phpcomposer** is a debhelper program that is responsible for generating the **${phpcomposer:\*}** substitutions and adding them to substvars files.

The program will look for *composer.json* file in the package root, and will use this information to generate:

- •

  **${phpcomposer:name}** and **${phpcomposer:description}**

- •

  **${phpcomposer:Debian-require}**, **${phpcomposer:Debian-require-dev}**, **${phpcomposer:Debian-conflict}**, **${phpcomposer:Debian-replace}**, **${phpcomposer:Debian-provide}**, **${phpcomposer:Debian-suggest}** and **${phpcomposer:Debian-recommend}**

Those variables will be substituted into the package's *control* file wherever the token **${phpcomposer:\*}** are placed.

This feature requires pkg-php-tools (\>= 1.7~).

## OPTIONS

- **--sourcedirectory=***directory*

  Assume that the original package source tree is at the specified directory rather than the top level directory of the Debian source package tree.

  This feature requires pkg-php-tools (\>= 1.14~).

## FILES

- *debian/pkg-php-tools-overrides*

  Package that don't want to follow automatic Composer package name to Debian package name conversion can override the conversion by creating this file.

  More information is available in [**dh\_phppear**(1)](/dh_phppear/1.md).

## CONFORMING TO

Debian policy, version 3.9.6.

PHP PEAR policy, version yet-to-be-written.

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md), [**pkg-php-tools**(7)](/pkg-php-tools/7.md), */usr/share/doc/pkg-php-tools/README.Composer*

## AUTHOR

Mathieu Parent \<sathieu@debian.org\>
