From 0bab46520514fddf852cf5d272d98b04c76cdc99 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 5 May 2021 15:51:19 +0545 Subject: [PATCH] Suppress PhanDeprecatedFunction for doctrine/dbal changes --- lib/Db/FailedLinkAccessMapper.php | 2 ++ lib/Db/FailedLoginAttemptMapper.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/Db/FailedLinkAccessMapper.php b/lib/Db/FailedLinkAccessMapper.php index a372722..edc2329 100644 --- a/lib/Db/FailedLinkAccessMapper.php +++ b/lib/Db/FailedLinkAccessMapper.php @@ -65,6 +65,7 @@ public function __construct( */ public function getFailedAccessCountForTokenIpCombination($token, $ip, $thresholdTime) { $builder = $this->db->getQueryBuilder(); + /* @phan-suppress-next-line PhanDeprecatedFunction */ $attempts = $builder->selectAlias($builder->createFunction('COUNT(*)'), 'count') ->from($this->tableName) ->where($builder->expr()->gt('attempted_at', $builder->createNamedParameter($thresholdTime))) @@ -82,6 +83,7 @@ public function getFailedAccessCountForTokenIpCombination($token, $ip, $threshol */ public function getLastFailedAccessTimeForTokenIpCombination($token, $ip) { $builder = $this->db->getQueryBuilder(); + /* @phan-suppress-next-line PhanDeprecatedFunction */ $lastAttempt = $builder->select('attempted_at') ->from($this->tableName) ->where($builder->expr()->eq('link_token', $builder->createNamedParameter($token))) diff --git a/lib/Db/FailedLoginAttemptMapper.php b/lib/Db/FailedLoginAttemptMapper.php index ef747b6..fef27ce 100644 --- a/lib/Db/FailedLoginAttemptMapper.php +++ b/lib/Db/FailedLoginAttemptMapper.php @@ -66,6 +66,7 @@ public function __construct( */ public function getFailedLoginCountForUidIpCombination($uid, $ip, $thresholdTime) { $builder = $this->db->getQueryBuilder(); + /* @phan-suppress-next-line PhanDeprecatedFunction */ $attempts = $builder->selectAlias($builder->createFunction('COUNT(*)'), 'count') ->from($this->tableName) ->where($builder->expr()->gt('attempted_at', $builder->createNamedParameter($thresholdTime))) @@ -83,6 +84,7 @@ public function getFailedLoginCountForUidIpCombination($uid, $ip, $thresholdTime */ public function getLastFailedLoginAttemptTimeForUidIpCombination($uid, $ip) { $builder = $this->db->getQueryBuilder(); + /* @phan-suppress-next-line PhanDeprecatedFunction */ $lastAttempt = $builder->select('attempted_at') ->from($this->tableName) ->where($builder->expr()->eq('uid', $builder->createNamedParameter($uid)))