Download the PHP package mrthito/microservice without Composer
On this page you can find all versions of the php package mrthito/microservice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mrthito/microservice
More information about mrthito/microservice
Files in mrthito/microservice
Download mrthito/microservice
More information about mrthito/microservice
Files in mrthito/microservice
Vendor mrthito
Package microservice
Short Description Lightweight PHP microservice foundation: env, logging, Redis queue, signed events, and HTTP health checks.
License MIT
Homepage https://github.com/mrthito/microservice
Package microservice
Short Description Lightweight PHP microservice foundation: env, logging, Redis queue, signed events, and HTTP health checks.
License MIT
Homepage https://github.com/mrthito/microservice
Please rate this library. Is it a good library?
Informations about the package microservice
mrthito/microservice
Lightweight PHP foundation for event-driven microservices that share a Laravel database and Redis queue — with zero framework dependencies.
Requirements
- PHP 8.4+
- Extensions:
json,openssl,pdo
Installation
Features
.envloading without external dependencies- Secure stdout logging with sensitive field redaction
- PDO MySQL connection helper
- Laravel
APP_KEYpayload decryption - Minimal Redis RESP client (BRPOP)
- HMAC-SHA256 signed queue event verification
- Minimal HTTP router with built-in
/healthroute by default Http\Serverfor one-line HTTP entrypointsboot.jsonservice manifest reader
Quick start
1. Implement service config
2. Wire the queue worker
3. Expose the HTTP server
Health routes (/health and /) are registered automatically.
Add custom routes before serving:
Service manifest
Each microservice should include a boot.json file in its project root:
Load it with Manifest::load($basePath). The health path is exposed via MicroServiceConfig::healthPath() and used by the default router.
Security
- Sign queue payloads with
EventSigner::sign($payload, $secret)before publishing. - Verify events with
SignedEventVerifierbefore processing. - Set
REQUIRE_REDIS_PASSWORD=truein production when Redis uses AUTH. - Use signing secrets of at least 32 characters.
Testing
Publishing to Packagist
- Push this repository to GitHub (for example
github.com/mrthito/microservice). - Create a release tag:
git tag v1.0.0 && git push origin v1.0.0. - Submit the repository URL at packagist.org.
- Enable the Packagist GitHub hook for automatic updates on new tags.
License
The MIT License (MIT). Please see LICENSE for more information.
All versions of microservice with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
ext-json Version *
ext-openssl Version *
ext-pdo Version *
ext-json Version *
ext-openssl Version *
ext-pdo Version *
The package mrthito/microservice contains the following files
Loading the files please wait ...