Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit a8a8e31

Browse files
committed
Improved Travis setup
1 parent 0f3d000 commit a8a8e31

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

.travis.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,33 @@ sudo: false
1212

1313
cache:
1414
directories:
15-
- $HOME/.composer/cache
15+
- $HOME/.composer/cache/files
1616

1717
env:
18-
- SYMFONY_VERSION=2.7.* SYMFONY_DEPRECATIONS_HELPER=weak
18+
global: SYMFONY_DEPRECATIONS_HELPER=533
1919

2020
matrix:
2121
include:
22+
- php: 5.6
23+
env: DEPS=dev
2224
- php: 5.3
2325
env: SYMFONY_VERSION="^2.3.4" COMPOSER_FLAGS="--prefer-lowest"
2426
- php: 5.6
25-
env: SYMFONY_VERSION=2.3.* SYMFONY_DEPRECATIONS_HELPER=weak
26-
- php: 5.6
27-
env: SYMFONY_VERSION=2.8.*
27+
env: SYMFONY_VERSION=2.3.*
2828
- php: 5.6
29-
env: SYMFONY_VERSION=3.0.*
30-
allow_failures:
31-
- env: SYMFONY_VERSION=2.8.*
32-
- env: SYMFONY_VERSION=3.0.*
29+
env: SYMFONY_VERSION=2.7.*
3330
fast_finish: true
3431

3532
before_install:
36-
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
33+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
34+
- phpenv config-rm xdebug.ini || true
3735
- composer self-update
38-
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
36+
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
37+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
3938

40-
install: composer update $COMPOSER_FLAGS --prefer-dist
39+
install: composer update --prefer-dist $COMPOSER_FLAGS
4140

42-
script: phpunit --coverage-text
41+
script: phpunit
4342

4443
notifications:
4544
irc: "irc.freenode.org#symfony-cmf"

Extension/ContentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function buildOptions(array $options)
6767
$options['uri'] = $this->contentRouter->generate(
6868
$options['content'],
6969
isset($options['routeParameters']) ? $options['routeParameters'] : array(),
70-
isset($options['routeAbsolute']) ? $options['routeAbsolute'] : false
70+
(isset($options['routeAbsolute']) && $options['routeAbsolute']) ? UrlGeneratorInterface::ABSOLUTE_URL : UrlGeneratorInterface::ABSOLUTE_PATH
7171
);
7272
}
7373

Tests/Unit/Extension/ContentExtensionTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Cmf\Bundle\MenuBundle\Tests\Unit\Extension;
1313

14+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1415
use Symfony\Cmf\Bundle\MenuBundle\Extension\ContentExtension;
1516

1617
class ContentExtensionTest extends \PHPUnit_Framework_TestCase
@@ -76,7 +77,7 @@ public function testContentLinkType($typeSet)
7677

7778
$this->generator->expects($this->once())
7879
->method('generate')
79-
->with('configured_content', array('test' => 'foo'), true)
80+
->with('configured_content', array('test' => 'foo'), UrlGeneratorInterface::ABSOLUTE_URL)
8081
->willReturn('/generated_uri');
8182

8283
$this->assertEquals(
@@ -103,7 +104,7 @@ public function testOptionsAsRemovedWhenLinkTypeIsElse()
103104

104105
$this->generator->expects($this->once())
105106
->method('generate')
106-
->with('configured_content', array(), false)
107+
->with('configured_content', array(), UrlGeneratorInterface::ABSOLUTE_PATH)
107108
->willReturn('/generated_uri');
108109

109110
$this->assertEquals(

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"homepage": "https://github.com/symfony-cmf/MenuBundle/contributors"
1212
}
1313
],
14-
"minimum-stability": "dev",
15-
"prefer-stable": true,
1614
"require": {
1715
"php": "^5.3.9|^7.0",
1816
"symfony/framework-bundle": "^2.3",
@@ -25,7 +23,7 @@
2523
"require-dev": {
2624
"symfony/monolog-bundle": "^2.3",
2725
"symfony-cmf/routing-bundle": "^1.2.0-RC3",
28-
"symfony-cmf/testing": "^1.3",
26+
"symfony-cmf/testing": "^1.3@dev",
2927
"symfony-cmf/tree-browser-bundle": "^1.0.0-RC1",
3028
"doctrine/phpcr-odm": "^1.3",
3129
"twig/twig": "^1.12.1",

0 commit comments

Comments
 (0)