79574199

Date: 2025-04-15 00:15:05
Score: 2.5
Natty:
Report link

You can remove the code from the onBootstrap method. In laminas the session is started via the AbstractContainer::__construct method. See the link below for the code relevant to that. In laminas Session is autowired via its factories. You can find which ones are being called in the /vendor/laminas/laminas-session/src/ConfigProvider::getDependencyConfig() method. For laminas components that expose support for both Laminas MVC and Mezzio the Module class just proxies to the ConfigProvider class.

You can find the migration guide here:

https://docs.laminas.dev/migration/

You can find a presentation by Zend here:

https://www.zend.com/webinars/migrating-zend-framework-laminas

Location where the session is started

https://github.com/laminas/laminas-session/blob/80a4108b3f451d0fb3afd1d63fc8a79ead4ddae6/src/AbstractContainer.php#L88

Since you are trying to upgrade you may want to take a look at the documentation for usage in a laminas-mvc application. It covers all the new options.

https://docs.laminas.dev/laminas-session/application-integration/usage-in-a-laminas-mvc-application/

Reasons:
  • Blacklisted phrase (1): the link below
  • RegEx Blacklisted phrase (1): See the link
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Tyrsson