holisticagency / satis-http-client
Dedicated http client for satis deployment
1.0.0-alpha2
2015-04-15 17:30 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.2
- symfony/finder: ~2.2
Requires (Dev)
- mikey179/vfsstream: ~1.5
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2024-11-09 16:48:01 UTC
README
Dedicated http client for satis deployment
This lirary helps to deploy composer repositories on a web server.
add the code below to your composer.json
file :
"require": { "holisticagency/satis-http-client": "~1.0@alpha" }
add the code below in a PHP file :
use holisticagency\satis\utilities\SatisHttpClient; //Open repository $client = new SatisHttpClient('http://domain.tld'); //Private repository (recommanded) $client = new SatisHttpClient('http://domain.tld', array('user', 'password')); //Retrieve the configuration echo $client->getFile()->status()."\n"; echo $client->body()."\n"; // ...Code to eventually modify the configuration // Update the configuration echo $client->putFile()->status()."\n"; // ...Build a repository locally // Update the repository with a bundled archive zip file echo $client->putBundleZip($zipPath)->status()."\n"; // ...or put files one by one echo $client->putDir($workingDir)->status()."\n";
$zipPath
is a zip file containing the result of a satis build
command.
$workingDir
is where, locally, the result of a satis build
is done. It is intended to contain a set of files like packages.json
.
Finally, It is supposed to avoid sending every kind of files but Json or Zip files. It is strongly recommanded to check and set the web server parameters.