Skip to content

Commit

Permalink
Replace Interop Interfaces with PSR Interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hopfe <[email protected]>
  • Loading branch information
nusphere committed Dec 2, 2023
1 parent 14881f7 commit 9ccc155
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 29 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"laminas/laminas-escaper": "^2.5",
"laminas/laminas-filter": "^2.5",
"laminas/laminas-mail": "^2.6.1",
"laminas/laminas-servicemanager": "^3.12",
"laminas/laminas-validator": "^2.10.1",
"mikey179/vfsstream": "^1.6.7",
"phpspec/prophecy-phpunit": "^2.0",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/FilterPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Config;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerInterface;

use function is_array;

Expand Down
2 changes: 1 addition & 1 deletion src/FormatterPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Config;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerInterface;

use function is_array;

Expand Down
4 changes: 1 addition & 3 deletions src/LoggerAbstractServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Laminas\ServiceManager\AbstractFactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;

/**
Expand Down Expand Up @@ -78,7 +77,6 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $
* @param string $name
* @param string $requestedName
* @return Logger
* @throws ContainerException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
Expand Down
2 changes: 1 addition & 1 deletion src/LoggerServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
namespace Laminas\Log;

use ArrayAccess;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\Exception\InvalidArgumentException;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;

use function get_class;
Expand Down
2 changes: 1 addition & 1 deletion src/ProcessorPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Config;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerInterface;

use function is_array;

Expand Down
4 changes: 1 addition & 3 deletions src/PsrLoggerAbstractAdapterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Laminas\ServiceManager\AbstractFactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;

/**
Expand All @@ -35,7 +34,6 @@ public function __construct()
/**
* @param string $requestedName
* @return PsrLoggerAdapter
* @throws ContainerException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/Factory/WriterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Laminas\Log\Writer\Factory;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerInterface;

use function class_exists;
use function is_array;
Expand Down
2 changes: 1 addition & 1 deletion src/WriterPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Laminas\Log;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Config;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Psr\Container\ContainerInterface;

use function is_array;

Expand Down
4 changes: 2 additions & 2 deletions test/FilterPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace LaminasTest\Log;

use Closure;
use Interop\Container\ContainerInterface;
use Laminas\Log\Filter\FilterInterface;
use Laminas\Log\FilterPluginManager;
use Laminas\Log\FilterPluginManagerFactory;
use Laminas\ServiceManager\ServiceLocatorInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class FilterPluginManagerFactoryTest extends TestCase
{
Expand All @@ -34,7 +34,7 @@ public function testFactoryReturnsPluginManager(): void
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void
public function testFactoryConfiguresPluginManagerUnderContainerPSR(): void
{
$container = $this->prophesize(ContainerInterface::class)->reveal();
$filter = $this->prophesize(FilterInterface::class)->reveal();
Expand Down
4 changes: 2 additions & 2 deletions test/FormatterPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace LaminasTest\Log;

use Closure;
use Interop\Container\ContainerInterface;
use Laminas\Log\Formatter\FormatterInterface;
use Laminas\Log\FormatterPluginManager;
use Laminas\Log\FormatterPluginManagerFactory;
use Laminas\ServiceManager\ServiceLocatorInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class FormatterPluginManagerFactoryTest extends TestCase
{
Expand All @@ -34,7 +34,7 @@ public function testFactoryReturnsPluginManager(): void
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void
public function testFactoryConfiguresPluginManagerUnderContainerPSR(): void
{
$container = $this->prophesize(ContainerInterface::class)->reveal();
$formatter = $this->prophesize(FormatterInterface::class)->reveal();
Expand Down
4 changes: 2 additions & 2 deletions test/ProcessorPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace LaminasTest\Log;

use Closure;
use Interop\Container\ContainerInterface;
use Laminas\Log\Processor\ProcessorInterface;
use Laminas\Log\ProcessorPluginManager;
use Laminas\Log\ProcessorPluginManagerFactory;
use Laminas\ServiceManager\ServiceLocatorInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class ProcessorPluginManagerFactoryTest extends TestCase
{
Expand All @@ -34,7 +34,7 @@ public function testFactoryReturnsPluginManager(): void
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void
public function testFactoryConfiguresPluginManagerUnderContainerPSR(): void
{
$container = $this->prophesize(ContainerInterface::class)->reveal();
$processor = $this->prophesize(ProcessorInterface::class)->reveal();
Expand Down
1 change: 0 additions & 1 deletion test/Writer/DbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class DbTest extends TestCase
private MockDbAdapter $db;
private DbWriter $writer;


protected function setUp(): void
{
$this->tableName = 'db-table-name';
Expand Down
2 changes: 1 addition & 1 deletion test/Writer/Factory/WriterFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace LaminasTest\Log\Writer\Factory;

use Interop\Container\ContainerInterface;
use Laminas\Log\Writer\Factory\WriterFactory;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\Exception\InvalidServiceException;
use Laminas\ServiceManager\ServiceLocatorInterface;
use LaminasTest\Log\Writer\TestAsset\InvokableObject;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class WriterFactoryTest extends TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions test/WriterPluginManagerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace LaminasTest\Log;

use Closure;
use Interop\Container\ContainerInterface;
use Laminas\Log\Writer\WriterInterface;
use Laminas\Log\WriterPluginManager;
use Laminas\Log\WriterPluginManagerFactory;
use Laminas\ServiceManager\ServiceLocatorInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

class WriterPluginManagerFactoryTest extends TestCase
{
Expand All @@ -34,7 +34,7 @@ public function testFactoryReturnsPluginManager(): void
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void
public function testFactoryConfiguresPluginManagerUnderContainerPSR(): void
{
$container = $this->prophesize(ContainerInterface::class)->reveal();
$writer = $this->prophesize(WriterInterface::class)->reveal();
Expand Down

0 comments on commit 9ccc155

Please sign in to comment.