vaults / php-client
Zero-dependency PHP client for the Vaults resilient Composer infrastructure API
0.1.0
2026-09-08 17:16 UTC
Requires
- php: >=8.2
- ext-json: *
Requires (Dev)
- laravel/pint: ^1.0
- pestphp/pest: ^3.0|^4.0|^5.0
- phpstan/phpstan: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Zero-dependency PHP client for the Vaults resilient Composer infrastructure API. Shared by the Vaults CLI and the Vaults Composer plugin.
Requires PHP >= 8.2 and ext-json. No other runtime dependencies - by design, so it can live inside any project's vendor tree without conflicts.
Usage
use Vaults\Auth\DeviceFlow; use Vaults\Auth\TokenStore; use Vaults\VaultsClient; $store = new TokenStore; $client = new VaultsClient($store->token()); $pair = (new DeviceFlow($client))->start(gethostname()); // show $pair->userCode, open $pair->verificationUriComplete in a browser... $result = (new DeviceFlow($client))->await($pair); if ($result->isApproved()) { $store->save($result->token, $result->team); } $run = $client->withToken($result->token)->deposit($projectUuid, file_get_contents('composer.lock'));
- Base URL: defaults to production; override with the
VAULTS_API_URLenvironment variable or the constructor. - Token resolution:
VAULTS_TOKENenvironment variable first, then~/.config/vaults/config.json.
Development
composer install
composer test
composer analyse
composer lint