Installation¶
Requirements¶
- PHP 8.2 or newer.
- Composer 2.
- A network-reachable Okatana deployment exposing the External API v1.
- An organization-scoped Okatana API credential with the scopes needed by the integration.
Composer¶
For local development using an extracted okatana-php directory, use a Composer path repository:
composer config repositories.okatana path ../okatana-php
composer require newfoundcodes/okatana-php:@dev
For published releases on Packagist:
Depends on Guzzle, PSR HTTP interfaces, and PSR logging interfaces. Communicates via PSR-18; default transport can be replaced.
Environment variables¶
Example environment variables:
Avoid committing tokens to .env files. Use standard secret management facilities.
Verify installation¶
<?php
require __DIR__ . '/vendor/autoload.php';
use Newfoundcodes\Okatana\OkatanaClient;
$client = OkatanaClient::create(
baseUrl: $_ENV['OKATANA_URL'],
apiKey: $_ENV['OKATANA_TOKEN'],
);
$response = $client->organizations()->get($_ENV['OKATANA_ORG']);
echo $response->statusCode . PHP_EOL;
Valid credentials return 200. Authentication and authorization failures throw typed exceptions.
Documentation dependencies¶
Build documentation:
For a production build: