Skip to content

Commit

Permalink
fix composer command
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 20, 2021
1 parent 7211a07 commit 5eca77d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ jobs:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: messenger
ports:
- 3306:3306

mongo:
image: mongo
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: secret
ports:
- 27017:27017

Expand All @@ -50,11 +48,11 @@ jobs:
with:
php-version: ${{ matrix.php_version }}
extensions: mongodb, :opcache
- run: composer install --dev --no-update symfony/messenger=${{ matrix.symfony_version }}
- run: composer require --dev --no-update symfony/messenger=${{ matrix.symfony_version }}
- run: composer remove --dev --no-update kcs/serializer
if: matrix.symfony_serializer
- run: composer install
- run: composer install --ignore-platform-reqs
- run: vendor/bin/phpunit
env:
DB: ${{ matrix.database }}
MONGODB_URI: mongodb://root:secret@localhost:27017/
MONGODB_URI: mongodb://localhost:27017/
6 changes: 3 additions & 3 deletions tests/Transport/Dbal/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ protected function setUp(): void
switch ($db) {
case 'mysql':
case 'mariadb':
$connection = DriverManager::getConnection(['url' => 'mysql://root@localhost']);
$this->transport = $factory->createTransport($this->dsn = 'mysql://root@localhost/messenger', [], $serializer);
$connection = DriverManager::getConnection(['url' => 'mysql://root@127.0.0.1/messenger']);
$this->transport = $factory->createTransport($this->dsn = 'mysql://root@127.0.0.1/messenger', [], $serializer);
break;

case 'postgresql':
$connection = DriverManager::getConnection(['url' => 'pgsql://postgres@localhost']);
$connection = DriverManager::getConnection(['url' => 'pgsql://postgres@localhost/messenger']);
$this->transport = $factory->createTransport($this->dsn = 'pgsql://postgres@localhost/messenger', [], $serializer);
break;

Expand Down
3 changes: 2 additions & 1 deletion tests/Transport/Mongo/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public function testSendsAndReceivesMessages(): void
$receivedMessages = 0;
$workerClass = new \ReflectionClass(Worker::class);
$thirdArgument = $workerClass->getConstructor()->getParameters()[2];
if (EventDispatcherInterface::class === (string) $thirdArgument->getType()) {
$argumentType = $thirdArgument->getType();
if (EventDispatcherInterface::class === ($argumentType ? $argumentType->getName() : null)) {
$worker = new Worker([$this->transport], new MessageBus(), $eventDispatcher = new EventDispatcher());
} else {
$worker = new Worker([$this->transport], new MessageBus(), [], $eventDispatcher = new EventDispatcher());
Expand Down

0 comments on commit 5eca77d

Please sign in to comment.