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
bc101552
Unverified
Commit
bc101552
authored
Aug 22, 2017
by
Kim Hemsø Rasmussen
Committed by
Marco Pivetta
Aug 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set platform instance if passed in connection params and remove it from there.
parent
9d1edb72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
Connection.php
lib/Doctrine/DBAL/Connection.php
+13
-10
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
bc101552
...
@@ -211,6 +211,15 @@ class Connection implements DriverConnection
...
@@ -211,6 +211,15 @@ class Connection implements DriverConnection
unset
(
$this
->
_params
[
'pdo'
]);
unset
(
$this
->
_params
[
'pdo'
]);
}
}
if
(
isset
(
$params
[
"platform"
]))
{
if
(
!
$params
[
'platform'
]
instanceof
Platforms\AbstractPlatform
)
{
throw
DBALException
::
invalidPlatformSpecified
();
}
$this
->
platform
=
$params
[
"platform"
];
unset
(
$this
->
_params
[
"platform"
]);
}
// Create default config and event manager if none given
// Create default config and event manager if none given
if
(
!
$config
)
{
if
(
!
$config
)
{
$config
=
new
Configuration
();
$config
=
new
Configuration
();
...
@@ -384,7 +393,6 @@ class Connection implements DriverConnection
...
@@ -384,7 +393,6 @@ class Connection implements DriverConnection
*/
*/
private
function
detectDatabasePlatform
()
private
function
detectDatabasePlatform
()
{
{
if
(
!
isset
(
$this
->
_params
[
'platform'
]))
{
$version
=
$this
->
getDatabasePlatformVersion
();
$version
=
$this
->
getDatabasePlatformVersion
();
if
(
null
!==
$version
)
{
if
(
null
!==
$version
)
{
...
@@ -392,11 +400,6 @@ class Connection implements DriverConnection
...
@@ -392,11 +400,6 @@ class Connection implements DriverConnection
}
else
{
}
else
{
$this
->
platform
=
$this
->
_driver
->
getDatabasePlatform
();
$this
->
platform
=
$this
->
_driver
->
getDatabasePlatform
();
}
}
}
elseif
(
$this
->
_params
[
'platform'
]
instanceof
Platforms\AbstractPlatform
)
{
$this
->
platform
=
$this
->
_params
[
'platform'
];
}
else
{
throw
DBALException
::
invalidPlatformSpecified
();
}
$this
->
platform
->
setEventManager
(
$this
->
_eventManager
);
$this
->
platform
->
setEventManager
(
$this
->
_eventManager
);
}
}
...
...
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