Skip to content

Commit

Permalink
drop aura/di support
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 28, 2024
1 parent 797beb5 commit 046be3b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 72 deletions.
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"twig",
"plates",
"symfony",
"aura",
"pimple"
],
"homepage": "https://github.com/samsonasik/ErrorHeroModule",
Expand Down Expand Up @@ -57,7 +56,6 @@
"laminas/laminas-mvc-console": "*"
},
"require-dev": {
"aura/di": "^3.4 || ^4.2.1",
"doctrine/dbal": "^3.9.3",
"doctrine/doctrine-orm-module": "^4.2.1 || ^5.3",
"kahlan/kahlan": "^5.2.8",
Expand Down
12 changes: 0 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1080,18 +1080,6 @@ parameters:
count: 1
path: src/Module.php

-
message: '#^Cannot access property \$locked on mixed\.$#'
identifier: property.nonObject
count: 1
path: src/Transformer/AuraService.php

-
message: '#^Method ErrorHeroModule\\Transformer\\AuraService\:\:transform\(\) has parameter \$configuration with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/Transformer/AuraService.php

-
message: '#^Method ErrorHeroModule\\Transformer\\Doctrine\:\:transform\(\) has parameter \$configuration with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
29 changes: 0 additions & 29 deletions spec/Middleware/MezzioFactorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace ErrorHeroModule\Spec\Middleware;

use ArrayObject;
use Aura\Di\Container as AuraContainer;
use Aura\Di\ContainerBuilder as AuraContainerBuilder;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\PDO\MySql\Driver;
use Doctrine\ORM\EntityManager;
Expand All @@ -26,7 +23,6 @@
given('factory', fn() : MezzioFactory => new MezzioFactory());

given('mapCreateContainers', fn() : array => [
AuraContainer::class => (new AuraContainerBuilder())->newInstance(),
SymfonyContainerBuilder::class => new SymfonyContainerBuilder(),
Psr11PimpleContainer::class => new Psr11PimpleContainer(new PimpleContainer()),
]);
Expand Down Expand Up @@ -202,15 +198,9 @@

$config = [];
foreach ($this->mapCreateContainers as $containerClass => $container) {
if ($container instanceof AuraContainer) {
$config = new ArrayObject($config);
}

allow($container)->toReceive('get')->with('config')
->andReturn($config);
if ($container instanceof AuraContainer) {
$config = $config->getArrayCopy();
}

allow($container)->toReceive('has')->with(EntityManager::class)->andReturn(false);

Expand Down Expand Up @@ -242,16 +232,9 @@

foreach ($this->mapCreateContainers as $mapCreateContainer) {
$config['log']['ErrorHeroModuleLogger']['writers'][0]['options']['db'] = AdapterInterface::class;
if ($mapCreateContainer instanceof AuraContainer) {
$config = new ArrayObject($config);
}

allow($mapCreateContainer)->toReceive('get')->with('config')
->andReturn($config);
if ($mapCreateContainer instanceof AuraContainer) {
$config = $config->getArrayCopy();
}

allow($mapCreateContainer)->toReceive('has')->with(EntityManager::class)->andReturn(false);

$logging = Double::instance(['extends' => Logging::class, 'methods' => '__construct']);
Expand All @@ -275,15 +258,9 @@
foreach ($this->mapCreateContainers as $mapCreateContainer) {
$config = $this->config;
$config['log']['ErrorHeroModuleLogger']['writers'][0]['options']['db'] = 'my-adapter';
if ($mapCreateContainer instanceof AuraContainer) {
$config = new ArrayObject($config);
}

allow($mapCreateContainer)->toReceive('get')->with('config')
->andReturn($config);
if ($mapCreateContainer instanceof AuraContainer) {
$config = $config->getArrayCopy();
}

allow($mapCreateContainer)->toReceive('has')->with(EntityManager::class)->andReturn(false);

Expand All @@ -307,15 +284,9 @@

$config = $this->config;
foreach ($this->mapCreateContainers as $mapCreateContainer) {
if ($mapCreateContainer instanceof AuraContainer) {
$config = new ArrayObject($config);
}

allow($mapCreateContainer)->toReceive('get')->with('config')
->andReturn($config);
if ($mapCreateContainer instanceof AuraContainer) {
$config = $config->getArrayCopy();
}

allow($mapCreateContainer)->toReceive('has')->with(EntityManager::class)->andReturn(false);

Expand Down
3 changes: 0 additions & 3 deletions src/Middleware/MezzioFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
namespace ErrorHeroModule\Middleware;

use ArrayObject;
use Aura\Di\Container as AuraContainer;
use Doctrine\ORM\EntityManager;
use ErrorHeroModule\Handler\Logging;
use ErrorHeroModule\Transformer\AuraService;
use ErrorHeroModule\Transformer\Doctrine;
use ErrorHeroModule\Transformer\PimpleService;
use ErrorHeroModule\Transformer\SymfonyService;
Expand All @@ -29,7 +27,6 @@ final class MezzioFactory
/** @var array<string, string> */
private const CONTAINERS_TRANSFORM = [
ContainerBuilder::class => SymfonyService::class,
AuraContainer::class => AuraService::class,
Psr11PimpleContainer::class => PimpleService::class,
];

Expand Down
26 changes: 0 additions & 26 deletions src/Transformer/AuraService.php

This file was deleted.

0 comments on commit 046be3b

Please sign in to comment.