Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jul 18, 2024

Summary

Checklist

}

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

Check failure

Code scanning / Psalm

MoreSpecificReturnType

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

The type 'string' is more general than the declared return type ''mysql'|'oracle'|'postgres'|'sqlite'' for OC\DB\ConnectionAdapter::getDatabaseProvider
public function __construct(ConnectionAdapter $connection, IQueryBuilder $queryBuilder) {
public function __construct(ConnectionAdapter $connection, IQueryBuilder $queryBuilder, LoggerInterface $logger) {
$this->connection = $connection;
$this->logger = $logger;

Check failure

Code scanning / Psalm

InvalidPropertyAssignmentValue

$this->logger with declared type 'OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder' cannot be assigned type 'Psr\Log\LoggerInterface'
*/
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

Method OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder::debug does not exist
*/
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

Method OC\DB\QueryBuilder\FunctionBuilder\FunctionBuilder::debug does not exist
…at will be removed with Doctrine/DBAL 4

Signed-off-by: Joas Schilling <[email protected]>
…ction::PARAM_STR_ARRAY`

Signed-off-by: Joas Schilling <[email protected]>
…e of removed upstream platforms

Signed-off-by: Joas Schilling <[email protected]>
…::and()` without parameters

Signed-off-by: Joas Schilling <[email protected]>
@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

Method Doctrine\DBAL\Driver\Connection::getServerVersion does not exist

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

Check failure

Code scanning / Psalm

UndefinedInterfaceMethod

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
@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
@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.

4 participants