Skip to content

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assegai Logo

Latest release Tests PHP 8.4+ License Status active

A progressive PHP framework for building effecient and scalable server-side applications.

AssegaiPHP Common Library

Welcome to the AssegaiPHP common library! This package provides a set of common classes and utilities that can be used in any AssegaiPHP project.

The package includes the following features:

  • HttpClient class: A simple and flexible class for performing HTTP requests. It supports GET, POST, PUT, DELETE and other request methods, and can also handle request headers and parameters.
  • Queue contracts: Versioned JSON job encoding, callback job-type discovery, typed hydration, and canonical one-delivery process results shared by first-party queue drivers.
  • Utility classes: A collection of classes for common tasks such as logging, path manipulation, and more.

All classes are designed to be injectable and can be easily integrated into any AssegaiPHP application.

Contribution workflow

For commit and pull request conventions in this repo, see:

To install the package, simply require it in your composer.json file:

composer require assegaiphp/common

You can then use the classes in your application by importing the namespace:

use Assegai\Common\Http\HttpClient;

Queue transports use JsonQueueJobCodec to preserve a job's top-level class and JSON-safe state. During consumption, QueueJobTypeResolver reads the processor's first parameter and the codec hydrates that declared domain type. Legacy JSON objects remain readable, while processors declared only as object receive stdClass.

You can also use the #[Injectable] attribute to easily inject the HttpClient class into your controllers and services.

We hope you find the AssegaiPHP common library useful in your projects! If you have any questions or feedback, please open an issue on the GitHub repository.

About

This package provides a set of common classes and utilities that can be used in any AssegaiPHP project

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages