Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 784d948

Browse files
committed
Bump DBAL to 2.7+
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 03c113b commit 784d948

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"doctrine/cache": "^1.6|^2.0",
124124
"doctrine/collections": "~1.0",
125125
"doctrine/data-fixtures": "^1.1",
126-
"doctrine/dbal": "^2.6|^3.0",
126+
"doctrine/dbal": "^2.7|^3.0",
127127
"doctrine/orm": "^2.6.3",
128128
"guzzlehttp/promises": "^1.4",
129129
"masterminds/html5": "^2.6",
@@ -143,6 +143,7 @@
143143
"twig/markdown-extra": "^2.12|^3"
144144
},
145145
"conflict": {
146+
"doctrine/dbal": "<2.7",
146147
"egulias/email-validator": "~3.0.0",
147148
"masterminds/html5": "<2.6",
148149
"monolog/monolog": ">=2",

src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function loadTokenBySeries($series)
6464
$sql = 'SELECT class, username, value, lastUsed AS last_used'
6565
.' FROM rememberme_token WHERE series=:series';
6666
$paramValues = ['series' => $series];
67-
$paramTypes = ['series' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR];
67+
$paramTypes = ['series' => ParameterType::STRING];
6868
$stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes);
6969
$row = $stmt instanceof Result || $stmt instanceof DriverResult ? $stmt->fetchAssociative() : $stmt->fetch(\PDO::FETCH_ASSOC);
7070

@@ -82,7 +82,7 @@ public function deleteTokenBySeries($series)
8282
{
8383
$sql = 'DELETE FROM rememberme_token WHERE series=:series';
8484
$paramValues = ['series' => $series];
85-
$paramTypes = ['series' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR];
85+
$paramTypes = ['series' => ParameterType::STRING];
8686
if (method_exists($this->conn, 'executeStatement')) {
8787
$this->conn->executeStatement($sql, $paramValues, $paramTypes);
8888
} else {
@@ -103,9 +103,9 @@ public function updateToken($series, $tokenValue, \DateTime $lastUsed)
103103
'series' => $series,
104104
];
105105
$paramTypes = [
106-
'value' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
106+
'value' => ParameterType::STRING,
107107
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
108-
'series' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
108+
'series' => ParameterType::STRING,
109109
];
110110
if (method_exists($this->conn, 'executeStatement')) {
111111
$updated = $this->conn->executeStatement($sql, $paramValues, $paramTypes);
@@ -133,10 +133,10 @@ public function createNewToken(PersistentTokenInterface $token)
133133
'lastUsed' => $token->getLastUsed(),
134134
];
135135
$paramTypes = [
136-
'class' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
137-
'username' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
138-
'series' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
139-
'value' => class_exists(ParameterType::class) ? ParameterType::STRING : \PDO::PARAM_STR,
136+
'class' => ParameterType::STRING,
137+
'username' => ParameterType::STRING,
138+
'series' => ParameterType::STRING,
139+
'value' => ParameterType::STRING,
140140
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
141141
];
142142
if (method_exists($this->conn, 'executeStatement')) {

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
"doctrine/annotations": "^1.10.4",
4444
"doctrine/collections": "~1.0",
4545
"doctrine/data-fixtures": "^1.1",
46-
"doctrine/dbal": "^2.6|^3.0",
46+
"doctrine/dbal": "^2.7|^3.0",
4747
"doctrine/orm": "^2.6.3"
4848
},
4949
"conflict": {
50-
"doctrine/dbal": "<2.6",
50+
"doctrine/dbal": "<2.7",
5151
"doctrine/orm": "<2.6.3",
5252
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
5353
"symfony/dependency-injection": "<3.4",

src/Symfony/Component/Cache/Traits/PdoTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function prune()
168168
}
169169

170170
$connection = $this->getConnection();
171-
$useDbalConstants = $connection instanceof Connection && class_exists(ParameterType::class);
171+
$useDbalConstants = $connection instanceof Connection;
172172

173173
try {
174174
$delete = $connection->prepare($deleteSql);
@@ -197,7 +197,7 @@ public function prune()
197197
protected function doFetch(array $ids)
198198
{
199199
$connection = $this->getConnection();
200-
$useDbalConstants = $connection instanceof Connection && class_exists(ParameterType::class);
200+
$useDbalConstants = $connection instanceof Connection;
201201

202202
$now = time();
203203
$expired = [];
@@ -244,7 +244,7 @@ protected function doFetch(array $ids)
244244
protected function doHave($id)
245245
{
246246
$connection = $this->getConnection();
247-
$useDbalConstants = $connection instanceof Connection && class_exists(ParameterType::class);
247+
$useDbalConstants = $connection instanceof Connection;
248248

249249
$sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)";
250250
$stmt = $connection->prepare($sql);
@@ -313,7 +313,7 @@ protected function doSave(array $values, int $lifetime)
313313
}
314314

315315
$conn = $this->getConnection();
316-
$useDbalConstants = $conn instanceof Connection && class_exists(ParameterType::class);
316+
$useDbalConstants = $conn instanceof Connection;
317317

318318
$driver = $this->driver;
319319
$insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)";

src/Symfony/Component/Cache/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"require-dev": {
3434
"cache/integration-tests": "dev-master",
3535
"doctrine/cache": "^1.6|^2.0",
36-
"doctrine/dbal": "^2.6|^3.0",
36+
"doctrine/dbal": "^2.7|^3.0",
3737
"predis/predis": "^1.1",
3838
"psr/simple-cache": "^1.0",
3939
"symfony/config": "^4.2|^5.0",
@@ -43,7 +43,7 @@
4343
"symfony/var-dumper": "^4.4|^5.0"
4444
},
4545
"conflict": {
46-
"doctrine/dbal": "<2.6",
46+
"doctrine/dbal": "<2.7",
4747
"symfony/dependency-injection": "<3.4",
4848
"symfony/http-kernel": "<4.4|>=5.0",
4949
"symfony/var-dumper": "<4.4"

0 commit comments

Comments
 (0)