diff --git a/src/Adapter/Driver/Pdo/AbstractPdo.php b/src/Adapter/Driver/Pdo/AbstractPdo.php index 0e2d93d7..9087757d 100644 --- a/src/Adapter/Driver/Pdo/AbstractPdo.php +++ b/src/Adapter/Driver/Pdo/AbstractPdo.php @@ -31,9 +31,9 @@ abstract class AbstractPdo implements PdoDriverInterface, ProfilerAwareInterface protected ?ProfilerInterface $profiler; public function __construct( - protected readonly AbstractPdoConnection|PDO $connection, - protected readonly StatementInterface&PdoDriverAwareInterface $statementPrototype, - protected readonly ResultInterface $resultPrototype, + protected AbstractPdoConnection|PDO $connection, + protected StatementInterface&PdoDriverAwareInterface $statementPrototype, + protected ResultInterface $resultPrototype, array $features = [], ) { if ($this->connection instanceof PdoDriverAwareInterface) { diff --git a/src/Container/AdapterAbstractServiceFactory.php b/src/Container/AdapterAbstractServiceFactory.php index 1922ae2c..52e6ceb5 100644 --- a/src/Container/AdapterAbstractServiceFactory.php +++ b/src/Container/AdapterAbstractServiceFactory.php @@ -25,7 +25,7 @@ class AdapterAbstractServiceFactory implements AbstractFactoryInterface /** * Can we create an adapter by the requested name? */ - public function canCreate(ContainerInterface $container, string $requestedName): bool + public function canCreate(ContainerInterface $container, $requestedName): bool { $config = $this->getConfig($container); if (empty($config)) { @@ -42,14 +42,13 @@ public function canCreate(ContainerInterface $container, string $requestedName): */ public function __invoke( ContainerInterface $container, - string $requestedName, + $requestedName, ?array $options = null ): AdapterInterface { $driverFactory = ($container->get(DriverInterfaceFactoryFactoryInterface::class))($container, $requestedName); $driverInstance = $driverFactory::createFromConfig($container, $requestedName); $platformFactory = ($container->get(PlatformInterfaceFactoryFactoryInterface::class))(); - //$config = $this->getConfig($container); return new Adapter( $driverInstance, $platformFactory::fromDriver($driverInstance), @@ -59,10 +58,8 @@ public function __invoke( /** * Get db configuration, if any - * - * @return array */ - protected function getConfig(ContainerInterface $container) + protected function getConfig(ContainerInterface $container): array { if ($this->config !== null) { return $this->config;