PHPackages                             mtdowling/burgomaster - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mtdowling/burgomaster

ActiveLibrary

mtdowling/burgomaster
=====================

Packages up PHP packages into zips and phars

0.0.3(10y ago)2878.9k↑716.7%511MITPHPPHP &gt;=5.3.6

Since Aug 18Pushed 9y ago5 watchersCompare

[ Source](https://github.com/mtdowling/Burgomaster)[ Packagist](https://packagist.org/packages/mtdowling/burgomaster)[ RSS](/packages/mtdowling-burgomaster/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (11)

Burgomaster
===========

[](#burgomaster)

Master of towns, burgers, and creating phars and zips for PHP applications.

This script can be used to:

1. Easily create a staging directory for your package.
2. Build a class-map autoloader of all of your PHP files.
3. Create a zip file containing your project, its dependencies, and an autoloader.
4. Create a phar file that contains all of your project's dependencies and registers an autoloader when it's loaded.

This project will likely never become more than a single file containing a single class, so feel free to just copy and paste that file into your project rather than pulling in a new dependency just for builds.

Tutorial
--------

[](#tutorial)

The following example demonstrates how Guzzle uses this project. For this example, assume this script is in `guzzlehttp/src/build/`.

### Get Burgomaster

[](#get-burgomaster)

Before running your packaging script, you'll need a copy of Burgomaster. This can be done using composer (mtdowling/burgomaster) or just creating a Makefile that downloads the Burgomaster.php script.

First, create the following Makefile in your project's root directory:

```
package: burgomaster
    php build/packager.php

burgomaster:
    mkdir -p build/artifacts
    curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.1/src/Burgomaster.php > build/artifacts/Burgomaster.php
```

Note

You can substitute the above URL to use a different tag than `0.0.1`. Look at [Burgomaster's releases](https://github.com/mtdowling/Burgomaster/releases)for a list of available tags.

### Create a packager.php script

[](#create-a-packagerphp-script)

Now you need to write a `packager.php` script, typically located in the `build/` directory of a project. Here's what Guzzle's looks like.

```
