Skip to content

Commit 1b3bec5

Browse files
authored
Reduced the number of travis builds. (#149)
* Reduced the number of travis builds. * Syntax fix * Update .travis.yml * Be clearer in Travis GUI * updated according to feedback * Add tests for sf 3.1 * Re lved * Use the symfony phpunit bridge * Added missing deps * Use strings instead of constants * Added legacy annotation * merge fix * Fix * Require finder
1 parent 7b5bdf7 commit 1b3bec5

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

.travis.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ php:
1414
- hhvm
1515

1616
env:
17-
global:
18-
- TEST_COMMAND="composer test"
19-
matrix:
20-
- SYMFONY_VERSION=3.2.*
21-
- SYMFONY_VERSION=3.1.*
22-
- SYMFONY_VERSION=2.8.*
17+
- TEST_COMMAND="composer test"
2318

2419
branches:
2520
except:
@@ -29,10 +24,18 @@ matrix:
2924
fast_finish: true
3025
include:
3126
- php: 5.5
32-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.*
27+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
28+
- php: 7.1
29+
env: DEPENDENCIES=dev
30+
# Test against LTS versions
31+
- php: 7.0
32+
env: SYMFONY_VERSION=2.8.*
33+
34+
before_install:
35+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
36+
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
3337

3438
install:
35-
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
3639
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
3740

3841
script:

Discovery/ConfiguredClientsStrategy.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
use Http\Client\HttpAsyncClient;
77
use Http\Discovery\HttpClientDiscovery;
88
use Http\Discovery\Strategy\DiscoveryStrategy;
9-
use Symfony\Component\Console\ConsoleEvents;
109
use Symfony\Component\EventDispatcher\Event;
1110
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
12-
use Symfony\Component\HttpKernel\KernelEvents;
1311

1412
/**
1513
* A strategy that provide clients configured with HTTPlug bundle. With help from this strategy
@@ -77,8 +75,8 @@ public function onEvent(Event $e)
7775
public static function getSubscribedEvents()
7876
{
7977
return [
80-
KernelEvents::REQUEST => ['onEvent', 1024],
81-
ConsoleEvents::COMMAND => ['onEvent', 1024],
78+
'kernel.request' => ['onEvent', 1024],
79+
'console.command' => ['onEvent', 1024],
8280
];
8381
}
8482
}

Tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ public function testInvalidAuthentication()
279279
$this->assertProcessedConfigurationEquals([], [$file]);
280280
}
281281

282+
/**
283+
* @group legacy
284+
*/
282285
public function testBackwardCompatibility()
283286
{
284287
$formats = array_map(function ($path) {

Tests/Unit/DependencyInjection/HttplugExtensionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ public function testClientPlugins()
138138
$this->assertContainerBuilderHasServiceDefinitionWithArgument('httplug.client.acme', 0, $pluginReferences);
139139
}
140140

141+
/**
142+
* @group legacy
143+
*/
141144
public function testNoProfilingWhenToolbarIsDisabled()
142145
{
143146
$this->load(
@@ -174,6 +177,9 @@ public function testNoProfilingWhenNotInDebugMode()
174177
$this->verifyProfilingDisabled();
175178
}
176179

180+
/**
181+
* @group legacy
182+
*/
177183
public function testProfilingWhenToolbarIsSpecificallyOn()
178184
{
179185
$this->setParameter('kernel.debug', false);

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
"php-http/guzzle6-adapter": "^1.1.1",
3838
"php-http/react-adapter": "^0.2.1",
3939
"php-http/buzz-adapter": "^0.3",
40-
"symfony/symfony": "^2.8 || ^3.0",
40+
"symfony/phpunit-bridge": "^3.2",
41+
"symfony/twig-bundle": "^2.8 || ^3.0",
42+
"symfony/twig-bridge": "^2.8 || ^3.0",
43+
"symfony/web-profiler-bundle": "^2.8 || ^3.0",
44+
"symfony/finder": "^2.7 || ^3.0",
4145
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
4246
"matthiasnoback/symfony-dependency-injection-test": "^1.0"
4347
},

0 commit comments

Comments
 (0)