Skip to content

Commit

Permalink
Merge pull request #22 from neeckeloo/chore/add-monolog-v3-support
Browse files Browse the repository at this point in the history
Add Monolog v3 support
  • Loading branch information
neeckeloo authored Nov 26, 2022
2 parents bdcb8d8 + 207bc0e commit 4d23233
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Module to integrate Monolog with Laminas projects.
## Requirements

* PHP ^8.0
* [monolog/monolog ^2.0](http://www.github.com/Seldaek/monolog)
* [monolog/monolog ^2.0 || ^3.0](http://www.github.com/Seldaek/monolog)
* [laminas/laminas-servicemanager ^3.3.2](https://github.com/laminas/laminas-servicemanager)

## Installation
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0",
"monolog/monolog": "^2.0",
"monolog/monolog": "^2.0 || ^3.0",
"laminas/laminas-servicemanager": "^3.3.2"
},
"require-dev": {
Expand Down
4 changes: 3 additions & 1 deletion tests/Factory/LoggerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Laminas\ServiceManager\ServiceManager;
use Monolog\Formatter\JsonFormatter;
use Monolog\Handler\TestHandler;
use Monolog\Level;
use Monolog\Logger;
use Monolog\Processor\TagProcessor;
use MonologModule\Exception\RuntimeException;
Expand Down Expand Up @@ -58,7 +59,8 @@ public function testCreateLoggerWithHandlerIncludingOptions()
$factory = new LoggerFactory();
$factory->setContainer(new ServiceManager());

$level = Logger::CRITICAL;
$level = class_exists(Level::class) ? Level::Critical : Logger::CRITICAL;

$config = [
'name' => 'foo',
'handlers' => [
Expand Down

0 comments on commit 4d23233

Please sign in to comment.