Skip to content

Commit 7b1cd4f

Browse files
committed
Fixing/bumping dependencies
Signed-off-by: RJ Garcia <[email protected]>
1 parent 51e5d12 commit 7b1cd4f

File tree

6 files changed

+31
-33
lines changed

6 files changed

+31
-33
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ RUN apt-get update && apt-get install -y git zip
55
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
66
RUN install-php-extensions redis pcntl
77

8-
COPY --from=composer:1.9.1 /usr/bin/composer /usr/bin/composer
8+
COPY --from=composer:2.5.4 /usr/bin/composer /usr/bin/composer

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"require-dev": {
2828
"nyholm/symfony-bundle-test": "^1.6",
29-
"phpunit/phpunit": "^7.3",
29+
"phpunit/phpunit": "^9.0",
3030
"symfony/dependency-injection": "^5.4",
3131
"symfony/http-kernel": "^5.4",
3232
"symfony/property-access": "^5.4",

phpunit.xml.dist

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php">
9-
<php>
10-
<ini name="error_reporting" value="-1" />
11-
<env name="SHELL_VERBOSITY" value="-1" />
12-
<env name="REDIS_DSN" value="redis://u:password123@redis:6379?queue=messenger"/>
13-
</php>
14-
<testsuites>
15-
<testsuite name="feature">
16-
<directory>tests/Feature</directory>
17-
</testsuite>
18-
<testsuite name="unit">
19-
<directory>tests/Unit</directory>
20-
</testsuite>
21-
</testsuites>
22-
23-
<filter>
24-
<whitelist>
25-
<directory>./src/</directory>
26-
</whitelist>
27-
</filter>
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
4+
<coverage>
5+
<include>
6+
<directory>./src/</directory>
7+
</include>
8+
</coverage>
9+
<php>
10+
<ini name="error_reporting" value="-1"/>
11+
<env name="SHELL_VERBOSITY" value="-1"/>
12+
<env name="REDIS_DSN" value="redis://u:password123@redis:6379?queue=messenger"/>
13+
</php>
14+
<testsuites>
15+
<testsuite name="feature">
16+
<directory>tests/Feature</directory>
17+
</testsuite>
18+
<testsuite name="unit">
19+
<directory>tests/Unit</directory>
20+
</testsuite>
21+
</testsuites>
2822
</phpunit>

tests/Feature/BundleTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ final class BundleTest extends BaseBundleTestCase
1515
{
1616
use RedisSteps;
1717

18-
protected function setUp() {
18+
protected function setUp(): void {
1919
parent::setUp();
20-
$this->addCompilerPass(new PublicServicePass('/(Krak.*|messenger.default_serializer)/'));
20+
$this->addCompilerPass(new PublicServicePass('/(Krak.*|messenger.default_serializer|.*MessageBus.*)/'));
2121
$this->given_a_redis_client_is_configured_with_a_fresh_redis_db();
2222
}
2323

@@ -39,7 +39,7 @@ public function registers_the_redis_message_bus_integration() {
3939

4040
// Act: dispatch the krak redis message on the bus
4141
/** @var MessageBusInterface $bus */
42-
$bus = $this->getContainer()->get('message_bus');
42+
$bus = $this->messageBus();
4343
$bus->dispatch(new KrakRedisMessage());
4444

4545
// Assert: verify the message was pushed to krak redis transport
@@ -55,7 +55,7 @@ public function allows_sf_redis_transport() {
5555

5656
// Act: dispatch the sf message on the bus
5757
/** @var MessageBusInterface $bus */
58-
$bus = $this->getContainer()->get('message_bus');
58+
$bus = $this->messageBus();
5959
$bus->dispatch(new SfRedisMessage());
6060

6161
// Assert: verify the message was not pushed to krak redis transport
@@ -76,4 +76,8 @@ private function createKrakRedisTransport(): RedisTransport {
7676
'blocking_timeout' => 1,
7777
], $this->getContainer()->get('messenger.default_serializer'));
7878
}
79+
80+
private function messageBus(): MessageBusInterface {
81+
return $this->getContainer()->get(MessageBusInterface::class);
82+
}
7983
}

tests/Feature/Fixtures/redis-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ framework:
55
transports:
66
krak_redis: 'redis://u:password123@redis:6379?queue=messenger'
77
sf_redis:
8-
dsn: 'redis://u:password123@redis:6379'
8+
dsn: 'redis://password123@redis:6379'
99
options: { use_krak_redis: false }
1010
routing:
1111
'Krak\SymfonyMessengerRedis\Tests\Feature\Fixtures\KrakRedisMessage': krak_redis

tests/Feature/TransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class TransportTest extends TestCase
2626
/** @var Envelope */
2727
private $envelope;
2828

29-
protected function setUp() {
29+
protected function setUp(): void {
3030
parent::setUp();
3131
$this->transportFactory = new RedisTransportFactory();
3232
$this->given_a_redis_client_is_configured_with_a_fresh_redis_db();

0 commit comments

Comments
 (0)