Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/DoctrinePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Micro\Framework\Kernel\Plugin\ConfigurableInterface;
use Micro\Framework\Kernel\Plugin\DependencyProviderInterface;
use Micro\Framework\Kernel\Plugin\PluginConfigurationTrait;
use Micro\Plugin\Cache\Facade\CacheFacadeInterface;
use Micro\Plugin\Doctrine\Business\Connection\ConnectionFactory;
use Micro\Plugin\Doctrine\Business\Connection\ConnectionFactoryInterface;
use Micro\Plugin\Doctrine\Business\EntityManager\EntityManagerFactory;
Expand Down Expand Up @@ -45,12 +46,15 @@

private KernelInterface $kernel;

private Container $container;

/**
* {@inheritDoc}
*/
public function provideDependencies(Container $container): void
{
$this->container = $container;
$container->register(DoctrineFacadeInterface::class, function (KernelInterface $kernel): DoctrineFacadeInterface {

Check failure on line 57 in src/DoctrinePlugin.php

View workflow job for this annotation

GitHub Actions / Tests 8.2 deps highest

Parameter #2 $service of method Micro\Component\DependencyInjection\Container::register() expects callable(object, Micro\Component\DependencyInjection\Container): object, Closure(Micro\Framework\Kernel\KernelInterface): Micro\Plugin\Doctrine\DoctrineFacadeInterface given.
$this->kernel = $kernel;

return $this->createDoctrineFacade();
Expand Down Expand Up @@ -86,9 +90,15 @@

protected function createDriverMetadataFactory(): DriverMetadataFactoryInterface
{
$cacheFacade = null;
if($this->container->has(CacheFacadeInterface::class)) {

Check failure on line 94 in src/DoctrinePlugin.php

View workflow job for this annotation

GitHub Actions / Tests 8.2 deps highest

Class Micro\Plugin\Cache\Facade\CacheFacadeInterface not found.
$cacheFacade = $this->container->get(CacheFacadeInterface::class);

Check failure on line 95 in src/DoctrinePlugin.php

View workflow job for this annotation

GitHub Actions / Tests 8.2 deps highest

Class Micro\Plugin\Cache\Facade\CacheFacadeInterface not found.
}

return new DriverMetadataFactory(
$this->createEntityFileConfigurationLocatorFactory(),
$this->configuration()
$this->configuration(),
$cacheFacade,
);
}

Expand Down
Loading