This package provides convenient access to the ScalarPhpTest REST API from PHP applications. It is generated from your OpenAPI document with typed models, resource clients, pagination helpers, and PHP 8.1+ support.
The full generated API reference is available in api.md and the operation inventory is available in reference.md.
composer require amritk/scalar-testInstantiate the generated client and call methods from resource clients.
<?php
use ScalarPhpTest\ScalarPhpTest;
$client = new ScalarPhpTest(
);
$client->ping->ping();Request params and response bodies are generated as typed PHP classes with strict types enabled. Models include array conversion helpers for working with JSON payloads.
Non-success responses throw generated API exceptions that expose status code, headers, raw response body, and request id metadata when available.
The runtime supports client-level and per-request timeout, retry, header, query, base URL, and idempotency options.
Retryable responses honor Retry-After before exponential backoff.
Paginated operations return page helpers that expose response data and next-page metadata when pagination is described by the OpenAPI document.
Raw response helpers are available when callers need status, headers, or unparsed response bodies. Per-request options provide an escape hatch for extra headers and query params.
PHP 8.1+ with Composer PSR-4 autoloading.