Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Make adapter compatible with PHP8 (#22)
Browse files Browse the repository at this point in the history
* Added missing properties to Symfonys FlattenException.

* Added symfony 5.1.

* The throwable is an interface, we need a concrete implementation.

* Made package php8 compatible and updated packages.

* Added php8 to tests.

* We want to make it compatible only to php7.4 and 8.0.c

* PHPUnit has to be on 8.* for php 7.2.

* Try to widen the matrix.

* All e2e tests are allowed to fail.

* Modified deprecated classes.

* Added php-coveralls for composer.

Co-authored-by: Christoph Quadt <quadt@united-domains.de>
  • Loading branch information
Christoph Quadt and chq81 committed Jun 16, 2021
1 parent 8d4949a commit e676dc7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 31 deletions.
20 changes: 7 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@ services:
php:
- '7.2'
- '7.3'
- 7.4snapshot
- '7.4'
- '8.0'

env:
global:
- TARGET=unit
- TARGET=unit
- TARGET=unit COMPOSER_FLAGS='--prefer-lowest'
- TARGET=e2e
- TARGET=coverage

matrix:
jobs:
fast_finish: true
include:
- php: '7.2'
env: TARGET=unit COMPOSER_FLAGS='--prefer-lowest'
- php: '7.2'
env: TARGET=e2e
- php: '7.2'
env: TARGET=coverage

allow_failures:
- php: 7.4snapshot
- env: TARGET=e2e

before_install:
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@ unit:
.PHONY: unit

coverage:
mkdir --parents "${HOME}/bin"
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls"
chmod u+x "${HOME}/bin/coveralls"
bin/phpunit --colors --coverage-clover build/logs/clover.xml
coveralls -v
.PHONY: coverage
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@
}
],
"require": {
"php": "^7.2",
"jms/serializer": "^2.1 || ^3.0",
"symfony/messenger": "^4.4 || ^5.1"
"php": "^7.2 || ^8.0",
"jms/serializer": "^2.3 || ^3.9",
"symfony/messenger": "^4.4 || ^5.3"
},
"require-dev": {
"behat/behat": "^3.5",
"behat/behat": "^3.6",
"behat/symfony2-extension": "^2.1",
"jms/serializer-bundle": "^3.1",
"matthiasnoback/symfony-dependency-injection-test": "^3.0",
"phpunit/phpunit": "^7.4",
"symfony/config": "^4.4 || ^5.1",
"symfony/debug": "^4.4 || ^5.1",
"symfony/dependency-injection": "^4.4 || ^5.1",
"symfony/framework-bundle": "^4.4 || ^5.1",
"symfony/http-kernel": "^4.4 || ^5.1"
"jms/serializer-bundle": "^3.9",
"matthiasnoback/symfony-dependency-injection-test": "dev-master",
"php-coveralls/php-coveralls": "^2.4",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/config": "^4.4 || ^5.3",
"symfony/debug": "^4.4 || ^5.3",
"symfony/dependency-injection": "^4.4 || ^5.3",
"symfony/framework-bundle": "^4.4 || ^5.3",
"symfony/http-kernel": "^4.4 || ^5.3"
},
"config": {
"bin-dir": "bin",
Expand Down
3 changes: 1 addition & 2 deletions features/Context/JMSMessengerAdapterContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
use Behat\Symfony2Extension\Context\KernelDictionary;
use PHPUnit\Framework\Assert;
use Psr\Container\ContainerInterface;
use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransport;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\MessageBusInterface;
use KunicMarko\JMSMessengerAdapter\Features\Fixtures\Project\Query\DoesItWork;
use Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransport;

class JMSMessengerAdapterContext implements Context
{
Expand Down Expand Up @@ -65,7 +65,6 @@ public function iDispatchAQueryWithGroup()
*/
public function iShouldGetAResponse()
{

$transport = $this->receiverLocator->get('amqp');

\assert($transport instanceof AmqpTransport);
Expand Down

0 comments on commit e676dc7

Please sign in to comment.