Skip to content

smmccabe/accompanist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accompanist

A simple PHP API for generating composer files

Examples

Basic

use Accompanist\Accompanist;

$accompanist = new Accompanist('Sample Composer File');

$accompanist->addRequire('monolog/monolog');
$accompanist->addRequire('guzzlehttp/guzzle', '^6.3');

$composerJSONString = $accompanist->generateJSON();
// or
$accompanist->writeToFile('output/composer.json');

Load from existing

use Accompanist\Accompanist;

$accompanist = new Accompanist('Imported Composer File');

$accompanist->loadFromFile('import/composer.json');

About

A simple PHP API for generating composer files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages