Skip to content

Commit

Permalink
Fix build (#128)
Browse files Browse the repository at this point in the history
* Fix a deprecation

* Fix using the prophecy

* Update PHPUnit to avoid deprecations
  • Loading branch information
andrewmy authored Dec 18, 2023
1 parent 8268c46 commit 7ab2080
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion QueueInteropTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function send(Envelope $envelope): Envelope
$producer->send($topic, $interopMessage);
} catch (InteropQueueException $e) {
if (!$this->contextManager->recoverException($e, $destination)) {
throw new SendingMessageFailedException($e->getMessage(), null, $e);
throw new SendingMessageFailedException(message: $e->getMessage(), previous: $e);
}

// The context manager recovered the exception, we re-try.
Expand Down
2 changes: 1 addition & 1 deletion Tests/QueueInteropTransportFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function testItThrowsAnExceptionWhenContextDoesNotExist()
$container = $this->prophesize(ContainerInterface::class);
$container->has('enqueue.transport.foo.context')->willReturn(false);

$factory = $this->getFactory();
$factory = $this->getFactory(container: $container->reveal());
$factory->createTransport('enqueue://foo', array());
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
}
],
"require": {
"php": "^8.1",
"enqueue/enqueue-bundle": "^0.10",
"symfony/messenger": "^5.4 || ^6.3 || ^7.0",
"symfony/options-resolver": "^5.4 || ^6.3 || ^7.0",
Expand All @@ -37,7 +38,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.0",
"symfony/yaml": "^5.4 || ^6.3 || ^7.0",
"enqueue/snsqs": "^0.10.11",
"phpspec/prophecy-phpunit": "^2.0",
Expand Down
6 changes: 3 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
Expand All @@ -18,13 +18,13 @@
</testsuite>
</testsuites>

<coverage>
<source>
<include>
<directory suffix=".php">./</directory>
</include>
<exclude>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>
</source>
</phpunit>

0 comments on commit 7ab2080

Please sign in to comment.