Download the PHP package samsonasik/error-hero-module without Composer

On this page you can find all versions of the php package samsonasik/error-hero-module. 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 error-hero-module

ErrorHeroModule

Latest Version ci build Code Coverage PHPStan Downloads

This is README for version ^5.0 which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.1.

For version ^4.0, you can read at version 4 readme which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.0.

Introduction

ErrorHeroModule is a module for Error Logging (DB and Mail) your Laminas Mvc 3 Application, and Mezzio 3 for Exceptions in 'dispatch.error' or 'render.error' or during request and response, and PHP E_* Error.

Features

Installation

1. Import the following SQL for Mysql

If you use other RDBMS, you may follow the log table structure above.

2. Setup your Laminas\Db\Adapter\AdapterInterface service or your Doctrine\ORM\EntityManager service config

You can use 'db' (with Laminas\Db) config or 'doctrine' (with DoctrineORMModule) config that will be transformed to be usable with Laminas\Log\Writer\Db.

OR

If you use other RDBMS, you may configure your own db or doctrine config.

3. Require this module uses composer.

4. Copy config

a. For Laminas Mvc application, copy error-hero-module.local.php.dist config to your local's autoload and configure it

source destination
vendor/samsonasik/error-hero-module/config/error-hero-module.local.php.dist config/autoload/error-hero-module.local.php

Or run copy command:

b. For Mezzio application, copy mezzio-error-hero-module.local.php.dist config to your local's autoload and configure it

source destination
vendor/samsonasik/error-hero-module/config/mezzio-error-hero-module.local.php.dist config/autoload/mezzio-error-hero-module.local.php

Or run copy command:

When done, you can modify logger service named ErrorHeroModuleLogger and error-hero-module config in your's local config:

5. Lastly, enable it

a. For Laminas Mvc application

b. For Mezzio application

For laminas-mezzio-skeleton ^3.0.0, you need to open config/pipeline.php and add the ErrorHeroModule\Middleware\Mezzio::class middleware after default ErrorHandler::class registration:

and also add error-preview routes in config/routes.php (optional) :

to enable error preview page. To disable error preview page, just remove it from routes.

Give it a try!

Web Access

URl Preview For
http://yourlaminasormezzioapp/error-preview Exception
http://yourlaminasormezzioapp/error-preview/error Error
http://yourlaminasormezzioapp/error-preview/warning PHP E_WARNING
http://yourlaminasormezzioapp/error-preview/fatal PHP Fatal Error

You will get the following page if display_errors config is 0:

error preview in web

Console Access

You can use this module in laminas-cli, you can install:

then you can see the error-preview console:

Command Preview For
vendor/bin/laminas errorheromodule:preview Exception
vendor/bin/laminas errorheromodule:preview error Error
vendor/bin/laminas errorheromodule:preview warning PHP E_WARNING
vendor/bin/laminas errorheromodule:preview fatal PHP Fatal

You will get the following page if display_errors config is 0:

error preview in console

You can use the error handling in your console application, by extends BaseLoggingCommand, like below:

and register to your services like in the documentation.

For production env, you can disable error-preview sample page with set ['error-hero-module']['enable-error-preview-page'] to false.

Contributing

Contributions are very welcome. Please read CONTRIBUTING.md


All versions of error-hero-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laminas/laminas-db Version ^2.16.2
laminas/laminas-diactoros Version ^2.22
laminas/laminas-log Version ^2.16
laminas/laminas-mail Version ^2.21
laminas/laminas-psr7bridge Version ^1.8
laminas/laminas-uri Version ^2.10
psr/container Version ^1.1.2 || 2.0
samsonasik/array-lookup Version ^1.0
seld/jsonlint Version ^1.9
webmozart/assert Version ^1.11
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 samsonasik/error-hero-module contains the following files

Loading the files please wait ....