From cb1ee963a3ac595359b01758665727e69ec2e9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hiraux=20H=C3=A9l=C3=A9na?= Date: Tue, 8 Mar 2022 18:17:00 +0100 Subject: [PATCH 1/5] feat: add codeowner --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..f604417 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @BedrockStreaming/messagequeuing From 423f5c21202b329fd39169217894a3b471f8219a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hiraux=20H=C3=A9l=C3=A9na?= Date: Tue, 8 Mar 2022 18:18:07 +0100 Subject: [PATCH 2/5] feat: replace travis by GHA --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 35 ----------------------------------- README.md | 3 +-- composer.json | 2 +- travis/install_amqp.sh | 16 ---------------- travis/install_rabbitmq-c.sh | 20 -------------------- 6 files changed, 28 insertions(+), 74 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 travis/install_amqp.sh delete mode 100644 travis/install_rabbitmq-c.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1107839 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Continuous Integration +on: [push] + +jobs: + tests: + name: Tests + runs-on: ubuntu-20.04 + strategy: + matrix: + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1' ] + symfony-version: ['^3.4', '^4.4', '^5.0'] + steps: + - uses: actions/checkout@master + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: xdebug2 + extensions: amqp + - name: Install symfony version from matrix + env: + SYMFONY_VERSION: ${{ matrix.symfony-version }} + run: composer require symfony/symfony:$SYMFONY_VERSION --no-update + - name: Install dependencies + run: composer update --prefer-dist --no-interaction + - name: Unit tests + run: bin/atoum diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6e984d0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: php -sudo: false -cache: - directories: - - $HOME/.composer/cache/files - -matrix: - fast_finish: true - include: - # Minimum supported dependencies with the latest and oldest PHP version - - php: 7.4 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" - - php: 7.0 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" - # Test with specific Symfony (LTS) versions - - php: 7.2 - env: SYMFONY_REQUIRE="3.4.*" - - php: 7.3 - env: SYMFONY_REQUIRE="4.4.*" - # Latest commit to master - - php: 7.4 - env: STABILITY="dev" - allow_failures: - # Dev-master is allowed to fail. - - env: STABILITY="dev" - -before_install: - - phpenv config-rm xdebug.ini - - bash travis/install_amqp.sh - - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; - - composer global require --no-progress --no-scripts --no-plugins symfony/flex - -install: composer update --prefer-dist --no-interaction $COMPOSER_FLAGS - -script: bin/atoum diff --git a/README.md b/README.md index f89a748..2005201 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # AmQPBundle -[![Build Status](https://travis-ci.org/M6Web/AmqpBundle.svg?branch=master)](https://travis-ci.org/M6Web/AmqpBundle) - +[![Build Status](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml) [![Total Downloads](https://poser.pugx.org/m6web/redis-mock/downloads.svg)](https://packagist.org/packages/m6web/amqp-bundle) The configuration and documentation are inspired from [videlalvaro/RabbitMqBundle](https://github.com/videlalvaro/RabbitMqBundle). #### Amqp client as a Symfony Service diff --git a/composer.json b/composer.json index 54d1028..2a7f7d3 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "psr-4": { "M6Web\\Bundle\\": "src/" } }, "require" : { - "php": "~7", + "php": ">=7.2", "ext-amqp": "*", "symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0", "symfony/framework-bundle": "^3.4 || ^4.3", diff --git a/travis/install_amqp.sh b/travis/install_amqp.sh deleted file mode 100644 index b2d0e70..0000000 --- a/travis/install_amqp.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -bash travis/install_rabbitmq-c.sh v0.7.0 - - - -echo Installing extension ... - -cd $HOME -git clone git://github.com/pdezwart/php-amqp.git -cd $HOME/php-amqp -git checkout v1.7.0alpha2 -phpize -./configure --with-librabbitmq-dir=/home/travis/rabbitmq-c -make && make install -echo "extension = amqp.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini \ No newline at end of file diff --git a/travis/install_rabbitmq-c.sh b/travis/install_rabbitmq-c.sh deleted file mode 100644 index e5288ad..0000000 --- a/travis/install_rabbitmq-c.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - - -# credits/original version of this provisionning script : https://github.com/pdezwart/php-amqp/blob/master/provision/install_rabbitmq-c.sh - -set -e - -echo Installing rabbitmq-c ... - - -LIBRABBITMQ_VERSION=$1 - -cd $HOME - -git clone git://github.com/alanxz/rabbitmq-c.git -cd $HOME/rabbitmq-c -git checkout ${LIBRABBITMQ_VERSION} - -git submodule init && git submodule update -autoreconf -i && ./configure --prefix=$HOME/rabbitmq-c && make && make install \ No newline at end of file From c47e92bb5291d5ff054933cd470ce65604389ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hiraux=20H=C3=A9l=C3=A9na?= Date: Tue, 8 Mar 2022 18:29:07 +0100 Subject: [PATCH 3/5] feat: update atoum dependency --- .github/workflows/ci.yml | 1 + composer.json | 6 +++--- .../Tests/Units/DependencyInjection/M6WebAmqpExtension.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1107839..28908b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ jobs: matrix: php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1' ] symfony-version: ['^3.4', '^4.4', '^5.0'] + fail-fast: false steps: - uses: actions/checkout@master - uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 2a7f7d3..148793b 100644 --- a/composer.json +++ b/composer.json @@ -8,13 +8,13 @@ "php": ">=7.2", "ext-amqp": "*", "symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0", - "symfony/framework-bundle": "^3.4 || ^4.3", - "symfony/http-kernel": "^3.4 || ^4.3", + "symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0", + "symfony/http-kernel": "^3.4 || ^4.3 || ^5.0", "symfony/yaml": "^3.4 || ^4.3 || ^5.0", "twig/twig": "^1.31 || ^2.0 || ^3.0" }, "require-dev" : { - "atoum/atoum": "^3.4.1", + "atoum/atoum": "~3.4||~4.0", "m6web/coke": "^2.2", "m6web/symfony2-coding-standard": "^3.3" }, diff --git a/src/AmqpBundle/Tests/Units/DependencyInjection/M6WebAmqpExtension.php b/src/AmqpBundle/Tests/Units/DependencyInjection/M6WebAmqpExtension.php index 2ae82e7..c61dc66 100644 --- a/src/AmqpBundle/Tests/Units/DependencyInjection/M6WebAmqpExtension.php +++ b/src/AmqpBundle/Tests/Units/DependencyInjection/M6WebAmqpExtension.php @@ -8,12 +8,12 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\Yaml\Parser; -use atoum\test; +use atoum; /** * Class M6WebAmqpExtension. */ -class M6WebAmqpExtension extends test +class M6WebAmqpExtension extends atoum { /** * @return ContainerBuilder From 8be122b43fde695c5763840858e2e281fd0adf8b Mon Sep 17 00:00:00 2001 From: lnahiro Date: Wed, 9 Mar 2022 10:45:21 +0100 Subject: [PATCH 4/5] feat: php support >= 7.4 Co-authored-by: Oliver THEBAULT --- .github/workflows/ci.yml | 4 ++-- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28908b3..038e09a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: Continuous Integration -on: [push] +on: [push, pull_request] jobs: tests: @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1' ] + php-version: ['7.4', '8.0', '8.1' ] symfony-version: ['^3.4', '^4.4', '^5.0'] fail-fast: false steps: diff --git a/composer.json b/composer.json index 148793b..343824f 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "psr-4": { "M6Web\\Bundle\\": "src/" } }, "require" : { - "php": ">=7.2", + "php": ">=7.4", "ext-amqp": "*", "symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0", "symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0", @@ -14,7 +14,7 @@ "twig/twig": "^1.31 || ^2.0 || ^3.0" }, "require-dev" : { - "atoum/atoum": "~3.4||~4.0", + "atoum/atoum": "~4.0", "m6web/coke": "^2.2", "m6web/symfony2-coding-standard": "^3.3" }, From 1c3ba13a2d381b93eea68535b473f0b42682782e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hiraux=20H=C3=A9l=C3=A9na?= Date: Wed, 9 Mar 2022 10:52:54 +0100 Subject: [PATCH 5/5] feat: add badges on README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2005201..8d4106f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # AmQPBundle -[![Build Status](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml) [![Total Downloads](https://poser.pugx.org/m6web/redis-mock/downloads.svg)](https://packagist.org/packages/m6web/amqp-bundle) +[![Build Status](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/BedrockStreaming/AmqpBundle/actions/workflows/ci.yml) [![Total Downloads](https://poser.pugx.org/m6web/amqp-bundle/downloads.svg)](https://packagist.org/packages/m6web/amqp-bundle) [![License](http://poser.pugx.org/m6web/amqp-bundle/license)](https://packagist.org/packages/m6web/amqp-bundle) [![PHP Version Require](http://poser.pugx.org/m6web/amqp-bundle/require/php)](https://packagist.org/packages/m6web/amqp-bundle) + The configuration and documentation are inspired from [videlalvaro/RabbitMqBundle](https://github.com/videlalvaro/RabbitMqBundle). #### Amqp client as a Symfony Service