Writing Composer Packages with Studio

Studio is a Composer package that scaffolds the creation of new Composer packages and also manages local packages which you can include in your projects (without needing to install via Packagist).


Install Studio gloablly:

composer global require franzl/studio

Scaffolding Packages

Scaffold a new package using the following syntax:

studio create path/to/my/ExamplePackage

The process will automatically setup PHPUnit, PHPSpec and Travis, if required.

Hosting Packages Locally

In order to require project packages from a local folder, run the following command in the root of your project folder (NOT the package folder):

studio load path/to/your/local/packages/*

Packages that are placed in this folder will then be available in the project’s composer.json file.

To use one of the local packages, require it like normal and Studio will Symlink your package folder into your vendor folder:

"require": {
    "my/package": "dev-master"

And then update:

composer update my/package