Commit 7298404a authored by lucasvanlierop's avatar lucasvanlierop

Do not use version compare anymore

parent 0753bacf
...@@ -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 (version_compare('5.6', phpversion()) === 1) { if (PHP_VERSION_ID < 50600) {
$this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, false); $this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, false);
} }
} }
...@@ -70,7 +70,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -70,7 +70,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 (version_compare('5.6', phpversion()) === 1) { if (PHP_VERSION_ID < 50600) {
$this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, true); $this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment