Download the PHP package andrewdyer/shutdown-handler without Composer

On this page you can find all versions of the php package andrewdyer/shutdown-handler. 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 shutdown-handler

Shutdown Handler

A shutdown handler for Slim Framework applications that converts fatal errors into consistent HTTP responses.

Latest Stable Version Total Downloads License PHP Version Require

Introduction

This library provides a shutdown handler for Slim Framework applications, intercepting fatal errors that would otherwise result in unhandled crashes and transforming them into consistent HTTP responses. The handler is fully composable, allowing different responder and emitter strategies to be combined as required, and integrates seamlessly with existing Slim error handling and response emission workflows to maintain predictable application behaviour.

Prerequisites

Installation

Getting Started

An error responder and response emitter are required before registering the shutdown handler.

1. Create an error responder

Error responders define how errors are transformed into HTTP responses.

Alternatively, wrap existing logic using CallableErrorResponder:

The callable must accept a request, exception, and display flag, and return a PSR-7 response.

2. Create a response emitter

Response emitters are responsible for sending responses to the client.

Alternatively, wrap an existing emitter using CallableResponseEmitter:

The adapter wraps an existing emitter implementation.

Usage

Register the shutdown handler to convert fatal errors into consistent HTTP responses:

The $errorResponder and $responseEmitter values can come from custom implementations or the callable adapters shown in Getting Started.

License

Licensed under the MIT license and is free for private or commercial projects.


All versions of shutdown-handler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/http-message Version ^2.0
slim/slim Version ^4.15
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 andrewdyer/shutdown-handler contains the following files

Loading the files please wait ...