Download the PHP package designcise/bitframe-whoops without Composer

On this page you can find all versions of the php package designcise/bitframe-whoops. 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 bitframe-whoops

BitFrame\Whoops

CI Maintainability Test Coverage

Whoops error handler middleware to handle application or middleware specific errors.

Installation

Please note that this package requires PHP 8.2.0 or newer.

Quickstart

Instantiating

The constructor has the following signature:

  1. The first argument to the constructor must be an instance of Psr\Http\Message\ResponseFactoryInterface;
  2. The second argument to the constructor must be an implementation of \BitFrame\Whoops\Provider\ProviderInterface;
  3. The third argument to the constructor is an optional array of options to specify the following:
    1. catchGlobalErrors: When set to true errors will be handled outside of current batch of middleware set.
    2. Other options are simply method names in Whoops\Handler\*Handler.php and BitFrame\Whoops\Handler\*Handler.php. For example, to set Whoops\Handler\JsonResponseHandler::setJsonApi() you would pass in: ['setJsonApi' => false], etc.

As a shortcut, you can also use the static method ErrorHandler::fromNegotiator($factory, $options). This would use the \BitFrame\Whoops\Provider\HandlerProviderNegotiator by default.

How to Run the Middleware

To run the middleware, simply pass in a BitFrame\Whoops\ErrorHandler instance to your middleware runner / dispatcher.

For example, to handle middleware-specific errors with BitFrame\App (or other PSR-15 dispatchers) it would look something like this:

To handle global errors with BitFrame\App (or other PSR-15 dispatchers) it would look something like this:

How Does It Work?

The error handler middleware automatically determines the error handler to use based on the Accept header. The following error handler providers are included:

  1. BitFrame\Whoops\Provider\HtmlHandlerProvider for Whoops\Handler\PrettyPageHandler;
  2. BitFrame\Whoops\Provider\JsonHandlerProvider for Whoops\Handler\JsonResponseHandler;
  3. BitFrame\Whoops\Provider\JsonpHandlerProvider for BitFrame\Whoops\Handler\JsonpResponseHandler;
  4. BitFrame\Whoops\Provider\TextHandlerProvider for Whoops\Handler\PlainTextHandler;
  5. BitFrame\Whoops\Provider\XmlHandlerProvider for Whoops\Handler\XmlResponseHandler;

Tests

To run the tests you can use the following commands:

Command Type
composer test PHPUnit tests
composer style CodeSniffer
composer md MessDetector
composer check PHPStan

Contributing

Documentation

Complete documentation for v3 will be available soon.

License

Please see License File for licensing information.


All versions of bitframe-whoops with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
filp/whoops Version ^2.15
psr/http-factory Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.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 designcise/bitframe-whoops contains the following files

Loading the files please wait ....