Skip to content

Commit

Permalink
Updating Factories to fix integration testing
Browse files Browse the repository at this point in the history
with webinertia-mvc
Signed-off-by: Joey Smith <jsmith@webinertia.net>

Signed-off-by: Joey Smith <jsmith@webinertia.net>
  • Loading branch information
tyrsson committed Jun 18, 2023
1 parent 93b96a5 commit 09e4538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ConfigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/SessionManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}
Expand Down

0 comments on commit 09e4538

Please sign in to comment.