sandwave-io / acronis-php
A PHP SDK for the Acronis REST API.
Installs: 2 053
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 10
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0|^8.1|^8.2
- ext-json: *
- guzzlehttp/guzzle: ^6.5.0|^7.5.0
- jms/serializer: ^3.17
- psr/log: ^1.1|^3.0
- webmozart/assert: ^1.10
Requires (Dev)
- friendsofphp/php-cs-fixer: ^v3.14.4
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.10.6
- phpstan/phpstan-phpunit: ^1.3.10
- phpunit/phpunit: ^9.5|^10.0.15
- sandwave-io/php-cs-fixer-config: ^1.0
- spaze/phpstan-disallowed-calls: ^2.12.0
README
Acronis API - PHP SDK
Supported APIs
This SDK currently supports these APIs:
Are you missing functionality? Feel free to create an issue, or hit us up with a pull request.
How to use (REST API)
composer require sandwave-io/acronis-php
<?php use JMS\Serializer\SerializerBuilder; use SandwaveIo\Acronis\AcronisClient; use SandwaveIo\Acronis\Client\RestClient; use SandwaveIo\Acronis\RestClientFactory; $factory = new RestClientFactory( 'api-endpoint', 'client-identifier', 'client-secret' ); $serializerBuilder = new SerializerBuilder(); $restClient = new RestClient( $factory->create(), $serializerBuilder->build() ); $acronisClient = new AcronisClient($restClient); $acronisClient->getTenantClient()->get('tenant-guid');
How to contribute
Feel free to create a PR if you have any ideas for improvements. Or create an issue.
- When adding code, make sure to add tests for it (phpunit).
- Make sure the code adheres to our coding standards (use php-cs-fixer to check/fix).
- Also make sure PHPStan does not find any bugs.
composer analyze # this will (dry)run php-cs-fixer, phpstan and phpunit composer phpcs-fix # this will actually let php-cs-fixer run to fix
These tools will also run in GitHub actions on PR's and pushes on main.