Skip to content

Commit

Permalink
Update v2.x-automation-test for micro/kernel-boot-dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksiiBulba committed Jul 6, 2024
1 parent ec73d01 commit b7f3fa7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
17 changes: 9 additions & 8 deletions Boot/DependencyProviderBootLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@

namespace Micro\Framework\BootDependency\Boot;

use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactory;
use Micro\Component\DependencyInjection\Autowire\AutowireHelperInterface;
use Micro\Component\DependencyInjection\Autowire\ContainerAutowire;
use Micro\Framework\Autowire\AutowireHelperFactory;
use Micro\Framework\Autowire\AutowireHelperInterface;
use Micro\Framework\Autowire\ContainerAutowire;
use Micro\Framework\DependencyInjection\Container;
use Micro\Framework\BootDependency\Plugin\DependencyProviderInterface;
use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface;
use Psr\Container\ContainerInterface;

class DependencyProviderBootLoader implements PluginBootLoaderInterface
readonly class DependencyProviderBootLoader implements PluginBootLoaderInterface
{
/**
* @var Container
*/
private readonly ContainerInterface $container;
private ContainerInterface $container;

/**
* @param Container $container
Expand All @@ -37,14 +37,15 @@ public function __construct(ContainerInterface $container)

$this->container = $container;

$this->container->register(AutowireHelperInterface::class,
fn () => (new AutowireHelperFactory($this->container))
->create()
$this->container->register(
AutowireHelperInterface::class,
fn () => (new AutowireHelperFactory($this->container))->create()
);
}

/**
* @TODO: uncomment at 2.0 version
*
* {@inheritDoc}
*/
public function boot(object $applicationPlugin): void
Expand Down
5 changes: 1 addition & 4 deletions Tests/Unit/Boot/DependencyProviderBootLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

class DependencyProviderBootLoaderTest extends TestCase
{
/**
* @return void
*/
public function testBoot()
public function testBoot(): void
{
$container = new Container();

Expand Down
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
}
],
"require": {
"php": "^8.2",
"micro/autowire": "^2.0",
"micro/kernel": "^2.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.34"
},
"minimum-stability": "dev",
"autoload": {
"psr-4": {
"Micro\\Framework\\BootDependency\\": "/"
Expand All @@ -25,10 +24,6 @@
]
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true
},
"sort-packages": true
},
"minimum-stability": "dev"
}
}

0 comments on commit b7f3fa7

Please sign in to comment.