-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏗️ chore(deps): Bump doctrine/dbal from 3.8.3 to 4.0.4 #46192
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f305046
to
3b4d652
Compare
apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
Fixed
Show fixed
Hide fixed
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
c0d7ab3
to
7868c3c
Compare
fee1143
to
f4809bb
Compare
f4809bb
to
bbb78e0
Compare
ab5e08c
to
a42453f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the bit of bikeshedding 🙂
apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
Show resolved
Hide resolved
@@ -1096,18 +1135,20 @@ public function addOrderBy($sort, $order = null) { | |||
* @param string $queryPartName | |||
* | |||
* @return mixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return mixed | |
* @return never |
@@ -35,7 +35,7 @@ public function setupDatabase($username) { | |||
->andWhere($builder->expr()->eq('rolname', $builder->createNamedParameter($this->dbUser))); | |||
|
|||
try { | |||
$result = $query->execute(); | |||
$result = $query->executeQuery(); | |||
$canCreateRoles = $result->rowCount() > 0; | |||
} catch (DatabaseException $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc execute and executeQuery do not throw the same class and this needs to be adapted, same for other similar changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/lib/public/DB/QueryBuilder/IQueryBuilder.php
Lines 149 to 154 in 5fdc5d5
* @return IResult|int | |
* @throws Exception since 21.0.0 | |
* @since 8.2.0 | |
* @deprecated 22.0.0 Use executeQuery or executeStatement | |
*/ | |
public function execute(); |
🆒 how the docs are lying then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not, you do need to use executeQuery, but you also need to adapt catch to the wrapped Exception.
I checked and DatabaseException
is not part of the wrapped ones, only the dbal exception get wrapped so you should be fine.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…ote()` - saw 2 Signed-off-by: Joas Schilling <coding@schilljs.com>
…fierQuoteCharacter()` does not exist Signed-off-by: Joas Schilling <coding@schilljs.com>
…tBitAndComparisonExpression` expects string Signed-off-by: Joas Schilling <coding@schilljs.com>
…calls `bindValue()` internally Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…ELETE fails Signed-off-by: Joas Schilling <coding@schilljs.com>
…on\ExpressionBuilder::or()`, 0 passed and atleast 1 expected Signed-off-by: Joas Schilling <coding@schilljs.com>
a42453f
to
5fdc5d5
Compare
@@ -230,18 +238,10 @@ | |||
return $this->inner; | |||
} | |||
|
|||
/** | |||
* @return self::PLATFORM_MYSQL|self::PLATFORM_ORACLE|self::PLATFORM_POSTGRES|self::PLATFORM_SQLITE |
Check failure
Code scanning / Psalm
MoreSpecificReturnType Error
} else { | ||
throw new \Exception('Database ' . $platform::class . ' not supported'); | ||
} | ||
return $this->inner->getDatabaseProvider(); |
Check failure
Code scanning / Psalm
LessSpecificReturnStatement Error
use OCP\DB\QueryBuilder\IQueryBuilder; | ||
|
||
trait TDoctrineParameterTypeMap { | ||
protected function convertParameterTypeToDoctrine(ArrayParameterType|ParameterType|string|int|null $type): ArrayParameterType|ParameterType|string { |
Check failure
Code scanning / Psalm
InvalidReturnType Error
🔴 Platform requirements
⛑️ Need Help
Doctrine\DBAL\Platforms\SqlitePlatform
was renamed, use\OCP\IDBConnection::getDatabaseProvider()
insteadDoctrine\DBAL\Platforms\PostgreSQL94Platform
was removed, use\OCP\IDBConnection::getDatabaseProvider()
instead\OCP\DB\IQueryBuilder::getQueryParts()
and\OCP\DB\IQueryBuilder::getQueryPart()
were removed\OCP\DB\IQueryBuilder::resetQueryParts()
and\OCP\DB\IQueryBuilder::resetQueryPart()
can only reset'where'|'having'|'orderBy'|'groupBy'
. For all other cases a new querybuilder has to be created.Doctrine\DBAL\Types\Type::getName()
aka.$column->getType()->getName()
was removed is removed, use newly added\OCP\DB\Types::getType($column->getType())
Doctrine\DBAL\Schema\Table::changeColumn()
was removed, useTable::modifyColumn()
insteadDoctrine\DBAL\Schema\Table::hasPrimaryKey()
was removed, useTable::getPrimaryKey()
insteadDoctrine\DBAL\Schema\Schema::getTableNames()
was removed, useOCP\DB\ISchemaWrapper::getTableNames()
insteadDoctrine\DBAL\Connection::getSchemaManager()
was removed, useConnection::createSchemaManager()
insteadDoctrine\DBAL\FetchMode
was removed, please use the dedicated fetch methods instead\OCP\DB\IQueryBuilder::delete()
and\OCP\DB\IQueryBuilder::update()
no longer support table aliasDoctrine\DBAL\Platforms\MySQL80Platform
requires the length of a VARCHAR column to be specified - 255 was addedOCP\DB\IPreparedStatement::bindParam()
is deprecated and callsbindValue()
internallyOCP\Diagnostics\IQueryLogger
no longer extends\Doctrine\DBAL\Logging\SQLLogger
OCP\Diagnostics\IQuery
data structure is now typed and the structure of the data can have changed depending on the type of the query due to upstream changesOCP\DB\QueryBuilder\IExpressionBuilder::orX()
andOCP\DB\QueryBuilder\IExpressionBuilder::andX()
can no longer be called without arguments. Create an array outside and only create the composition once you know your entries.Checklist