Skip to content
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

fix(deps): Deprecate functionality deprecated by doctrine and test on more oracle versions #46605

Merged
merged 14 commits into from
Jul 19, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jul 18, 2024

Summary

Checklist

@@ -230,18 +230,10 @@
return $this->inner;
}

/**
* @return self::PLATFORM_MYSQL|self::PLATFORM_ORACLE|self::PLATFORM_POSTGRES|self::PLATFORM_SQLITE

Check failure

Code scanning / Psalm

MoreSpecificReturnType Error

The declared return type ''mysql'|'oracle'|'postgres'|'sqlite'' for OC\DB\ConnectionAdapter::getDatabaseProvider is more specific than the inferred return type 'string'
} else {
throw new \Exception('Database ' . $platform::class . ' not supported');
}
return $this->inner->getDatabaseProvider();

Check failure

Code scanning / Psalm

LessSpecificReturnStatement Error

The type 'string' is more general than the declared return type ''mysql'|'oracle'|'postgres'|'sqlite'' for OC\DB\ConnectionAdapter::getDatabaseProvider
$this->connection = $connection;
$this->logger = $logger;

Check failure

Code scanning / Psalm

InvalidPropertyAssignmentValue Error

$this->logger with declared type 'OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder' cannot be assigned type 'Psr\Log\LoggerInterface'
@@ -63,6 +62,9 @@
* @return \OCP\DB\QueryBuilder\ICompositeExpression
*/
public function andX(...$x): ICompositeExpression {
if (empty($x)) {
$this->logger->debug('Calling ' . IQueryBuilder::class . '::' . __FUNCTION__ . ' without parameters is deprecated and will throw soon.', ['exception' => new \Exception('No parameters in call to ' . __METHOD__)]);

Check failure

Code scanning / Psalm

UndefinedMethod Error

Method OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder::debug does not exist
@@ -81,6 +83,9 @@
* @return \OCP\DB\QueryBuilder\ICompositeExpression
*/
public function orX(...$x): ICompositeExpression {
if (empty($x)) {
$this->logger->debug('Calling ' . IQueryBuilder::class . '::' . __FUNCTION__ . ' without parameters is deprecated and will throw soon.', ['exception' => new \Exception('No parameters in call to ' . __METHOD__)]);

Check failure

Code scanning / Psalm

UndefinedMethod Error

Method OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder::debug does not exist
Signed-off-by: Joas Schilling <coding@schilljs.com>
…at will be removed with Doctrine/DBAL 4

Signed-off-by: Joas Schilling <coding@schilljs.com>
…s deprecated

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…ction::PARAM_STR_ARRAY`

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…e of removed upstream platforms

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…::and()` without parameters

Signed-off-by: Joas Schilling <coding@schilljs.com>
…d recursion

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/noid/test-more-oracle-versions branch from 7d34c84 to 817ca00 Compare July 19, 2024 09:27
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for the carddav/caldav changes

* All apps and API code should not need this and instead use provided functionality from the above.
*/
public function getServerVersion(): string {
return $this->_conn->getServerVersion();

Check failure

Code scanning / Psalm

UndefinedInterfaceMethod Error

Method Doctrine\DBAL\Driver\Connection::getServerVersion does not exist
@@ -12,6 +12,9 @@

class OCIFunctionBuilder extends FunctionBuilder {
public function md5($input): IQueryFunction {
if (version_compare($this->connection->getServerVersion(), '20', '>=')) {

Check failure

Code scanning / Psalm

UndefinedInterfaceMethod Error

Method OCP\IDBConnection::getServerVersion does not exist
@nickvergessen nickvergessen force-pushed the bugfix/noid/test-more-oracle-versions branch from 2ecf40f to b79d87c Compare July 19, 2024 11:30
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/noid/test-more-oracle-versions branch from b79d87c to b656edc Compare July 19, 2024 12:14
@nickvergessen nickvergessen merged commit 7395211 into master Jul 19, 2024
167 of 169 checks passed
@nickvergessen nickvergessen deleted the bugfix/noid/test-more-oracle-versions branch July 19, 2024 14:40
@blizzz blizzz mentioned this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants