-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[console] debug:container SessionHandlerInterface #37245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@youssefbenhssaien would you like to have a closer look and submit a PR? |
ybenhssaien
pushed a commit
to ybenhssaien/symfony
that referenced
this issue
Jul 14, 2020
ybenhssaien
pushed a commit
to ybenhssaien/symfony
that referenced
this issue
Jul 14, 2020
ybenhssaien
pushed a commit
to ybenhssaien/symfony
that referenced
this issue
Jul 14, 2020
fabpot
added a commit
that referenced
this issue
Jul 23, 2020
…dler_id is not provided (Youssef BENHSSAIEN) This PR was squashed before being merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] set default session.handler alias if handler_id is not provided | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #37245 | License | MIT | Doc PR | Without a configured [`handler_id`](https://symfony.com/doc/current/session.html#configuration), the `session.handler` alias is not created, and somes services depend on this alias specialy. Related to the reported issue above (affected version 4.4.9), the `ServiceHandlerInterface` is an alias of `session.handler`, when execute : - `bin/console debug:container session.handler` : The alias is not defined, so the `ContainerDebugCommand` look for a service containing the `session.handler` as part of his name (ContainerDebugCommand::findServiceIdsContaining() is called and returns by default `session.handler.native_file`) - `bin/console debug:container SessionHandlerInterface` : The service is defined as an alias of `session.handler`, when calling `ContainerBuilder::getDefinition('session.handler')` the exception occured as the alias is not defined. # Implemented solution Create a default `session.handler` when the param `handler_id` is not provided (I choosed `session.handler.native_file` rather than `NullSessionHandler`). # Affected versions From [`3.4`](https://github.com/symfony/framework-bundle/blob/3.4/DependencyInjection/FrameworkExtension.php#L879) to [`5.1`](https://github.com/symfony/framework-bundle/blob/5.1/DependencyInjection/FrameworkExtension.php#L955) Commits ------- 46c8c37 [FrameworkBundle] set default session.handler alias if handler_id is not provided
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.4.9
Description
Looking for

session.handler
by runningbin/console debug:container session.handler-v
we get the resultBut running a

bin/console debug:container SessionHandlerInterface -v
we get[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent service "session.handler".
How to reproduce
bin/console debug:container SessionHandlerInterface -v
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: