Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ parameters:

editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'

universalObjectCratesClasses:
- MongoDB\BSON\Document
Comment on lines +14 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL


ignoreErrors:
- '#Unsafe usage of new static#'
- '#Call to an undefined method [a-zA-Z0-9\\_\<\>\(\)]+::[a-zA-Z]+\(\)#'
Expand Down
3 changes: 3 additions & 0 deletions src/Session/MongoDbSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

use Illuminate\Session\DatabaseSessionHandler;
use MongoDB\BSON\Binary;
use MongoDB\BSON\Document;
use MongoDB\BSON\UTCDateTime;
use MongoDB\Collection;

use function assert;
use function tap;
use function time;

Expand Down Expand Up @@ -54,6 +56,7 @@ public function read($sessionId): string|false
'typeMap' => ['root' => 'bson'],
],
);
assert($result instanceof Document);

return $result ? (string) $result->payload : false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ function (Builder $builder) {
[],
],
],
fn (Builder $builder) => $builder->whereDate('created_at', '=', new DateTimeImmutable('2018-09-30 15:00:00 +02:00')),
fn (Builder $builder) => $builder->whereDate('created_at', '=', new DateTimeImmutable('2018-09-30 15:00:00 +00:00')),
];

yield 'where date !=' => [
Expand Down
Loading