autotix/php-sdk
Composer 安装命令:
composer require autotix/php-sdk
包简介
Shared PHP core for Autotix framework integrations (Drupal, WordPress, Laravel). Wire format, HTTP client, auth, and utilities — framework-agnostic.
README 文档
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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 3
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-15