Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
2dc41962
Commit
2dc41962
authored
Sep 12, 2016
by
Christian Schmidt
Committed by
Christian Schmidt
Jan 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
URL-decode URL-style DSN
parent
7963f131
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
DriverManager.php
lib/Doctrine/DBAL/DriverManager.php
+2
-0
DriverManagerTest.php
tests/Doctrine/Tests/DBAL/DriverManagerTest.php
+4
-0
No files found.
lib/Doctrine/DBAL/DriverManager.php
View file @
2dc41962
...
...
@@ -259,6 +259,8 @@ final class DriverManager
throw
new
DBALException
(
'Malformed parameter "url".'
);
}
$url
=
array_map
(
'rawurldecode'
,
$url
);
// If we have a connection URL, we have to unset the default PDO instance connection parameter (if any)
// as we cannot merge connection details from the URL into the PDO instance (URL takes precedence).
unset
(
$params
[
'pdo'
]);
...
...
tests/Doctrine/Tests/DBAL/DriverManagerTest.php
View file @
2dc41962
...
...
@@ -199,6 +199,10 @@ class DriverManagerTest extends \Doctrine\Tests\DbalTestCase
'drizzle-pdo-mysql://foo:bar@localhost/baz'
,
array
(
'user'
=>
'foo'
,
'password'
=>
'bar'
,
'host'
=>
'localhost'
,
'dbname'
=>
'baz'
,
'driver'
=>
'Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver'
),
),
'simple URL with percent encoding'
=>
array
(
'mysql://foo%3A:bar%2F@localhost/baz+baz%40'
,
array
(
'user'
=>
'foo:'
,
'password'
=>
'bar/'
,
'host'
=>
'localhost'
,
'dbname'
=>
'baz+baz@'
,
'driver'
=>
'Doctrine\DBAL\Driver\PDOMySQL\Driver'
),
),
// DBAL-1234
'URL without scheme and without any driver information'
=>
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment