This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Fabien Potencier 297ae74b75 bug #26227 Add support for URL-like DSNs for the PdoSessionHandler (stof)
This PR was merged into the 3.4 branch.

Discussion
----------

Add support for URL-like DSNs for the PdoSessionHandler

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25186
| License       | MIT
| Doc PR        |

This allows migrating away from the deprecated DbalSessionHandler when DBAL was used for its ability to be configured through a URL (which is what is provided on Heroku and some other PaaS).

I know that this is technically a new feature (and so may target master instead), but we currently have no way to configure a database session storage on Heroku in 4.0 (and in 3.4, it requires using a deprecated class).

I decided to add support for the URL-like configuration directly rather than adding support for passing a DBAL connection, to minimize the code changes.
I also left out the support for OCI in this feature, as the PDO DSN for the Oracle driver is totally crazy (it has nothing in common with other drivers). If someone wants to use a Oracle DB, they should pass the PDO DSN directly instead of a URL.

Differences with the URL handling in Doctrine DBAL:

- schemeless URLs are not supported (DBAL allows configuring the driver separately in case you don't have it in the URL)
- the query string is ignored (DBAL allows to use the query string to configure any supported DBAL params, which are driver-specific. Just use a DSN directly if you need them. PaaS are unlikely to provide such params anyway and they are the main motivation for this PR)

Commits
-------

14c35ad13c Add support for URL-like DSNs for the PdoSessionHandler
2018-02-19 21:24:12 +01:00
..
Asset Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
BrowserKit Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Cache bug #26082 [Cache][WebProfiler][3.4] fix collecting cache stats with sub-requests + allow clearing calls (dmaicher) 2018-02-11 15:42:07 +01:00
ClassLoader Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Config do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Console Merge branch '2.8' into 3.4 2018-02-09 15:10:47 +01:00
CssSelector fix merge 2018-02-03 15:55:47 +01:00
Debug Merge branch '2.8' into 3.4 2018-02-03 15:55:07 +01:00
DependencyInjection do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
DomCrawler Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Dotenv Merge branch '3.3' into 3.4 2018-01-03 18:14:19 +01:00
EventDispatcher do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
ExpressionLanguage Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Filesystem Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Finder Merge branch '2.8' into 3.4 2018-02-11 18:15:12 +01:00
Form fix CS 2018-02-19 17:55:06 +01:00
HttpFoundation Add support for URL-like DSNs for the PdoSessionHandler 2018-02-19 14:20:33 +01:00
HttpKernel [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation 2018-02-19 11:31:59 +01:00
Inflector Merge branch '3.3' into 3.4 2018-01-03 18:14:19 +01:00
Intl Merge branch '2.8' into 3.4 2018-02-03 01:57:06 +01:00
Ldap Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Lock [Lock] Log already-locked errors as "notice" instead of "warning" 2018-02-11 12:27:51 +01:00
OptionsResolver Fix options resolver with array allowed types 2018-01-11 08:56:07 +01:00
Process Merge branch '2.8' into 3.4 2018-02-12 18:55:00 +01:00
PropertyAccess Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
PropertyInfo do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Routing Fix merge 2018-02-12 19:00:05 +01:00
Security Merge branch '2.8' into 3.4 2018-02-14 15:07:03 +01:00
Serializer Merge branch '2.8' into 3.4 2018-02-14 15:07:03 +01:00
Stopwatch updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a 2018-02-17 15:55:25 +01:00
Templating Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Translation do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Validator minor #26165 do not mock the container builder in tests (xabbuh) 2018-02-14 13:23:44 +01:00
VarDumper Merge branch '2.8' into 3.4 2018-01-31 11:38:55 +01:00
WebLink Merge branch '3.3' into 3.4 2018-01-03 08:37:34 +01:00
Workflow do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Yaml bug #25787 Yaml parser regression with comments and non-strings (alexpott) 2018-02-16 10:50:28 +01:00