autotix/php-sdk

Shared PHP core for Autotix framework integrations (Drupal, WordPress, Laravel). Wire format, HTTP client, auth, and utilities — framework-agnostic.

Maintainers

Package info

github.com/HelloWorldDevs/autotix-php-sdk

Homepage

pkg:composer/autotix/php-sdk

Statistics

Installs: 0

Dependents: 3

Suggesters: 1

Stars: 0

Open Issues: 0

0.1.0 2026-06-11 22:25 UTC

This package is auto-updated.

Last update: 2026-06-15 20:51:41 UTC


README

Shared PHP core for the Autotix framework integrations (Drupal, WordPress, Laravel). Wire format, webhook HTTP client, auth, and utilities — framework-agnostic.

Autotix turns production errors into tickets (Jira or GitHub Issues) and AI-generated fix PRs automatically.

This repository is a read-only mirror, split from the Autotix monorepo. Issues and PRs are welcome here and will be applied upstream.

Install

composer require autotix/php-sdk

Requires PHP >= 8.1 and any PSR-18 HTTP client (Guzzle works out of the box and is what Drupal, WordPress, and Laravel ship with).

What's inside

Class Purpose
Autotix\PhpSdk\WebhookClient Sends error payloads to the Autotix webhook. JSON encoding, X-Webhook-Token or HMAC-SHA256 auth, debug logging, delivery-outcome recording.
Autotix\PhpSdk\BacktraceFormatter Formats debug_backtrace() output into a stack-trace string.
Autotix\PhpSdk\UrlExtractor Extracts the request URL from the current environment for error attribution.
Autotix\PhpSdk\StateRecorderInterface Optional sink for delivery outcomes (back it with Drupal state, WP options, Laravel cache, …).

Usage

use Autotix\PhpSdk\WebhookClient;

$client = new WebhookClient(
    $psr18Client,          // any PSR-18 ClientInterface
    $psr17RequestFactory,  // PSR-17 RequestFactoryInterface
    $psr17StreamFactory,   // PSR-17 StreamFactoryInterface
    [
        'auth_method' => 'token',           // or 'hmac'
        'auth_token'  => 'your-org-token',  // from app.autotix.io → Settings
    ],
);

$client->send([
    'message'     => $exception->getMessage(),
    'stack_trace' => $exception->getTraceAsString(),
    'url'         => 'https://example.com/checkout',
    'environment' => 'production',
]);

If you're on Drupal, WordPress, or Laravel, use the corresponding integration instead — they wire all of this up for you.

Development

composer install
vendor/bin/phpunit

License

MIT