Skip to content
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

[HttpFoundation] inject SessionHandler in PdoSessionHandlerSchemaSubscriber #49097

Conversation

alli83
Copy link
Contributor

@alli83 alli83 commented Jan 24, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
License MIT
Doc PR I'm working on it

following the PR #48059.

In #48059, it works only if you put the handler explicitly to PdoSessionHandler in the configuration (handler_id) but it stops working if the session is defined by the factory and we can't use it as follow:

handler_id: '%env(resolve:DATABASE_URL)%' 

Linked to DoctrineBundle PR doctrine/DoctrineBundle#1623

Also imho, I think the second argument of configureSchema inPdoSessionHandler should be optional and set to return true if not defined since the function is public eg. one wants to add the table to the Schema.

@alli83 alli83 force-pushed the http-foundation-session-table-with-pdo-connection-from-tagged-iterator branch 2 times, most recently from 1e24eba to 0554413 Compare January 29, 2023 10:00
@alli83 alli83 changed the title [HttpFoundation] use tag to inject sessionHandlers in PdoSessionHandlerSchemaSubscriber [HttpFoundation] inject AbstractSessionHandler in PdoSessionHandlerSchemaSubscriber Jan 29, 2023
@nicolas-grekas nicolas-grekas changed the title [HttpFoundation] inject AbstractSessionHandler in PdoSessionHandlerSchemaSubscriber [HttpFoundation] inject SessionHandler in PdoSessionHandlerSchemaSubscriber Jan 29, 2023
@nicolas-grekas nicolas-grekas force-pushed the http-foundation-session-table-with-pdo-connection-from-tagged-iterator branch 2 times, most recently from ce59109 to a981fee Compare January 29, 2023 10:29
@nicolas-grekas nicolas-grekas force-pushed the http-foundation-session-table-with-pdo-connection-from-tagged-iterator branch from a981fee to 9aded06 Compare January 29, 2023 10:32
@nicolas-grekas
Copy link
Member

Thank you @alli83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants