Skip to content

Commit

Permalink
Merge pull request #9 from neeckeloo/chore/laminas-support
Browse files Browse the repository at this point in the history
Laminas support
  • Loading branch information
neeckeloo authored Jun 27, 2020
2 parents 4cafc00 + 9660bc6 commit cfd9e1e
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Monolog module for Zend Framework
Monolog module for Laminas
=================================

Module to integrate Monolog with Zend Framework projects.
Module to integrate Monolog with Laminas projects.

[![Build Status](https://img.shields.io/travis/neeckeloo/monolog-module.svg?style=flat-square)](http://travis-ci.org/neeckeloo/monolog-module)
[![Latest Stable Version](http://img.shields.io/packagist/v/neeckeloo/monolog-module.svg?style=flat-square)](https://packagist.org/packages/neeckeloo/monolog-module)
Expand All @@ -12,7 +12,7 @@ Module to integrate Monolog with Zend Framework projects.

* PHP 7.1+
* [monolog/monolog ^1.11 || ^2.0](http://www.github.com/Seldaek/monolog)
* [zendframework/zend-servicemanager ^2.7.6 || ^3.0.3](https://github.com/zendframework/zend-servicemanager)
* [laminas/laminas-servicemanager ^2.7.6 || ^3.0.3](https://github.com/laminas/laminas-servicemanager)

## Installation

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "neeckeloo/monolog-module",
"description": "Monolog integration into Zend Framework",
"description": "Monolog integration into Laminas",
"type": "library",
"keywords": [
"zf2", "monolog", "logger", "log"
"laminas", "monolog", "logger", "log"
],
"license": "MIT",
"homepage": "https://github.com/neeckeloo/MonologModule",
Expand All @@ -16,7 +16,7 @@
"require": {
"php": "^7.1",
"monolog/monolog": "^1.11 || ^2.0",
"zendframework/zend-servicemanager": "^2.7.6 || ^3.0.3"
"laminas/laminas-servicemanager": "^2.7.6 || ^3.0.3"
},
"require-dev": {
"graylog2/gelf-php": "~1.1",
Expand Down
2 changes: 1 addition & 1 deletion config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use MonologModule\Formatter\FormatterPluginManager;
use MonologModule\Handler\Factory\GelfHandlerFactory;
use MonologModule\Handler\HandlerPluginManager;
use Zend\ServiceManager\Factory\InvokableFactory;
use Laminas\ServiceManager\Factory\InvokableFactory;

return [
'service_manager' => [
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/FormatterPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Interop\Container\ContainerInterface;
use MonologModule\Formatter\FormatterPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class FormatterPluginManagerFactory implements FactoryInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/HandlerPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Interop\Container\ContainerInterface;
use MonologModule\Handler\HandlerPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class HandlerPluginManagerFactory implements FactoryInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/LoggerAbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Interop\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Zend\ServiceManager\AbstractFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\AbstractFactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class LoggerAbstractFactory implements AbstractFactoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/LoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use MonologModule\Exception;
use Psr\Log\LoggerInterface;
use ReflectionClass;
use Zend\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\AbstractPluginManager;

class LoggerFactory
{
Expand Down
4 changes: 2 additions & 2 deletions src/Formatter/FormatterPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use MonologModule\Exception;
use Monolog\Formatter\FormatterInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\Exception\InvalidServiceException;

class FormatterPluginManager extends AbstractPluginManager
{
Expand Down
8 changes: 4 additions & 4 deletions src/Handler/Factory/GelfHandlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
use Monolog\Handler\GelfHandler;
use Monolog\Logger;
use MonologModule\Exception;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class GelfHandlerFactory implements FactoryInterface
{
Expand All @@ -21,14 +21,14 @@ class GelfHandlerFactory implements FactoryInterface

public function __construct(array $options = [])
{
// Zend ServiceManager v2 allows factory creationOptions
// Laminas ServiceManager v2 allows factory creationOptions
$this->options = $options;
}

public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : GelfHandler
{
/**
* Avoid a BC break; Zend ServiceManager v2 will pass the options via the constructor, v3 to the __invoke()
* Avoid a BC break; Laminas ServiceManager v2 will pass the options via the constructor, v3 to the __invoke()
*/
if (null !== $options) {
$this->options = array_merge($this->options, $options);
Expand Down
4 changes: 2 additions & 2 deletions src/Handler/HandlerPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use MonologModule\Exception;
use Monolog\Handler\HandlerInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\Exception\InvalidServiceException;

class HandlerPluginManager extends AbstractPluginManager
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Factory/FormatterPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use MonologModule\Formatter\FormatterPluginManager;
use Monolog\Formatter\FormatterInterface;
use PHPUnit\Framework\TestCase;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class FormatterPluginManagerFactoryTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Factory/HandlerPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use MonologModule\Handler\HandlerPluginManager;
use Monolog\Handler\HandlerInterface;
use PHPUnit\Framework\TestCase;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class HandlerPluginManagerFactoryTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Factory/LoggerAbstractFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use MonologModule\Factory\LoggerAbstractFactory;
use MonologModule\Factory\LoggerFactory;
use PHPUnit\Framework\TestCase;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class LoggerAbstractFactoryTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Factory/LoggerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use MonologModule\Formatter\FormatterPluginManager;
use MonologModule\Handler\HandlerPluginManager;
use PHPUnit\Framework\TestCase;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class LoggerFactoryTest extends TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Formatter/FormatterPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use MonologModule\Formatter\FormatterPluginManager;
use PHPUnit\Framework\TestCase;
use stdClass;
use Zend\ServiceManager\Exception\InvalidServiceException;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\ServiceLocatorInterface;

class FormatterPluginManagerTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Handler/Factory/GelfHandlerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use MonologModule\Handler\Factory\GelfHandlerFactory;
use Monolog\Handler\GelfHandler;
use PHPUnit\Framework\TestCase;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;

class GelfHandlerFactoryTest extends TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Handler/HandlerPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use MonologModule\Handler\HandlerPluginManager;
use PHPUnit\Framework\TestCase;
use stdClass;
use Zend\ServiceManager\Exception\InvalidServiceException;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\ServiceLocatorInterface;

class HandlerPluginManagerTest extends TestCase
{
Expand Down

0 comments on commit cfd9e1e

Please sign in to comment.