spiral / framework

High-Performance PHP Framework
https://spiral.dev
MIT License
1.82k stars 89 forks source link

[Session] Mandatory FactoryInterface should be optional #1066

Closed andrei-dascalu closed 10 months ago

andrei-dascalu commented 10 months ago

Description

The SessionFactory takes 2 mandatory arguments: SessionConfig and a FactoryInterface. However, the FactoryInterface is only needed when a specific session handler is configured (so that Autowire can resolve it)

How To Reproduce

If the configured handler is left to default (null), the expected behaviour is not to override the php ini native session handler. In this case there shouldn't be a need to pass a FactoryInterface

Additional Info

Q A
Framework Version none (using latest spiral/session package without framework)
PHP version 8.3.0
Operating system Linux /Alpine
andrei-dascalu commented 10 months ago

misread some code