terminal42 / contao-node

Manage content centrally as nodes and reuse them everywhere.
MIT License
29 stars 8 forks source link

Contao 5.04: Non-existent service "session". #43

Closed kikmedia closed 2 years ago

kikmedia commented 2 years ago

On a clean Contao 5.04 installation I get the following with Nodes v 1.5.11: The service "terminal42_node.listener.data_container" has a dependency on a non-existent service "session". Did you mean one of these: "argument_resol ver.session", "session.storage.factory.native", "session_listener", "securi ty.authentication.session_strategy", "security.listener.session.contao_back end", "security.logout.listener.session.contao_backend", "security.listener .session.contao_frontend", "security.logout.listener.session.contao_fronten d", "contao.listener.clear_session_data", "contao.listener.user_session", " contao.session.factory", "contao.session.contao_backend", "contao.session.c ontao_frontend", "contao.session.factory.inner"?

Any clues for me?

fritzmg commented 2 years ago

The session service is deprecated since Symfony 5.3 and does not exist anymore in Symfony 6. The session needs to be fetched from the request (which is possible since Symfony 5). See https://symfony.com/doc/5.4/session.html

Toflar commented 2 years ago

Yes, that's a bug!

Toflar commented 2 years ago

https://github.com/terminal42/contao-node/blob/a5cce9aa9f5ea034170f3c1593ec18867648ebad/src/Resources/config/services.yml#L22

qzminski commented 2 years ago

Should be fixed in 9f2cfda and 1.5.12.