diff --git a/src/ConfigFactory.php b/src/ConfigFactory.php index 97da186..fcbec89 100644 --- a/src/ConfigFactory.php +++ b/src/ConfigFactory.php @@ -14,7 +14,7 @@ class ConfigFactory implements FactoryInterface public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): SessionConfig { $config = $container->get('config')['session_config'] ?? []; - $class = $requestedName(); + $class = new SessionConfig(); $class->setOptions($config); return $class; } diff --git a/src/SessionManagerFactory.php b/src/SessionManagerFactory.php index 39f5669..c243352 100644 --- a/src/SessionManagerFactory.php +++ b/src/SessionManagerFactory.php @@ -20,7 +20,7 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $ // $sessionConfig = ! empty($config['config_class']) ? new $config['config_class']() : new SessionConfig(); // $sessionConfig->setOptions($config); - return new $requestedName( + return new SessionManager( $container->has(ConfigInterface::class) ? $container->get(ConfigInterface::class) : new SessionConfig() ); }