roukmoute / pake
A make-like build utility for PHP. A simple modern task runner.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/roukmoute/pake
Requires
- php: >= 7.3
- symfony/console: ^4.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- phpunit/phpunit: ^8.4
- roukmoute/dto-tester: ^0.3.0
This package is auto-updated.
Last update: 2025-09-29 02:49:53 UTC
README
Pake is a simple task runner.
Pake is a Make-like program implemented in PHP.
Tasks and dependencies are specified in standard PHP syntax.
Pakefiles (pake's version of Makefiles) are completely defined in standard PHP syntax.
Installation
These commands requires you to have Composer installed globally. Open a command console, enter your project directory and execute the following commands to download the latest stable version:
composer require --dev roukmoute/pake
Usage
Example
First, you must write a Pakefile file which contains the build rules.
Here's a simple example:
<?php use PhpCsFixer\Console\Application; use Symfony\Component\Console\Input\ArrayInput; task( 'default', function () { return ['fix']; } ); desc('PHP Coding Standards Fixer'); task( 'fix', function () { $application = new Application(); $application->setAutoExit(false); $application->run(new ArrayInput(['fix'])); } );
This Pakefile has two tasks:
- A task named
fix, which – upon invocation – will fix your code to follow standards in PHP:
▶ php ./vendor/bin/pake fix
- A task named
default. This task does nothing by itself, but it has exactly one dependency, namely thefixtask.
Invoking thedefaulttask will cause Pake to invoke thefixtask as well.
Running the pake command without any options will cause it to run the
default task in the Pakefile:
▶ php ./vendor/bin/pake Loaded config default from ".php_cs.dist". Using cache file ".php_cs.cache".
Type --help for all available options.