comfortable / php-sdk
PHP SDK for comfortable.io
Installs: 460
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/comfortable/php-sdk
Requires
- php: ^8.3
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2026-01-15 22:22:04 UTC
README
PHP Development Kit
Installation
The Comfortable PHP SDK can be installed with Composer. Run this command:
composer require comfortable/php-sdk
Usage
Note: This version of the SDK requires PHP 5.6 or greater.
Include the dependency:
<?php require_once __DIR__ . '/vendor/autoload.php'; // change path as needed use Comfortable;
Connect to your Repository and make your first request:
$api = Comfortable\Api::connect('{repository-api-id}', '{api-key}'); try { // get all documents stored in comfortable (default limit: 25) $results = $api->getDocuments()->execute(); } catch (\RuntimeException $e) { echo 'Comfortalbe SDK returned an error: ' . $e->getMessage(); exit; }
Complete documentation, installation instructions, and examples are available here.
Tests
- Composer is a prerequisite for running the tests. Install composer globally, then run composer install to install required files.
- Create
phpunit.xmlfromphpunit.xml.distand edit it to add your credentials. Alternatively you can set your credentials as environment variables. For this you have to defineCMFT_REPOSITORYandCMFT_APIKEY. - The tests can be executed by running the following command from the root directory:
./vendor/bin/phpunit
More information
Contributing
Pull requests are always welcome!
License
This repository is published under the MIT license.