Skip to content

Enable PHP 7.3 tests and functional for PHP 7.2 #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,52 @@ matrix:
include:
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* PHPSTAN=true
env: SYMFONY_VERSION=^3.4 PHPSTAN=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* PHP_CS_FIXER=true
env: SYMFONY_VERSION=^3.4 PHP_CS_FIXER=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* UNIT_TESTS=true
env: SYMFONY_VERSION=^3.4 UNIT_TESTS=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
env: SYMFONY_VERSION=^4.0 UNIT_TESTS=true
- php: 7.2
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
env: SYMFONY_VERSION=^4.0 UNIT_TESTS=true
- php: 7.3
sudo: false
env: SYMFONY_VERSION=^4.0 UNIT_TESTS=true
- php: 7.1
services: docker
sudo: required
env: SYMFONY_VERSION=3.4.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=^3.4 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version should be x.y.* format to ensure that only that version is allowed. Composer could install anew newer version for ^3.4 constraint.

- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=4.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=^4.0 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.2
services: docker
sudo: required
env: SYMFONY_VERSION=^3.4 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.2
sudo: required
services: docker
env: SYMFONY_VERSION=^4.0 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Php version does not matter for functional tests because they are run in the container which has php 7.1 inside it.

services: docker
sudo: required
env: SYMFONY_VERSION=^3.4 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.3
sudo: required
services: docker
env: SYMFONY_VERSION=^4.0 FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
env: SYMFONY_VERSION=^3.4 RDKAFKA_TESTS=true PREPARE_CONTAINER=true
allow_failures:
- env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
- env: SYMFONY_VERSION=^3.4 RDKAFKA_TESTS=true PREPARE_CONTAINER=true

cache:
directories:
Expand Down
25 changes: 12 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "enqueue/enqueue-dev",
"type": "project",
"minimum-stability": "beta",
"homepage": "https://enqueue.forma-pro.com/",
"require": {
"php": "^7.1.3",
Expand All @@ -19,7 +18,7 @@
"ramsey/uuid": "^2|^3.5",
"psr/log": "^1",
"psr/container": "^1",
"symfony/event-dispatcher": "4.0.*",
"symfony/event-dispatcher": "^4.0",
"makasim/temp-file": "^0.2",
"google/cloud-pubsub": "^0.6.1|^1.0",
"doctrine/orm": "~2.4",
Expand All @@ -40,20 +39,20 @@
"phpunit/phpunit": "^5.5",
"phpstan/phpstan": "^0.10",
"queue-interop/queue-spec": "^0.6",
"symfony/browser-kit": "4.0.*",
"symfony/config": "4.0.*",
"symfony/process": "4.0.*",
"symfony/console": "4.0.*",
"symfony/dependency-injection": "4.0.*",
"symfony/event-dispatcher": "4.0.*",
"symfony/expression-language": "4.0.*",
"symfony/http-kernel": "4.0.*",
"symfony/filesystem": "4.0.*",
"symfony/framework-bundle": "4.0.*",
"symfony/browser-kit": "^4.0",
"symfony/config": "^4.0",
"symfony/process": "^4.0",
"symfony/console": "^4.0",
"symfony/dependency-injection": "^4.0",
"symfony/event-dispatcher": "^4.0",
"symfony/expression-language": "^4.0",
"symfony/http-kernel": "^4.0",
"symfony/filesystem": "^4.0",
"symfony/framework-bundle": "^4.0",
"empi89/php-amqp-stubs": "*@dev",
"doctrine/doctrine-bundle": "~1.2",
"kwn/php-rdkafka-stubs": "^1.0.2",
"friendsofphp/php-cs-fixer": "^2"
"friendsofphp/php-cs-fixer": "^2.14"
},
"autoload": {
"psr-4": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private function assertLocatorServices(ContainerBuilder $container, $locatorId,
$this->assertRegExp('/service_locator\..*?\.enqueue\./', $locatorId);

$match = [];
if (false == preg_match('/(service_locator\..*?)\.enqueue\./', $locatorId, $match)) {
if (false == preg_match('/(\.?service_locator\..*?)\.enqueue\./', $locatorId, $match)) {
$this->fail('preg_match should not failed');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private function assertLocatorServices(ContainerBuilder $container, $locatorId,
$this->assertRegExp('/service_locator\..*?\.enqueue\./', $locatorId);

$match = [];
if (false == preg_match('/(service_locator\..*?)\.enqueue\./', $locatorId, $match)) {
if (false == preg_match('/(\.?service_locator\..*?)\.enqueue\./', $locatorId, $match)) {
$this->fail('preg_match should not failed');
}

Expand Down