Build

A build is the automated process of transforming source code into a deployable artifact. In PHP, build steps typically include: installing dependencies, running static analysis, executing tests, generating assets, and packaging the application.

Build processes are commonly driven by tools such as Make, Phing, Composer scripts, or shell scripts, and are integrated into a Continuous Integration pipeline.

A reproducible build produces the same artifact from the same source code, which is essential for reliable deployments.

<?php

// composer.json scripts section acts as a simple build runner
// { "scripts": { "build": ["@lint", "@test", "@analyse"] } }

// Phing build.xml target example:
// <target name="build" depends="lint,test,package"/>

?>

Documentation

See also Phing — PHP build tool, Composer scripts and Deployer — PHP deployment tool.

Related : Continuous Integration (CI), DevOps, Composer, Deployment, Test,

Related packages : phing/phing, deployer/deployer