From 9660bc6e126fb1a0599c892bfe998f06b3429511 Mon Sep 17 00:00:00 2001 From: Nicolas Eeckeloo Date: Sat, 27 Jun 2020 14:25:34 +0200 Subject: [PATCH] Laminas support --- README.md | 6 +++--- composer.json | 6 +++--- config/module.config.php | 2 +- src/Factory/FormatterPluginManagerFactory.php | 4 ++-- src/Factory/HandlerPluginManagerFactory.php | 4 ++-- src/Factory/LoggerAbstractFactory.php | 4 ++-- src/Factory/LoggerFactory.php | 2 +- src/Formatter/FormatterPluginManager.php | 4 ++-- src/Handler/Factory/GelfHandlerFactory.php | 8 ++++---- src/Handler/HandlerPluginManager.php | 4 ++-- tests/Factory/FormatterPluginManagerFactoryTest.php | 2 +- tests/Factory/HandlerPluginManagerFactoryTest.php | 2 +- tests/Factory/LoggerAbstractFactoryTest.php | 2 +- tests/Factory/LoggerFactoryTest.php | 2 +- tests/Formatter/FormatterPluginManagerTest.php | 4 ++-- tests/Handler/Factory/GelfHandlerFactoryTest.php | 2 +- tests/Handler/HandlerPluginManagerTest.php | 4 ++-- 17 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index b345884..5fca635 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 diff --git a/composer.json b/composer.json index cd234fa..3bc2ef8 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -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", diff --git a/config/module.config.php b/config/module.config.php index 19d7d74..fdad857 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -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' => [ diff --git a/src/Factory/FormatterPluginManagerFactory.php b/src/Factory/FormatterPluginManagerFactory.php index 534949d..eed382d 100644 --- a/src/Factory/FormatterPluginManagerFactory.php +++ b/src/Factory/FormatterPluginManagerFactory.php @@ -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 { diff --git a/src/Factory/HandlerPluginManagerFactory.php b/src/Factory/HandlerPluginManagerFactory.php index e8630d5..76772da 100644 --- a/src/Factory/HandlerPluginManagerFactory.php +++ b/src/Factory/HandlerPluginManagerFactory.php @@ -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 { diff --git a/src/Factory/LoggerAbstractFactory.php b/src/Factory/LoggerAbstractFactory.php index 7587ab8..85d018a 100644 --- a/src/Factory/LoggerAbstractFactory.php +++ b/src/Factory/LoggerAbstractFactory.php @@ -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 { diff --git a/src/Factory/LoggerFactory.php b/src/Factory/LoggerFactory.php index 75e819f..b4dd107 100644 --- a/src/Factory/LoggerFactory.php +++ b/src/Factory/LoggerFactory.php @@ -13,7 +13,7 @@ use MonologModule\Exception; use Psr\Log\LoggerInterface; use ReflectionClass; -use Zend\ServiceManager\AbstractPluginManager; +use Laminas\ServiceManager\AbstractPluginManager; class LoggerFactory { diff --git a/src/Formatter/FormatterPluginManager.php b/src/Formatter/FormatterPluginManager.php index c880d27..7231067 100644 --- a/src/Formatter/FormatterPluginManager.php +++ b/src/Formatter/FormatterPluginManager.php @@ -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 { diff --git a/src/Handler/Factory/GelfHandlerFactory.php b/src/Handler/Factory/GelfHandlerFactory.php index e0247da..7d32ead 100644 --- a/src/Handler/Factory/GelfHandlerFactory.php +++ b/src/Handler/Factory/GelfHandlerFactory.php @@ -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 { @@ -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); diff --git a/src/Handler/HandlerPluginManager.php b/src/Handler/HandlerPluginManager.php index b44f990..a223bb6 100644 --- a/src/Handler/HandlerPluginManager.php +++ b/src/Handler/HandlerPluginManager.php @@ -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 { diff --git a/tests/Factory/FormatterPluginManagerFactoryTest.php b/tests/Factory/FormatterPluginManagerFactoryTest.php index adaf4ca..8ebebab 100644 --- a/tests/Factory/FormatterPluginManagerFactoryTest.php +++ b/tests/Factory/FormatterPluginManagerFactoryTest.php @@ -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 { diff --git a/tests/Factory/HandlerPluginManagerFactoryTest.php b/tests/Factory/HandlerPluginManagerFactoryTest.php index f297e3b..b3397a1 100644 --- a/tests/Factory/HandlerPluginManagerFactoryTest.php +++ b/tests/Factory/HandlerPluginManagerFactoryTest.php @@ -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 { diff --git a/tests/Factory/LoggerAbstractFactoryTest.php b/tests/Factory/LoggerAbstractFactoryTest.php index e01d585..8828737 100644 --- a/tests/Factory/LoggerAbstractFactoryTest.php +++ b/tests/Factory/LoggerAbstractFactoryTest.php @@ -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 { diff --git a/tests/Factory/LoggerFactoryTest.php b/tests/Factory/LoggerFactoryTest.php index b6b92f0..51abc40 100644 --- a/tests/Factory/LoggerFactoryTest.php +++ b/tests/Factory/LoggerFactoryTest.php @@ -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 { diff --git a/tests/Formatter/FormatterPluginManagerTest.php b/tests/Formatter/FormatterPluginManagerTest.php index a036c27..1523e16 100644 --- a/tests/Formatter/FormatterPluginManagerTest.php +++ b/tests/Formatter/FormatterPluginManagerTest.php @@ -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 { diff --git a/tests/Handler/Factory/GelfHandlerFactoryTest.php b/tests/Handler/Factory/GelfHandlerFactoryTest.php index 3e2c1b4..ba299b1 100644 --- a/tests/Handler/Factory/GelfHandlerFactoryTest.php +++ b/tests/Handler/Factory/GelfHandlerFactoryTest.php @@ -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 { diff --git a/tests/Handler/HandlerPluginManagerTest.php b/tests/Handler/HandlerPluginManagerTest.php index 9a49d37..65df708 100644 --- a/tests/Handler/HandlerPluginManagerTest.php +++ b/tests/Handler/HandlerPluginManagerTest.php @@ -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 {