Skip to content

Commit

Permalink
Migrate to Laminas/Mezzio
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelien committed Nov 20, 2020
1 parent a7861bc commit bae6f77
Show file tree
Hide file tree
Showing 8 changed files with 1,246 additions and 1,701 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Zend Expressive Monolog ErrorHandler
# Mezzio Monolog ErrorHandler

[![Latest Stable Version](https://poser.pugx.org/geo6/zend-expressive-monolog/v/stable)](https://packagist.org/packages/geo6/zend-expressive-monolog)
[![Total Downloads](https://poser.pugx.org/geo6/zend-expressive-monolog/downloads)](https://packagist.org/packages/geo6/zend-expressive-monolog)
[![Monthly Downloads](https://poser.pugx.org/geo6/zend-expressive-monolog/d/monthly.png)](https://packagist.org/packages/geo6/zend-expressive-monolog)
[![Latest Stable Version](https://poser.pugx.org/geo6/mezzio-monolog/v/stable)](https://packagist.org/packages/geo6/mezzio-monolog)
[![Total Downloads](https://poser.pugx.org/geo6/mezzio-monolog/downloads)](https://packagist.org/packages/geo6/mezzio-monolog)
[![Monthly Downloads](https://poser.pugx.org/geo6/mezzio-monolog/d/monthly.png)](https://packagist.org/packages/geo6/mezzio-monolog)
[![Software License](https://img.shields.io/badge/license-GPL--3.0-brightgreen.svg)](LICENSE)

This library enables [Monolog](https://github.com/Seldaek/monolog) as ErrorHandler in Zend Expressive.
This library enables [Monolog](https://github.com/Seldaek/monolog) as ErrorHandler in Mezzio.

Currently, there are 2 handlers supported (more will be added if needed):

- [`StreamHandler`](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php): Logs records into any PHP stream, use this for log files.
- [`SentryHandler`](https://github.com/geo6/zend-expressive-monolog/blob/master/src/Handler/SentryHandler.php): Logs records to [Sentry.io](https://sentry.io/) (requires `sentry/sdk` package).
- [`SentryHandler`](https://github.com/geo6/mezzio-monolog/blob/master/src/Handler/SentryHandler.php): Logs records to [Sentry.io](https://sentry.io/) (requires `sentry/sdk` package).

## Install

```
composer require geo6/zend-expressive-monolog
```cmd
composer require geo6/mezzio-monolog
```

## Configuration
Expand All @@ -41,13 +41,13 @@ return [

## Usage

To enable it, you just have to add `Geo6\Expressive\Monolog\ConfigProvider::class` to your main configuration (usually `config/config.php`):
To enable it, you just have to add `Geo6\Mezzio\Monolog\ConfigProvider::class` to your main configuration (usually `config/config.php`):

```diff
...

$aggregator = new ConfigAggregator([
+ Geo6\Expressive\Monolog\ConfigProvider::class,
+ Geo6\Mezzio\Monolog\ConfigProvider::class,

...
], $cacheConfig['config_cache_path']);
Expand Down
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "geo6/zend-expressive-monolog",
"name": "geo6/mezzio-monolog",
"type": "library",
"description": "Zend Expressive Monolog ErrorHandler",
"description": "Mezzio Monolog ErrorHandler",
"license": "GPL-3.0-or-later",
"require": {
"monolog/monolog": "^1.24",
"zendframework/zend-expressive": "^3.2",
"zendframework/zend-servicemanager": "^3.4"
"monolog/monolog": "^1.24 || ^2.0",
"mezzio/mezzio": "^3.2",
"laminas/laminas-servicemanager": "^3.4",
"laminas/laminas-dependency-plugin": "^2.1"
},
"require-dev": {
"phpstan/phpstan": "^0.11.15",
"phpstan/phpstan-strict-rules": "^0.11.1",
"sentry/sdk": "^2.0",
"phpstan/phpstan": "^0.12.56",
"phpstan/phpstan-strict-rules": "^0.12.5",
"sentry/sdk": "^3.0",
"squizlabs/php_codesniffer": "^3.4"
},
"suggest": {
Expand All @@ -22,7 +23,7 @@
},
"autoload": {
"psr-4": {
"Geo6\\Expressive\\Monolog\\": "src/"
"Geo6\\Mezzio\\Monolog\\": "src/"
}
},
"scripts": {
Expand Down
Loading

0 comments on commit bae6f77

Please sign in to comment.