Skip to content

Commit

Permalink
Merge pull request #419 from php-enqueue/drop-php-5-support
Browse files Browse the repository at this point in the history
Drop PHP5 support, Drop Symfony 2.X support.
  • Loading branch information
makasim authored Apr 28, 2018
2 parents e396f1f + 402344c commit 481b64d
Show file tree
Hide file tree
Showing 25 changed files with 142 additions and 133 deletions.
32 changes: 9 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,27 @@ language: php

matrix:
include:
- php: 5.6
env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true
- php: 7.1
env: SYMFONY_VERSION=3.0.* PHPSTAN=true
env: SYMFONY_VERSION=3.4.* PHPSTAN=true
- php: 7.1
env: SYMFONY_VERSION=3.0.* PHP_CS_FIXER=true
- php: 7.0
env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true
- php: 5.6
env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true
- php: 7.0
env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true
- php: 7.1
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
env: SYMFONY_VERSION=3.4.* PHP_CS_FIXER=true
- php: 7.1
env: SYMFONY_VERSION=3.4.* UNIT_TESTS=true
- php: 7.2
services: docker
env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.2.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.2
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=3.4.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=4.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
allow_failures:
- env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
- env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true

cache:
directories:
Expand All @@ -53,6 +38,7 @@ install:
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
- composer install
- ./bin/symlink-pkgs-to-vendor.sh
- if [ "$PREPARE_CONTAINER" = true ]; then docker --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then docker-compose --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then bin/dev -b; fi
Expand Down
2 changes: 1 addition & 1 deletion bin/run-fun-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -x
set -e

COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$@"
docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$@"
26 changes: 26 additions & 0 deletions bin/symlink-pkgs-to-vendor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -x
set -e

rm -rf vendor/enqueue/*
ln -s ../../pkg/amqp-bunny vendor/enqueue
ln -s ../../pkg/amqp-ext vendor/enqueue
ln -s ../../pkg/amqp-lib vendor/enqueue
ln -s ../../pkg/amqp-tools vendor/enqueue
ln -s ../../pkg/async-event-dispatcher vendor/enqueue
ln -s ../../pkg/dbal vendor/enqueue
ln -s ../../pkg/enqueue vendor/enqueue
ln -s ../../pkg/enqueue-bundle vendor/enqueue
ln -s ../../pkg/fs vendor/enqueue
ln -s ../../pkg/gearman vendor/enqueue
ln -s ../../pkg/gps vendor/enqueue
ln -s ../../pkg/job-queue vendor/enqueue
ln -s ../../pkg/null vendor/enqueue
ln -s ../../pkg/pheanstalk vendor/enqueue
ln -s ../../pkg/rdkafka vendor/enqueue
ln -s ../../pkg/redis vendor/enqueue
ln -s ../../pkg/simple-client vendor/enqueue
ln -s ../../pkg/sqs vendor/enqueue
ln -s ../../pkg/stomp vendor/enqueue
ln -s ../../pkg/test vendor/enqueue
40 changes: 20 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
"homepage": "https://enqueue.forma-pro.com/",
"require": {
"php": ">=5.6",
"enqueue/enqueue": "*@dev",
"enqueue/stomp": "*@dev",
"enqueue/amqp-ext": "*@dev",
"enqueue/amqp-lib": "*@dev",
"enqueue/amqp-bunny": "*@dev",
"enqueue/amqp-tools": "*@dev",
"enqueue/enqueue": "0.9.x-dev",
"enqueue/stomp": "0.9.x-dev",
"enqueue/amqp-ext": "0.9.x-dev",
"enqueue/amqp-lib": "0.9.x-dev",
"enqueue/amqp-bunny": "0.9.x-dev",
"enqueue/amqp-tools": "0.9.x-dev",
"php-amqplib/php-amqplib": "^2.7@dev",
"enqueue/redis": "*@dev",
"enqueue/fs": "*@dev",
"enqueue/null": "*@dev",
"enqueue/dbal": "*@dev",
"enqueue/sqs": "*@dev",
"enqueue/pheanstalk": "*@dev",
"enqueue/gearman": "*@dev",
"enqueue/rdkafka": "*@dev",
"enqueue/redis": "0.9.x-dev",
"enqueue/fs": "0.9.x-dev",
"enqueue/null": "0.9.x-dev",
"enqueue/dbal": "0.9.x-dev",
"enqueue/sqs": "0.9.x-dev",
"enqueue/pheanstalk": "0.9.x-dev",
"enqueue/gearman": "0.9.x-dev",
"enqueue/rdkafka": "0.9.x-dev",
"kwn/php-rdkafka-stubs": "^1.0.2",
"enqueue/gps": "*@dev",
"enqueue/enqueue-bundle": "*@dev",
"enqueue/job-queue": "*@dev",
"enqueue/simple-client": "*@dev",
"enqueue/test": "*@dev",
"enqueue/async-event-dispatcher": "*@dev",
"enqueue/gps": "0.9.x-dev",
"enqueue/enqueue-bundle": "0.9.x-dev",
"enqueue/job-queue": "0.9.x-dev",
"enqueue/simple-client": "0.9.x-dev",
"enqueue/test": "0.9.x-dev",
"enqueue/async-event-dispatcher": "0.9.x-dev",
"queue-interop/queue-interop": "^0.6@dev|^1.0.0-alpha1",
"queue-interop/amqp-interop": "^0.7@dev",
"queue-interop/queue-spec": "^0.5.4@dev",
Expand Down
9 changes: 4 additions & 5 deletions pkg/amqp-bunny/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",

"queue-interop/amqp-interop": "^0.7@dev",
"php": "^7.1.3",
"queue-interop/amqp-interop": "^0.8@dev",
"bunny/bunny": "^0.2.4",
"enqueue/amqp-tools": "^0.9@dev"
},
Expand All @@ -18,8 +17,8 @@
"enqueue/enqueue": "^0.9@dev",
"enqueue/null": "^0.9@dev",
"queue-interop/queue-spec": "^0.5.3@dev",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4"
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4"
},
"support": {
"email": "[email protected]",
Expand Down
8 changes: 4 additions & 4 deletions pkg/amqp-ext/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"php": "^7.1.3",
"ext-amqp": "^1.9.3",
"queue-interop/amqp-interop": "^0.7@dev",
"queue-interop/amqp-interop": "^0.8@dev",
"enqueue/amqp-tools": "^0.9@dev"
},
"require-dev": {
Expand All @@ -18,8 +18,8 @@
"enqueue/null": "^0.9@dev",
"queue-interop/queue-spec": "^0.5.3@dev",
"empi89/php-amqp-stubs": "*@dev",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4"
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4"
},
"support": {
"email": "[email protected]",
Expand Down
11 changes: 5 additions & 6 deletions pkg/amqp-lib/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"php-amqplib/php-amqplib": "^2.7@dev",
"queue-interop/queue-interop": "^0.6@dev|^1.0.0-alpha1",
"queue-interop/amqp-interop": "^0.7@dev",
"php": "^7.1.3",
"php-amqplib/php-amqplib": "^2.7",
"queue-interop/amqp-interop": "^0.8@dev",
"enqueue/amqp-tools": "^0.9@dev"
},
"require-dev": {
Expand All @@ -18,8 +17,8 @@
"enqueue/enqueue": "^0.9@dev",
"enqueue/null": "^0.9@dev",
"queue-interop/queue-spec": "^0.5.3@dev",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4"
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4"
},
"support": {
"email": "[email protected]",
Expand Down
5 changes: 2 additions & 3 deletions pkg/amqp-tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"queue-interop/queue-interop": "^0.6@dev|^1.0.0-alpha1",
"queue-interop/amqp-interop": "^0.7@dev"
"php": "^7.1.3",
"queue-interop/amqp-interop": "^0.8@dev"
},
"require-dev": {
"phpunit/phpunit": "~5.4.0",
Expand Down
12 changes: 6 additions & 6 deletions pkg/async-event-dispatcher/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"php": "^7.1.3",
"enqueue/enqueue": "^0.9@dev",
"symfony/event-dispatcher": "^2.8|^3|^4"
"symfony/event-dispatcher": "^3.4|^4"
},
"require-dev": {
"phpunit/phpunit": "~5.5",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4",
"symfony/http-kernel": "^2.8|^3|^4",
"symfony/filesystem": "^2.8|^3|^4",
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4",
"symfony/http-kernel": "^3.4|^4",
"symfony/filesystem": "^3.4|^4",
"enqueue/null": "^0.9@dev",
"enqueue/fs": "^0.9@dev",
"enqueue/test": "^0.9@dev"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dbal/DbalConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ private function fetchPrioritizedMessage($now)
->andWhere('queue = :queue')
->andWhere('priority IS NOT NULL')
->andWhere('(delayed_until IS NULL OR delayed_until <= :delayedUntil)')
->addOrderBy('priority', 'desc')
->addOrderBy('published_at', 'asc')
->addOrderBy('priority', 'desc')
->setMaxResults(1)
;

Expand Down
2 changes: 1 addition & 1 deletion pkg/dbal/DbalProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function send(PsrDestination $destination, PsrMessage $message)
InvalidDestinationException::assertDestinationInstanceOf($destination, DbalDestination::class);
InvalidMessageException::assertMessageInstanceOf($message, DbalMessage::class);

if (null !== $this->priority && 0 === $message->getPriority()) {
if (null !== $this->priority && null === $message->getPriority()) {
$message->setPriority($this->priority);
}
if (null !== $this->deliveryDelay && null === $message->getDeliveryDelay()) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/dbal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"queue-interop/queue-interop": "^0.6@dev|^1.0.0-alpha1",
"php": "^7.1.3",
"queue-interop/queue-interop": "^0.7@dev",
"doctrine/dbal": "~2.5",
"ramsey/uuid": "^3"
},
Expand All @@ -17,8 +17,8 @@
"enqueue/enqueue": "^0.9@dev",
"enqueue/null": "^0.9@dev",
"queue-interop/queue-spec": "^0.5.5@dev",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4"
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4"
},
"support": {
"email": "[email protected]",
Expand Down
12 changes: 6 additions & 6 deletions pkg/enqueue-bundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"symfony/framework-bundle": "^2.8|^3|^4",
"php": "^7.1.3",
"symfony/framework-bundle": "^3.4|^4",
"enqueue/enqueue": "^0.9@dev",
"enqueue/null": "^0.9@dev",
"enqueue/async-event-dispatcher": "^0.9@dev"
Expand All @@ -32,11 +32,11 @@
"enqueue/sqs": "^0.9@dev",
"enqueue/gps": "^0.9@dev",
"enqueue/test": "^0.9@dev",
"php-amqplib/php-amqplib": "^2.7@dev",
"php-amqplib/php-amqplib": "^2.7",
"doctrine/doctrine-bundle": "~1.2",
"symfony/monolog-bundle": "^2.8|^3|^4",
"symfony/browser-kit": "^2.8|^3|^4",
"symfony/expression-language": "^2.8|^3|^4"
"symfony/monolog-bundle": "^3.4|^4",
"symfony/browser-kit": "^3.4|^4",
"symfony/expression-language": "^3.4|^4"
},
"autoload": {
"psr-4": { "Enqueue\\Bundle\\": "" },
Expand Down
18 changes: 9 additions & 9 deletions pkg/enqueue/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"queue-interop/queue-interop": "^0.6@dev|^1.0.0-alpha1",
"php": "^7.1.3",
"queue-interop/queue-interop": "^0.7@dev",
"enqueue/null": "^0.9@dev",
"ramsey/uuid": "^2|^3.5",
"psr/log": "^1"
},
"require-dev": {
"phpunit/phpunit": "~5.5",
"symfony/console": "^2.8|^3|^4",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4",
"symfony/event-dispatcher": "^2.8|^3|^4",
"symfony/http-kernel": "^2.8|^3|^4",
"symfony/console": "^3.4|^4",
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4",
"symfony/event-dispatcher": "^3.4|^4",
"symfony/http-kernel": "^3.4|^4",
"enqueue/amqp-ext": "^0.9@dev",
"enqueue/amqp-lib": "^0.9@dev",
"enqueue/amqp-bunny": "^0.9@dev",
Expand All @@ -37,8 +37,8 @@
},
"suggest": {
"symfony/console": "^2.8|^3|^4 If you want to use li commands",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4",
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4",
"enqueue/amqp-ext": "AMQP transport (based on php extension)",
"enqueue/stomp": "STOMP transport",
"enqueue/fs": "Filesystem transport",
Expand Down
12 changes: 6 additions & 6 deletions pkg/fs/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"homepage": "https://enqueue.forma-pro.com/",
"license": "MIT",
"require": {
"php": ">=5.6",
"queue-interop/queue-interop": "^0.6|^1.0.0-alpha1",
"symfony/filesystem": "^2.8|^3|^4",
"php": "^7.1.3",
"queue-interop/queue-interop": "^0.7@dev",
"symfony/filesystem": "^3.4|^4",
"makasim/temp-file": "^0.2@stable"
},
"require-dev": {
Expand All @@ -17,9 +17,9 @@
"enqueue/null": "^0.9@dev",
"enqueue/test": "^0.9@dev",
"queue-interop/queue-spec": "^0.5.3@dev",
"symfony/dependency-injection": "^2.8|^3|^4",
"symfony/config": "^2.8|^3|^4",
"symfony/phpunit-bridge": "^2.8|^3|^4"
"symfony/dependency-injection": "^3.4|^4",
"symfony/config": "^3.4|^4",
"symfony/phpunit-bridge": "^3.4|^4"
},
"support": {
"email": "[email protected]",
Expand Down
Loading

0 comments on commit 481b64d

Please sign in to comment.