Skip to content

Commit 0bbba64

Browse files
authored
Merge pull request #997 from kuraobi/symfony-5
Symfony 5
2 parents 1cb0685 + 2f8f6f0 commit 0bbba64

File tree

234 files changed

+1185
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+1185
-833
lines changed

.travis.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,42 @@ matrix:
77
include:
88
- php: 7.1
99
sudo: false
10-
env: SYMFONY_VERSION=3.4.* PHPSTAN=true
10+
env: SYMFONY_VERSION=4.3.* PHPSTAN=true
1111
- php: 7.1
1212
sudo: false
13-
env: SYMFONY_VERSION=3.4.* PHP_CS_FIXER=true
13+
env: SYMFONY_VERSION=4.3.* PHP_CS_FIXER=true
1414
- php: 7.1
1515
sudo: false
16-
env: SYMFONY_VERSION=3.4.* UNIT_TESTS=true
17-
- php: 7.1
16+
env: SYMFONY_VERSION=4.3.* UNIT_TESTS=true
17+
- php: 7.2
1818
sudo: false
19-
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
19+
env: SYMFONY_VERSION=4.3.* UNIT_TESTS=true
2020
- php: 7.2
2121
sudo: false
22-
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
22+
env: SYMFONY_VERSION=5.0.* UNIT_TESTS=true
2323
- php: 7.3
2424
sudo: false
25-
env: SYMFONY_VERSION=4.1.* UNIT_TESTS=true
25+
env: SYMFONY_VERSION=4.3.* UNIT_TESTS=true
2626
- php: 7.3
2727
sudo: false
28-
env: SYMFONY_VERSION=4.2.* UNIT_TESTS=true
28+
env: SYMFONY_VERSION=4.4.* UNIT_TESTS=true
29+
- php: 7.3
30+
sudo: false
31+
env: SYMFONY_VERSION=5.0.* UNIT_TESTS=true
2932
- php: 7.1
30-
services: docker
3133
sudo: required
32-
env: SYMFONY_VERSION=3.4.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
33-
- php: 7.1
34+
services: docker
35+
env: SYMFONY_VERSION=4.3.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
36+
- php: 7.3
3437
sudo: required
3538
services: docker
36-
env: SYMFONY_VERSION=4.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
39+
env: SYMFONY_VERSION=5.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
3740
- php: 7.1
3841
sudo: required
3942
services: docker
40-
env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
43+
env: SYMFONY_VERSION=4.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
4144
allow_failures:
42-
- env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
45+
- env: SYMFONY_VERSION=4.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
4346

4447
cache:
4548
directories:
@@ -66,12 +69,12 @@ script:
6669
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi
6770
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/test.sh --exclude-group=rdkafka; fi
6871
- if [ "RDKAFKA_TESTS" = true ]; then bin/test.sh --group=rdkafka; fi
69-
72+
7073
notifications:
7174
webhooks:
7275
urls:
7376
- https://webhooks.gitter.im/e/3f8b3668e7792de23a49
74-
on_success: change
75-
on_failure: always
76-
on_start: never
77+
on_success: change
78+
on_failure: always
79+
on_start: never
7780

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
"ext-amqp": "^1.9.3",
1515
"ext-gearman": "^2.0",
16-
"ext-mongodb": "^1.3",
16+
"ext-mongodb": "^1.5",
1717
"ext-rdkafka": "^3.0.3",
1818

1919
"queue-interop/amqp-interop": "^0.8",
@@ -35,14 +35,14 @@
3535
"php-http/client-common": "^1.7@dev",
3636
"richardfullmer/rabbitmq-management-api": "^2.0",
3737
"predis/predis": "^1.1",
38+
"thruway/client": "^0.5.0",
3839
"thruway/pawl-transport": "^0.5.0",
39-
"voryx/thruway": "^0.5.3",
4040
"influxdb/influxdb-php": "^1.14",
4141
"datadog/php-datadogstatsd": "^1.3"
4242
},
4343
"require-dev": {
44-
"phpunit/phpunit": "^5.5",
45-
"phpstan/phpstan": "^0.10",
44+
"phpunit/phpunit": "^7.5",
45+
"phpstan/phpstan": "^0.12",
4646
"queue-interop/queue-spec": "^0.6",
4747
"symfony/browser-kit": "^3.4|^4",
4848
"symfony/config": "^3.4|^4",
@@ -54,9 +54,10 @@
5454
"symfony/http-kernel": "^3.4|^4",
5555
"symfony/filesystem": "^3.4|^4",
5656
"symfony/framework-bundle": "^3.4|^4",
57+
"symfony/yaml": "^4.3|^5",
5758
"empi89/php-amqp-stubs": "*@dev",
58-
"doctrine/doctrine-bundle": "~1.2",
59-
"doctrine/mongodb-odm-bundle": "^3.5",
59+
"doctrine/doctrine-bundle": "~1.2|^2",
60+
"doctrine/mongodb-odm-bundle": "^3.5|^4",
6061
"alcaeus/mongo-php-adapter": "^1.0",
6162
"kwn/php-rdkafka-stubs": "^1.0.2",
6263
"friendsofphp/php-cs-fixer": "^2"
@@ -112,7 +113,7 @@
112113
"ext-amqp": "1.9.3",
113114
"ext-gearman": "2.0.3",
114115
"ext-rdkafka": "3.3",
115-
"ext-mongodb": "1.3",
116+
"ext-mongodb": "1.5",
116117
"ext-bcmath": "1",
117118
"ext-mbstring": "1",
118119
"ext-mongo": "1.6.14"

docker-compose.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,9 @@ services:
117117
- "27017:27017"
118118

119119
thruway:
120-
image: formapro/nginx-php-fpm:latest-all-exts
120+
build: './docker/thruway'
121121
ports:
122122
- '9090:9090'
123-
working_dir: '/app'
124-
volumes:
125-
- './:/app'
126-
entrypoint:
127-
- '/usr/bin/php'
128-
- 'docker/thruway/WsRouter.php'
129123

130124
localstack:
131125
image: 'localstack/localstack:latest'

docker/thruway/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM formapro/nginx-php-fpm:latest-all-exts
2+
3+
RUN mkdir -p /thruway
4+
WORKDIR /thruway
5+
6+
# Thruway router
7+
COPY --from=composer /usr/bin/composer /usr/bin/composer
8+
RUN COMPOSER_HOME=/thruway composer global require --prefer-dist --no-scripts voryx/thruway
9+
10+
COPY WsRouter.php .
11+
12+
CMD ["/usr/bin/php", "WsRouter.php"]
13+

docker/thruway/WsRouter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require __DIR__.'/../../vendor/autoload.php';
3+
require __DIR__.'/vendor/autoload.php';
44

55
use Thruway\Peer\Router;
66
use Thruway\Transport\RatchetTransportProvider;

docs/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ There are available options (and all available metrics):
294294
Install additional packages:
295295

296296
```
297-
composer req thruway/pawl-transport:^0.5.0 voryx/thruway:^0.5.3
297+
composer req thruway/pawl-transport:^0.5.0 thruway/client:^0.5.0
298298
```
299299

300300
```php

docs/transport/wamp.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nav_order: 3
1010

1111
A transport for [Web Application Messaging Protocol](https://wamp-proto.org/).
1212
WAMP is an open standard WebSocket subprotocol.
13-
It uses internally Thruway PHP library [voryx/thruway](https://github.com/voryx/Thruway)
13+
It uses internally Thruway PHP library [thruway/client](https://github.com/thruway/client)
1414

1515
* [Installation](#installation)
1616
* [Start the WAMP router](#start-the-wamp-router)
@@ -27,7 +27,10 @@ $ composer require enqueue/wamp
2727

2828
## Start the WAMP router
2929

30+
You can get a WAMP router with [Thruway](https://github.com/voryx/Thruway):
31+
3032
```bash
33+
$ composer require voryx/thruway
3134
$ php vendor/voryx/thruway/Examples/SimpleWsRouter.php
3235
```
3336

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ parameters:
1414
- pkg/enqueue-bundle/DependencyInjection/Configuration.php
1515
- pkg/enqueue/Tests/Symfony/DependencyInjection/TransportFactoryTest.php
1616
- pkg/simple-client/SimpleClient.php
17+
ignoreErrors:
18+
-
19+
message: '#Class Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy not found#'
20+
path: %currentWorkingDirectory%/*
21+
-
22+
message: '#.*Symfony\\Contracts\\EventDispatcher\\Event.*#'
23+
path: %currentWorkingDirectory%/*

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="./vendor/autoload.php"
1312
>
1413

pkg/amqp-bunny/Tests/AmqpConsumerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Interop\Amqp\Impl\AmqpQueue;
1515
use Interop\Queue\Consumer;
1616
use Interop\Queue\Exception\InvalidMessageException;
17+
use PHPUnit\Framework\MockObject\MockObject;
1718
use PHPUnit\Framework\TestCase;
1819

1920
class AmqpConsumerTest extends TestCase
@@ -205,23 +206,23 @@ public function testShouldReturnMessageOnReceiveWithReceiveMethodBasicGet()
205206
}
206207

207208
/**
208-
* @return \PHPUnit_Framework_MockObject_MockObject|Client
209+
* @return MockObject|Client
209210
*/
210211
public function createClientMock()
211212
{
212213
return $this->createMock(Client::class);
213214
}
214215

215216
/**
216-
* @return \PHPUnit_Framework_MockObject_MockObject|AmqpContext
217+
* @return MockObject|AmqpContext
217218
*/
218219
public function createContextMock()
219220
{
220221
return $this->createMock(AmqpContext::class);
221222
}
222223

223224
/**
224-
* @return \PHPUnit_Framework_MockObject_MockObject|Channel
225+
* @return MockObject|Channel
225226
*/
226227
public function createBunnyChannelMock()
227228
{

0 commit comments

Comments
 (0)