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 Jun 6, 2018
1 parent 00f5c22 commit 82ed2bc
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.2",
"ext-pdo": "*",
"doctrine/common": "^2.7.1"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/ColumnCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ final class ColumnCase
*
* @see \PDO::CASE_UPPER
*/
public const UPPER = \PDO::CASE_UPPER;
public const UPPER = 1;

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

/**
* This class cannot be instantiated.
Expand Down
12 changes: 6 additions & 6 deletions lib/Doctrine/DBAL/FetchMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class FetchMode
*
* @see \PDO::FETCH_ASSOC
*/
public const ASSOCIATIVE = \PDO::FETCH_ASSOC;
public const ASSOCIATIVE = 2;

/**
* Specifies that the fetch method shall return each row as an array indexed
Expand All @@ -24,7 +24,7 @@ final class FetchMode
*
* @see \PDO::FETCH_NUM
*/
public const NUMERIC = \PDO::FETCH_NUM;
public const NUMERIC = 3;

/**
* Specifies that the fetch method shall return each row as an array indexed
Expand All @@ -33,7 +33,7 @@ final class FetchMode
*
* @see \PDO::FETCH_BOTH
*/
public const MIXED = \PDO::FETCH_BOTH;
public const MIXED = 4;

/**
* Specifies that the fetch method shall return each row as an object with
Expand All @@ -42,23 +42,23 @@ final class FetchMode
*
* @see \PDO::FETCH_OBJ
*/
public const STANDARD_OBJECT = \PDO::FETCH_OBJ;
public const STANDARD_OBJECT = 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
*/
public const COLUMN = \PDO::FETCH_COLUMN;
public const 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
*/
public const CUSTOM_OBJECT = \PDO::FETCH_CLASS;
public const CUSTOM_OBJECT = 8;

/**
* This class cannot be instantiated.
Expand Down
10 changes: 5 additions & 5 deletions lib/Doctrine/DBAL/ParameterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ final class ParameterType
*
* @see \PDO::PARAM_NULL
*/
public const NULL = \PDO::PARAM_NULL;
public const NULL = 0;

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

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

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

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

/**
* Represents a binary string data type.
Expand Down

0 comments on commit 82ed2bc

Please sign in to comment.