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
0458eafe
Commit
0458eafe
authored
Jun 27, 2014
by
lucasvanlierop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only set deprecated attribute in older php versions so it does not break the test in php 5.6(+)
parent
240b64de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
DBAL630Test.php
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
+7
-2
No files found.
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
0458eafe
...
@@ -36,7 +36,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -36,7 +36,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
// PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated in php 5.6. PDO::ATTR_EMULATE_PREPARES should
// PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated in php 5.6. PDO::ATTR_EMULATE_PREPARES should
// be used instead. so should only it be set when it is supported.
// be used instead. so should only it be set when it is supported.
if
(
defined
(
'PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT'
)
)
{
if
(
version_compare
(
'5.6'
,
phpversion
())
===
1
)
{
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
false
);
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
false
);
}
}
}
}
...
@@ -67,7 +67,12 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -67,7 +67,12 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
public
function
testBooleanConversionBoolParamEmulatedPrepares
()
public
function
testBooleanConversionBoolParamEmulatedPrepares
()
{
{
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
true
);
// PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated in php 5.6. PDO::ATTR_EMULATE_PREPARES should
// be used instead. so should only it be set when it is supported.
if
(
version_compare
(
'5.6'
,
phpversion
())
===
1
)
{
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
GSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
true
);
}
$platform
=
$this
->
_conn
->
getDatabasePlatform
();
$platform
=
$this
->
_conn
->
getDatabasePlatform
();
...
...
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