-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Lock][Cache] Allows URL DSN in PDO adapters #34057
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
Conversation
b184b31
to
dfd3ef3
Compare
I would rather go with supporting those DSNs only when Dbal is found, to reuse the similar logic they have AFAIK. Doable? |
8d2d79f
to
8b94126
Compare
@nicolas-grekas done |
a67484c
to
3824bae
Compare
That's less powerful than in other components (and makes these PDO-based implementation unusable on Heroku or Symfony Cloud without installing DBAL) |
You mean PdoSessionHandler, are there more examples? |
that's exactly what is not possible when the env variable is managed by the PaaS hosting. |
well, then use dbal - we don't have to solve unreported problems. |
3f4ff8f
to
4167037
Compare
Thank you @jderusse. |
This PR was merged into the 4.4 branch. Discussion ---------- [Lock][Cache] Allows URL DSN in PDO adapters | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | TODO This PR duplicate a feature from PdoSessionHandler that convert URL DSN ( ie. mysql://localhost/test) into PDO DSN (ie. mysql:host=localhost;dbname=test) that would ease configuration by using the same well-known variable ``` framework: lock: '%env(DATABASE_URL)%' ``` note: I applied the same change on Cache component for consistency. Commits ------- 474daf9 Allows URL DSN in Lock and Cache
This PR duplicate a feature from PdoSessionHandler that convert URL DSN ( ie. mysql://localhost/test) into PDO DSN (ie. mysql:host=localhost;dbname=test)
that would ease configuration by using the same well-known variable
note: I applied the same change on Cache component for consistency.