cloudforest / api-client-php
PHP client for the CloudForest Marketplace API
1.3
2024-12-16 10:34 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.8
- opis/json-schema: ^2.3
- phpstan/phpdoc-parser: ^1.33
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.59
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^10.5
README
PHP client for the CloudForest Marketplace API.
Installation
composer require cloudforest/api-client-php
Update
Fetch recent changes with:
composer require cloudforest/api-client-php
Documentation
The client is documented with phpdoc. To read it, you could read the code in
the ./vendors/cloudforest/api-client-php/src
folder. Or
install phpdoc
then extract the documentation to your project with:
phpdoc -d vendor/cloudforest/api-client-php/src -t ./docs
You can then open ./docs/index.html
in a browser.
Code Quality
You can run php-cs-fixer and phpstan:
composer run phpcs:check
composer run phpcs:fix
composer run phpstan
Testing
This will run a suite of tests against a CloudForest Marketplace server such as cfdev.cloudforest.marketplace.
Copy phpunit.dist.xml to phpunit.xml and fill in the environment variables. Then run:
composer run phpunit
JSON Schema
You can generate a JSON Schema from the PHP spec classes with:
composer run schema