Skip to content

Commit

Permalink
Merge pull request #3983 from greg0ire/bump-cs-libs
Browse files Browse the repository at this point in the history
Bump cs libs
  • Loading branch information
greg0ire authored May 4, 2020
2 parents fa8b6af + d5b4521 commit 4c03ed8
Show file tree
Hide file tree
Showing 156 changed files with 570 additions and 535 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"doctrine/event-manager": "^1.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"doctrine/coding-standard": "^7.0",
"jetbrains/phpstorm-stubs": "^2019.1",
"nikic/php-parser": "^4.4",
"phpstan/phpstan": "^0.12",
Expand Down
95 changes: 57 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Cache/CacheException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
class CacheException extends DBALException
{
/**
* @return \Doctrine\DBAL\Cache\CacheException
* @return CacheException
*/
public static function noCacheKey()
{
return new self('No cache key was set.');
}

/**
* @return \Doctrine\DBAL\Cache\CacheException
* @return CacheException
*/
public static function noResultDriverConfigured()
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function generateCacheKeys($query, $params, $types, array $connectionPara
}

/**
* @return \Doctrine\DBAL\Cache\QueryCacheProfile
* @return QueryCacheProfile
*/
public function setResultCacheDriver(Cache $cache)
{
Expand All @@ -102,7 +102,7 @@ public function setResultCacheDriver(Cache $cache)
/**
* @param string|null $cacheKey
*
* @return \Doctrine\DBAL\Cache\QueryCacheProfile
* @return QueryCacheProfile
*/
public function setCacheKey($cacheKey)
{
Expand All @@ -112,7 +112,7 @@ public function setCacheKey($cacheKey)
/**
* @param int $lifetime
*
* @return \Doctrine\DBAL\Cache\QueryCacheProfile
* @return QueryCacheProfile
*/
public function setLifetime($lifetime)
{
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function closeCursor()
if (! $data) {
$data = [];
}

$data[$this->realKey] = $this->data;

$this->resultCache->save($this->cacheKey, $data, $this->lifetime);
Expand Down
12 changes: 12 additions & 0 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ public function executeUpdate($query, array $params = [], array $types = [])
} else {
$stmt->execute($params);
}

$result = $stmt->rowCount();
} else {
$result = $connection->exec($query);
Expand Down Expand Up @@ -1179,9 +1180,11 @@ public function transactional(Closure $func)
return $res;
} catch (Exception $e) {
$this->rollBack();

throw $e;
} catch (Throwable $e) {
$this->rollBack();

throw $e;
}
}
Expand Down Expand Up @@ -1254,6 +1257,7 @@ public function beginTransaction()
if ($logger) {
$logger->startQuery('"SAVEPOINT"');
}

$this->createSavepoint($this->_getNestedTransactionSavePointName());
if ($logger) {
$logger->stopQuery();
Expand All @@ -1274,6 +1278,7 @@ public function commit()
if ($this->transactionNestingLevel === 0) {
throw ConnectionException::noActiveTransaction();
}

if ($this->isRollbackOnly) {
throw ConnectionException::commitFailedRollbackOnly();
}
Expand All @@ -1298,6 +1303,7 @@ public function commit()
if ($logger) {
$logger->startQuery('"RELEASE SAVEPOINT"');
}

$this->releaseSavepoint($this->_getNestedTransactionSavePointName());
if ($logger) {
$logger->stopQuery();
Expand Down Expand Up @@ -1354,6 +1360,7 @@ public function rollBack()
if ($logger) {
$logger->startQuery('"ROLLBACK"');
}

$this->transactionNestingLevel = 0;
$connection->rollBack();
$this->isRollbackOnly = false;
Expand All @@ -1368,6 +1375,7 @@ public function rollBack()
if ($logger) {
$logger->startQuery('"ROLLBACK TO SAVEPOINT"');
}

$this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
--$this->transactionNestingLevel;
if ($logger) {
Expand Down Expand Up @@ -1479,6 +1487,7 @@ public function setRollbackOnly()
if ($this->transactionNestingLevel === 0) {
throw ConnectionException::noActiveTransaction();
}

$this->isRollbackOnly = true;
}

Expand Down Expand Up @@ -1555,6 +1564,7 @@ private function _bindTypedValues($stmt, array $params, array $types)
} else {
$stmt->bindValue($bindIndex, $value);
}

++$bindIndex;
}
} else {
Expand Down Expand Up @@ -1584,6 +1594,7 @@ private function getBindingInfo($value, $type)
if (is_string($type)) {
$type = Type::getType($type);
}

if ($type instanceof Type) {
$value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform());
$bindingType = $type->getBindingType();
Expand Down Expand Up @@ -1623,6 +1634,7 @@ public function resolveParams(array $params, array $types)
} else {
$resolvedParams[$bindIndex] = $value;
}

++$bindIndex;
}
} else {
Expand Down
Loading

0 comments on commit 4c03ed8

Please sign in to comment.