Skip to content

Commit

Permalink
[BC] Replaced PDO constants with values
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jan 3, 2018
1 parent 8829350 commit 02a1adf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
],
"require": {
"php": "^7.1",
"ext-pdo": "*",
"doctrine/common": "^2.7.1"
},
"require-dev": {
Expand Down
12 changes: 6 additions & 6 deletions lib/Doctrine/DBAL/Driver/ResultStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ResultStatement extends \Traversable
*
* @see \PDO::FETCH_ASSOC
*/
const FETCH_ASSOC = \PDO::FETCH_ASSOC;
const FETCH_ASSOC = 2;

/**
* Specifies that the fetch method shall return each row as an array indexed
Expand All @@ -26,7 +26,7 @@ interface ResultStatement extends \Traversable
*
* @see \PDO::FETCH_NUM
*/
const FETCH_NUM = \PDO::FETCH_NUM;
const FETCH_NUM = 3;

/**
* Specifies that the fetch method shall return each row as an array indexed
Expand All @@ -35,7 +35,7 @@ interface ResultStatement extends \Traversable
*
* @see \PDO::FETCH_BOTH
*/
const FETCH_BOTH = \PDO::FETCH_BOTH;
const FETCH_BOTH = 4;

/**
* Specifies that the fetch method shall return each row as an object with
Expand All @@ -44,23 +44,23 @@ interface ResultStatement extends \Traversable
*
* @see \PDO::FETCH_OBJ
*/
const FETCH_OBJ = \PDO::FETCH_OBJ;
const FETCH_OBJ = 5;

/**
* Specifies that the fetch method shall return only a single requested
* column from the next row in the result set.
*
* @see \PDO::FETCH_COLUMN
*/
const FETCH_COLUMN = \PDO::FETCH_COLUMN;
const FETCH_COLUMN = 7;

/**
* Specifies that the fetch method shall return a new instance of the
* requested class, mapping the columns to named properties in the class.
*
* @see \PDO::FETCH_CLASS
*/
const FETCH_CLASS = \PDO::FETCH_CLASS;
const FETCH_CLASS = 8;

/**
* Closes the cursor, enabling the statement to be executed again.
Expand Down
10 changes: 5 additions & 5 deletions lib/Doctrine/DBAL/Driver/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ interface Statement extends ResultStatement
*
* @see \PDO::PARAM_NULL
*/
const PARAM_NULL = \PDO::PARAM_NULL;
const PARAM_NULL = 0;

/**
* Represents the SQL INTEGER data type.
*
* @see \PDO::PARAM_INT
*/
const PARAM_INT = \PDO::PARAM_INT;
const PARAM_INT = 1;

/**
* Represents the SQL CHAR, VARCHAR, or other string data type.
*
* @see \PDO::PARAM_STR
*/
const PARAM_STR = \PDO::PARAM_STR;
const PARAM_STR = 2;

/**
* Represents the SQL large object data type.
*
* @see \PDO::PARAM_LOB
*/
const PARAM_LOB = \PDO::PARAM_LOB;
const PARAM_LOB = 3;

/**
* Represents a boolean data type.
*
* @see \PDO::PARAM_BOOL
*/
const PARAM_BOOL = \PDO::PARAM_BOOL;
const PARAM_BOOL = 5;

/**
* Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Portability/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class Connection extends \Doctrine\DBAL\Connection
*
* @see \PDO::CASE_UPPER
*/
const CASE_UPPER = \PDO::CASE_UPPER;
const CASE_UPPER = 1;

/**
* Force column names to lower case.
*
* @see \PDO::CASE_LOWER
*/
const CASE_LOWER = \PDO::CASE_LOWER;
const CASE_LOWER = 2;

const PORTABILITY_ALL = 255;
const PORTABILITY_NONE = 0;
Expand Down

0 comments on commit 02a1adf

Please sign in to comment.