Download the PHP package malikad778/php-sentinel without Composer

On this page you can find all versions of the php package malikad778/php-sentinel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sentinel

PHP Sentinel 🛡️

Latest Version on Packagist Tests License: MIT PHP Version Require

Passive API Contract Monitoring for strictly typed PHP 8.3+.

Sentinel silently monitors the JSON payloads returning from the third-party APIs you consume, automatically infers their structural JSON Schema, and detects when they change unexpectedly (drift).

❓ What Is It & What Does It Do?

When you integrate with external REST APIs, you build your internal systems, DTOs, and mappings around the structural "contract" of their responses. But APIs change—fields become nullable, new enum values appear, or keys are dropped entirely. Usually, you don't find out until your app crashes in production.

PHP Sentinel solves this. It acts as a passive proxy middleware on your HTTP clients (like Guzzle).

  1. Sampling: It watches the first N successful JSON responses from an endpoint and probabilistically infers the underlying JSON Schema (figuring out which fields are required, optional, null, what the enums are, and the exact nesting structure).
  2. Hardening: After enough samples, it locks in a "Baseline Schema" and stores it.
  3. Drift Detection: On all future requests, Sentinel compares the live response against your locked baseline. If the API adds, removes, or changes the type of any field, Sentinel instantly detects the drift.
  4. Alerting: Sentinel logs the drift to your PSR-3 Logger (e.g., Laravel's or Symfony's logger) and dispatches a PSR-14 Event so you can alert your team via Slack, Sentry, or email before it breaks your app.

✨ Features


💻 How Developers Can Utilize This

Installation

1. The Laravel Way 🔴

Sentinel natively integrates with Laravel and the Http:: facade.

Just publish the config:

Then attach Sentinel to any outgoing API request using the withSentinel() macro!

As traffic flows through, Sentinel will automatically store schemas in your configured database or Redis, and write warnings directly into your Laravel Log.

2. The Symfony Way 🎹

Enable the SentinelBundle in your config/bundles.php:

Define your settings in config/packages/sentinel.yaml:

The bundle automatically wires the Sentinel singleton into your Dependency Injection container so you can inject it anywhere.

3. The Framework-Agnostic Way (PSR-18)

Inject SchemaWatcher into any PSR-18 middleware stack (like Guzzle).


🛠 Project Architecture & Structure

The framework was built with strict modularity, targeting PHPStan Level 8.


🚨 Responding to Drift Programmatically

While Sentinel logs drift warnings out-of-the-box, you probably want to trigger custom actions (like paging an on-call engineer) when a breaking change happens.

Sentinel broadcasts the Sentinel\Events\SchemaDriftDetected PSR-14 event. Listen to it in your app:

🧰 CLI Tools

Sentinel comes with a standalone executable (bin/sentinel) and registers identical artisan/console commands into your framework.


All versions of php-sentinel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/http-client Version ^1.0
psr/log Version ^3.0
psr/event-dispatcher Version ^1.0
symfony/console Version ^7.0|^8.0
guzzlehttp/psr7 Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package malikad778/php-sentinel contains the following files

Loading the files please wait ...