From 01af29209c19f8a80c1622177aca92e8f51be552 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sun, 31 Dec 2017 19:25:28 -0800 Subject: [PATCH] [BC] Replaced PDO constants with values --- composer.json | 1 - lib/Doctrine/DBAL/ColumnCase.php | 4 ++-- lib/Doctrine/DBAL/FetchMode.php | 12 ++++++------ lib/Doctrine/DBAL/ParameterType.php | 10 +++++----- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 8e04667061e..33798942302 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,6 @@ ], "require": { "php": "^7.2", - "ext-pdo": "*", "doctrine/common": "^2.7.1" }, "require-dev": { diff --git a/lib/Doctrine/DBAL/ColumnCase.php b/lib/Doctrine/DBAL/ColumnCase.php index 420d868f582..c78ad372e65 100644 --- a/lib/Doctrine/DBAL/ColumnCase.php +++ b/lib/Doctrine/DBAL/ColumnCase.php @@ -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. diff --git a/lib/Doctrine/DBAL/FetchMode.php b/lib/Doctrine/DBAL/FetchMode.php index a3e7f3ba601..65af014f1e0 100644 --- a/lib/Doctrine/DBAL/FetchMode.php +++ b/lib/Doctrine/DBAL/FetchMode.php @@ -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 @@ -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 @@ -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 @@ -42,7 +42,7 @@ 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 @@ -50,7 +50,7 @@ final class FetchMode * * @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 @@ -58,7 +58,7 @@ final class FetchMode * * @see \PDO::FETCH_CLASS */ - public const CUSTOM_OBJECT = \PDO::FETCH_CLASS; + public const CUSTOM_OBJECT = 8; /** * This class cannot be instantiated. diff --git a/lib/Doctrine/DBAL/ParameterType.php b/lib/Doctrine/DBAL/ParameterType.php index 362a0514d23..96e80c9c3dd 100644 --- a/lib/Doctrine/DBAL/ParameterType.php +++ b/lib/Doctrine/DBAL/ParameterType.php @@ -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; /** * This class cannot be instantiated.