From df1c85ae5ed7f4a8205880e7a73ecee36acc8a9a Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 17 Jun 2014 19:01:48 +0200 Subject: [PATCH 1/2] Simplified the Travis configuration The tests against specific Symfony versions are now running only for a single PHP version to limit the number of jobs in the build matrix. They are also installing the full Symfony repo to be sure that all components are actually at the specified version without the need to require each of them explicitly. --- .travis.yml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index da3f50c..51aea57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,28 +7,24 @@ php: - 5.6 - hhvm -env: - - SYMFONY_VERSION=2.1.* - - SYMFONY_VERSION=2.2.* - - SYMFONY_VERSION=2.3.* - - SYMFONY_VERSION=2.4.* - - SYMFONY_VERSION=dev-master - matrix: + include: + - php: 5.5 + env: SYMFONY_VERSION='2.1.*' + - php: 5.5 + env: SYMFONY_VERSION='2.2.*' + - php: 5.5 + env: SYMFONY_VERSION='2.3.*' + - php: 5.5 + env: SYMFONY_VERSION='2.4.*' + - php: 5.5 + env: SYMFONY_VERSION='dev-master' allow_failures: - env: SYMFONY_VERSION=dev-master before_script: - composer self-update - - composer require symfony/twig-bundle:${SYMFONY_VERSION} --no-update - - composer require symfony/twig-bridge:${SYMFONY_VERSION} --no-update - - composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update - - composer require symfony/validator:${SYMFONY_VERSION} --dev --no-update - - composer require symfony/console:${SYMFONY_VERSION} --no-update - - composer require symfony/css-selector:${SYMFONY_VERSION} --dev --no-update - - composer require symfony/browser-kit:${SYMFONY_VERSION} --dev --no-update - - composer require symfony/yaml:${SYMFONY_VERSION} --dev --no-update - - composer require symfony/form:${SYMFONY_VERSION} --dev --no-update - - composer update + - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' + - composer install script: phpunit --coverage-text From 8d3fd662bfd0bd439e6f74056adf46876feeaeb8 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Wed, 18 Jun 2014 09:38:16 +0200 Subject: [PATCH 2/2] Fixed the retrieval of the validation MetadataFactory The service is private so getting it from the container get() method is invalid and it does not work anymore in Symfony 2.5 because the service gets inlined. --- Tests/Parser/ValidationParserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Parser/ValidationParserTest.php b/Tests/Parser/ValidationParserTest.php index 7aed2d9..13885b7 100644 --- a/Tests/Parser/ValidationParserTest.php +++ b/Tests/Parser/ValidationParserTest.php @@ -13,7 +13,7 @@ class ValidationParserTest extends WebTestCase public function setUp() { $container = $this->getContainer(); - $factory = $container->get('validator.mapping.class_metadata_factory'); + $factory = $container->get('validator')->getMetadataFactory(); if (version_compare(Kernel::VERSION, '2.2.0', '<')) { $this->parser = new ValidationParserLegacy($factory);