Skip to content

Commit 3599fba

Browse files
committed
[BC] Replaced PDO constants with values
1 parent 1c920ba commit 3599fba

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
],
1414
"require": {
1515
"php": "^7.2",
16-
"ext-pdo": "*",
1716
"doctrine/common": "^2.7.1"
1817
},
1918
"require-dev": {

lib/Doctrine/DBAL/ColumnCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ final class ColumnCase
1212
*
1313
* @see \PDO::CASE_UPPER
1414
*/
15-
public const UPPER = \PDO::CASE_UPPER;
15+
public const UPPER = 1;
1616

1717
/**
1818
* Convert column names to lower case.
1919
*
2020
* @see \PDO::CASE_LOWER
2121
*/
22-
public const LOWER = \PDO::CASE_LOWER;
22+
public const LOWER = 2;
2323

2424
/**
2525
* This class cannot be instantiated.

lib/Doctrine/DBAL/FetchMode.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class FetchMode
1515
*
1616
* @see \PDO::FETCH_ASSOC
1717
*/
18-
public const ASSOCIATIVE = \PDO::FETCH_ASSOC;
18+
public const ASSOCIATIVE = 2;
1919

2020
/**
2121
* Specifies that the fetch method shall return each row as an array indexed
@@ -24,7 +24,7 @@ final class FetchMode
2424
*
2525
* @see \PDO::FETCH_NUM
2626
*/
27-
public const NUMERIC = \PDO::FETCH_NUM;
27+
public const NUMERIC = 3;
2828

2929
/**
3030
* Specifies that the fetch method shall return each row as an array indexed
@@ -33,7 +33,7 @@ final class FetchMode
3333
*
3434
* @see \PDO::FETCH_BOTH
3535
*/
36-
public const MIXED = \PDO::FETCH_BOTH;
36+
public const MIXED = 4;
3737

3838
/**
3939
* Specifies that the fetch method shall return each row as an object with
@@ -42,23 +42,23 @@ final class FetchMode
4242
*
4343
* @see \PDO::FETCH_OBJ
4444
*/
45-
public const STANDARD_OBJECT = \PDO::FETCH_OBJ;
45+
public const STANDARD_OBJECT = 5;
4646

4747
/**
4848
* Specifies that the fetch method shall return only a single requested
4949
* column from the next row in the result set.
5050
*
5151
* @see \PDO::FETCH_COLUMN
5252
*/
53-
public const COLUMN = \PDO::FETCH_COLUMN;
53+
public const COLUMN = 7;
5454

5555
/**
5656
* Specifies that the fetch method shall return a new instance of the
5757
* requested class, mapping the columns to named properties in the class.
5858
*
5959
* @see \PDO::FETCH_CLASS
6060
*/
61-
public const CUSTOM_OBJECT = \PDO::FETCH_CLASS;
61+
public const CUSTOM_OBJECT = 8;
6262

6363
/**
6464
* This class cannot be instantiated.

lib/Doctrine/DBAL/ParameterType.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,35 @@ final class ParameterType
1212
*
1313
* @see \PDO::PARAM_NULL
1414
*/
15-
public const NULL = \PDO::PARAM_NULL;
15+
public const NULL = 0;
1616

1717
/**
1818
* Represents the SQL INTEGER data type.
1919
*
2020
* @see \PDO::PARAM_INT
2121
*/
22-
public const INTEGER = \PDO::PARAM_INT;
22+
public const INTEGER = 1;
2323

2424
/**
2525
* Represents the SQL CHAR, VARCHAR, or other string data type.
2626
*
2727
* @see \PDO::PARAM_STR
2828
*/
29-
public const STRING = \PDO::PARAM_STR;
29+
public const STRING = 2;
3030

3131
/**
3232
* Represents the SQL large object data type.
3333
*
3434
* @see \PDO::PARAM_LOB
3535
*/
36-
public const LARGE_OBJECT = \PDO::PARAM_LOB;
36+
public const LARGE_OBJECT = 3;
3737

3838
/**
3939
* Represents a boolean data type.
4040
*
4141
* @see \PDO::PARAM_BOOL
4242
*/
43-
public const BOOLEAN = \PDO::PARAM_BOOL;
43+
public const BOOLEAN = 5;
4444

4545
/**
4646
* This class cannot be instantiated.

0 commit comments

Comments
 (0)