diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 91513e8..b700dcf 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -306,12 +306,6 @@ parameters: count: 1 path: src/lib/Invitation/InvitationService.php - - - message: '#^Parameter \#1 \$select of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:select\(\) expects array\\|string\|null, int given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Invitation/Persistence/DoctrineGateway.php - - message: '#^Method Ibexa\\User\\Pagination\\Pagerfanta\\UserSettingsAdapter\:\:getNbResults\(\) should return int\<0, max\> but returns int\.$#' identifier: return.type diff --git a/src/lib/Behat/Context/UserSetupContext.php b/src/lib/Behat/Context/UserSetupContext.php index f61b52d..8c9b2f6 100644 --- a/src/lib/Behat/Context/UserSetupContext.php +++ b/src/lib/Behat/Context/UserSetupContext.php @@ -29,11 +29,12 @@ public function aUserHasPasswordInUnsupportedFormat(string $login): void { $queryBuilder = $this->connection->createQueryBuilder(); $update = $queryBuilder - ->update(Gateway::USER_TABLE, 'u') - ->set('password_hash_type', self::UNSUPPORTED_USER_HASH) + ->update(Gateway::USER_TABLE) + ->set('password_hash_type', ':hash_type') ->andWhere( - $queryBuilder->expr()->eq('u.login', ':login') + $queryBuilder->expr()->eq('login', ':login') ) + ->setParameter('hash_type', self::UNSUPPORTED_USER_HASH, ParameterType::INTEGER) ->setParameter('login', $login, ParameterType::STRING); $update->executeStatement(); diff --git a/src/lib/Invitation/Persistence/DoctrineGateway.php b/src/lib/Invitation/Persistence/DoctrineGateway.php index 4e21a20..35b358f 100644 --- a/src/lib/Invitation/Persistence/DoctrineGateway.php +++ b/src/lib/Invitation/Persistence/DoctrineGateway.php @@ -94,7 +94,7 @@ public function invitationExistsForEmail( ): bool { $query = $this->connection->createQueryBuilder(); $query - ->select(1) + ->select('1') ->from(self::TABLE_USER_INVITATIONS) ->where( $query->expr()->eq(