Commit 029f3d05 authored by Fabien Potencier's avatar Fabien Potencier

minor #1598 Removed tests for obsolete Symfony versions, remove HHVM support (fabpot)

This PR was squashed before being merged into the 2.2.x-dev branch (closes #1598).

Discussion
----------

Removed tests for obsolete Symfony versions, remove HHVM support

This PR does the following:

 * dropped support for non-supported Symfony versions
 * dropped support for HHVM
 * removed the "dev" minimum stability in `composer.json`
 * changed tests to run on stable versions of Symfony (instead of dev)
 * optimized PHPUnit cache
 * added tests for Symfony 3.4
 * fixed risky tests

Commits
-------

b447ec3b fixed risky tests
43e4cf29 tweaked tests to run on stable versions
7c7d81f0 removed support for HHVM
678d0489 removed tests for obsolete Symfony versions
parents 5e032d07 b447ec3b
......@@ -5,36 +5,39 @@ sudo: false
env:
global:
- SYMFONY_DEPRECATIONS_HELPER=weak
- SYMFONY_PHPUNIT_DIR=$HOME/.symfony-phpunit
cache:
directories:
- $HOME/.composer/cache/files
- .phpunit
- $HOME/.symfony-phpunit
before_install:
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi
- phpenv config-rm xdebug.ini
before_script:
# Twig 1.x
- if [[ $TWIG_VERSION != 2.0 ]]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; fi
# Symfony 2.8
- if [[ $SYMFONY_DEPS_VERSION = 2.8 ]]; then sed -i 's/~2\.8|^3\.0/2.8.*@dev/g' composer.json; fi
# Symfony 3.0
- if [[ $SYMFONY_DEPS_VERSION = 3.0 ]]; then sed -i 's/~2\.8|^3\.0/3.0.*@dev/g' composer.json; fi
# Symfony 3.1
- if [[ $SYMFONY_DEPS_VERSION = 3.1 ]]; then sed -i 's/~2\.8|^3\.0/3.1.*@dev/g' composer.json; fi
# Symfony 3.2
- if [[ $SYMFONY_DEPS_VERSION = 3.2 ]]; then sed -i 's/~2\.8|^3\.0/3.2.*@dev/g' composer.json; fi
- if [[ $SYMFONY_DEPS_VERSION = 2.8 ]]; then sed -i 's/~2\.8|^3\.0/2.8.*/g' composer.json; fi
# Symfony 3.3
- |
if [[ $SYMFONY_DEPS_VERSION = 3.3 ]]; then
sed -i 's/~2\.8|^3\.0/3.3.*@dev/g' composer.json;
composer require --dev --no-update symfony/web-link:3.3.*
sed -i 's/~2\.8|^3\.0/3.3.*/g' composer.json;
composer require --no-update symfony/web-link:3.3.*
fi
# Symfony 3.4
- |
if [[ $SYMFONY_DEPS_VERSION = 3.4 ]]; then
sed -i 's/~2\.8|^3\.0/3.4.*/g' composer.json;
composer require --no-update symfony/web-link:3.4.*
fi
- composer update --no-suggest
install:
- ./vendor/bin/simple-phpunit install
script: ./vendor/bin/simple-phpunit
matrix:
......@@ -44,17 +47,11 @@ matrix:
env: TWIG_VERSION=2.0
- php: 5.6
env: SYMFONY_DEPS_VERSION=2.8
- php: 5.6
env: SYMFONY_DEPS_VERSION=3.0
- php: 5.6
env: SYMFONY_DEPS_VERSION=3.1
- php: 5.6
env: SYMFONY_DEPS_VERSION=3.2
- php: 5.6
env: SYMFONY_DEPS_VERSION=3.3
- php: 5.6
env: SYMFONY_DEPS_VERSION=3.4
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: hhvm
dist: trusty
......@@ -67,6 +67,5 @@
"branch-alias": {
"dev-master": "2.2.x-dev"
}
},
"minimum-stability": "dev"
}
}
......@@ -58,11 +58,15 @@ class ControllerCollectionTest extends TestCase
} catch (ControllerFrozenException $e) {
}
$this->addToAssertionCount(1);
try {
$barController->bind('bar2');
$this->fail();
} catch (ControllerFrozenException $e) {
}
$this->addToAssertionCount(1);
}
public function testConflictingRouteNames()
......
......@@ -275,6 +275,7 @@ class FormServiceProviderTest extends TestCase
try {
$translator->trans('test');
$this->addToAssertionCount(1);
} catch (NotFoundResourceException $e) {
$this->fail('Form factory should not add a translation resource that does not exist');
}
......
......@@ -36,6 +36,8 @@ class ValidatorServiceProviderTest extends TestCase
$app->register(new ValidatorServiceProvider());
$app->register(new FormServiceProvider());
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app;
}
......@@ -53,6 +55,8 @@ class ValidatorServiceProviderTest extends TestCase
),
));
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app;
}
......@@ -130,6 +134,7 @@ class ValidatorServiceProviderTest extends TestCase
try {
$translator->trans('test');
$this->addToAssertionCount(1);
} catch (NotFoundResourceException $e) {
$this->fail('Validator should not add a translation resource that does not exist');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment