Skip to content

Commit 462ab18

Browse files
committed
fixed undefined constant error
1 parent 8c924b7 commit 462ab18

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Unreleased
44

5-
- Use `E_USER_DEPRECATED` instead of `_doing_it_wrong()` in drop-in
5+
- Switch to `E_USER_DEPRECATED` instead of `_doing_it_wrong()` in drop-in
6+
- Fixed `undefined constant` error when using Credis
67

78
## 2.6.2
89

includes/object-cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ protected function connect_using_credis( $parameters ) {
10731073
}
10741074

10751075
$this->diagnostics = array_merge(
1076-
[ 'client' => sprintf( '%s (v%s)', $client, Credis_Client::VERSION ) ],
1076+
[ 'client' => sprintf( '%s (%s)', $client, 'bundled' ) ],
10771077
$args
10781078
);
10791079
}

phpstan.dist.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ parameters:
6161
count: 1
6262
path: includes/ui/settings.php
6363

64-
# False positive
65-
-
66-
message: "#^Access to undefined constant Credis_Client::VERSION#"
67-
count: 1
68-
path: tests/PHPStan/object-cache.php
69-
7064
# whatever
7165
-
7266
message: "#^Call to an undefined method Credis_Sentinel::getCluster#"

0 commit comments

Comments
 (0)