Search by

assegaiphp / common

amasiye

Shared HTTP, logging, path, exception, and queue primitives for AssegaiPHP packages.

Package info

github.com/assegaiphp/common

pkg:composer/assegaiphp/common

Statistics

Installs: 1 540

Dependents: 4

Suggesters: 0

Stars: 1

Open Issues: 0

0.11.0 2026-11-16 10:28 UTC

This package is auto-updated.

Last update: 2026-11-16 15:17:22 UTC


README

AssegaiPHP Logo

Latest release Tests PHP 8.4+ License Status active

AssegaiPHP Common

Shared HTTP, logging, path, exception, and queue primitives for AssegaiPHP packages.

assegaiphp/common contains the small contracts and implementations that need to remain consistent across the framework ecosystem. It is infrastructure for first-party packages, not the AssegaiPHP application framework itself.

The package currently provides:

  • an injectable HTTP client
  • PSR-3-compatible logging support
  • shared framework and HTTP exceptions
  • path helpers and terminal color enumerations
  • queue interfaces, typed job encoding, job-type discovery, and process results used by the official queue transports

Requirements

  • PHP 8.4 or newer

Installation

composer require 'assegaiphp/common:~0.11.0'

HTTP client

use Assegai\Common\Http\HttpClient;
use GuzzleHttp\Client;

$client = new HttpClient(new Client());
$response = $client->get('https://example.com/api/status');

Queue contracts

The queue contracts provide a transport-neutral boundary shared by packages such as assegaiphp/beanstalkd and assegaiphp/rabbitmq. JsonQueueJobCodec preserves a job's top-level class and JSON-safe state, while QueueJobTypeResolver discovers the domain type declared by a processor.

Applications normally consume these contracts through Core dependency injection and the official queue packages rather than constructing the transport boundary directly.

Contributing

For contribution and pull request conventions, see Commit and PR Guidelines.

License

This package is released under the MIT license.