A Symfony-based PHP library for working with the ACSF platform.
Acquia Cloud Site Factory is a hosting platform provided by Acquia. As part of that platform an API is provided for developers to use. The goal of this library is to wrap that API in such a way that it becomes trivial to leverage it in PHP applications.
Caution: Test coverage in this library is around validation of calls to the API, and is not testing interaction with the actual ACSF API. Not all wrapped endpoints have been validated as properly implemented, and live calls to the API may have unexpected results. Review all scripts and calls for proper behavior before executing against a live environment.
Requirements
- PHP >= 7.2
- API access to ACSF
- Composer for dependency installs
Installation should be straightforward when using composer.
composer require swichers/acsf-client
Example scripts are available in the examples folder.
<?php declare(strict_types=1);
require 'vendor/autoload.php';
use swichers\Acsf\Client\ServiceLoader;
$base_config = [
'username' => 'example.user',
'api_key' => 'example.key',
'site_group' => 'example.group',
'environment' => 'live',
];
$client = ServiceLoader::buildFromConfig(['acsf.client.connection' => $base_config])
->get('acsf.client');
// Check the service status.
print_r($client->getAction('Status')->ping());
Running tests
$ vendor/bin/phpunit
Checking code formatting
$ vendor/bin/phpcs