File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 9191 - name : " Run tests"
9292 run : |
9393 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:
118118 - name : " Run tests"
119119 run : |
120120 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 2323 <env name =" QUEUE_CONNECTION" value =" database" />
2424 <ini name =" xdebug.mode" value =" coverage" />
2525 <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" /> -->
2628 </php >
2729
2830 <source restrictDeprecations =" true"
Original file line number Diff line number Diff line change 1717use MongoDB \BSON \UTCDateTime ;
1818use MongoDB \Collection ;
1919
20- use function assert ;
2120use function tap ;
2221use function time ;
2322
@@ -56,9 +55,12 @@ public function read($sessionId): string|false
5655 'typeMap ' => ['root ' => 'bson ' ],
5756 ],
5857 );
59- assert ($ result instanceof Document);
6058
61- return $ result ? (string ) $ result ->payload : false ;
59+ if ($ result instanceof Document) {
60+ return (string ) $ result ->payload ;
61+ }
62+
63+ return false ;
6264 }
6365
6466 public function write ($ sessionId , $ data ): bool
You can’t perform that action at this time.
0 commit comments