File tree 4 files changed +9
-5
lines changed
4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 91
91
- name : " Run tests"
92
92
run : |
93
93
export MONGODB_URI="mongodb://127.0.0.1:27017/?directConnection=true"
94
- ./vendor/bin/phpunit --coverage-clover coverage.xml --group atlas-search
94
+ php -d zend.assertions=1 ./vendor/bin/phpunit --coverage-clover coverage.xml --group atlas-search
Original file line number Diff line number Diff line change @@ -118,4 +118,4 @@ jobs:
118
118
- name : " Run tests"
119
119
run : |
120
120
export MONGODB_URI="mongodb://127.0.0.1:27017/?replicaSet=rs"
121
- ./vendor/bin/phpunit --coverage-clover coverage.xml --exclude-group atlas-search
121
+ php -d zend.assertions=1 ./vendor/bin/phpunit --coverage-clover coverage.xml --exclude-group atlas-search
Original file line number Diff line number Diff line change 23
23
<env name =" QUEUE_CONNECTION" value =" database" />
24
24
<ini name =" xdebug.mode" value =" coverage" />
25
25
<ini name =" memory_limit" value =" -1" />
26
+ <!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
27
+ <!-- <ini name="zend.assertions=1" value="1" /> -->
26
28
</php >
27
29
28
30
<source restrictDeprecations =" true"
Original file line number Diff line number Diff line change 17
17
use MongoDB \BSON \UTCDateTime ;
18
18
use MongoDB \Collection ;
19
19
20
- use function assert ;
21
20
use function tap ;
22
21
use function time ;
23
22
@@ -56,9 +55,12 @@ public function read($sessionId): string|false
56
55
'typeMap ' => ['root ' => 'bson ' ],
57
56
],
58
57
);
59
- assert ($ result instanceof Document);
60
58
61
- return $ result ? (string ) $ result ->payload : false ;
59
+ if ($ result instanceof Document) {
60
+ return (string ) $ result ->payload ;
61
+ }
62
+
63
+ return false ;
62
64
}
63
65
64
66
public function write ($ sessionId , $ data ): bool
You can’t perform that action at this time.
0 commit comments