Skip to content

Commit

Permalink
Merge branch 'php-8.4' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Dec 9, 2024
2 parents 32d69e0 + 95e4ae3 commit d87877c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
php: ['8.3']
mongodb: ['1.17.2']
include:
- description: Tests - PHP 8.4
php: '8.4'
symfony-version: '7.*'
mongodb: '1.20.0' # 1.20 introduced PHP 8.4 support
- description: Tests - Symfony 6.4
php: '8.2'
symfony-version: '6.4.*'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 1.4.1 (2024-12-09)
* Add support to PHP 8.4 (by removing implicit nullable arguments deprecations)

## 1.4.0 (2024-03-15)
* Allow Symfony 7 ([#18](https://github.com/facile-it/mongodb-messenger-transport/issues/18))
* Require at least `facile-it/mongodb-bundle` 1.6
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function find(string $id): ?BSONDocument
/**
* @return Cursor<BSONDocument>
*/
public function findAll(int $limit = null): Cursor
public function findAll(?int $limit = null): Cursor
{
$options = [];
if ($limit !== null) {
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/MongoDbUnresettableTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function send(Envelope $envelope): Envelope
*
* @return \Generator<Envelope>
*/
public function all(int $limit = null): iterable
public function all(?int $limit = null): iterable
{
return $this->getReceiver()->all($limit);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/Receiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function reject(Envelope $envelope): void
/**
* @return \Generator<Envelope>
*/
public function all(int $limit = null): iterable
public function all(?int $limit = null): iterable
{
foreach ($this->connection->findAll($limit) as $document) {
yield $this->createEnvelope($document);
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/InstantiableDocumentEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class InstantiableDocumentEnhancer implements DocumentEnhancer
/** @var \DateTime|null */
private $foo;

public function __construct(\DateTime $foo = null)
public function __construct(?\DateTime $foo = null)
{
$this->foo = $foo;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/NotInstantiableDocumentEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class NotInstantiableDocumentEnhancer implements DocumentEnhancer
{
public function __construct(\DateTime $bar, \DateTime $foo = null) {}
public function __construct(\DateTime $bar, ?\DateTime $foo = null) {}

public function enhance(BSONDocument $document, Envelope $envelope): void {}
}

0 comments on commit d87877c

Please sign in to comment.