8000 minor #18947 Run an uptodate version of HHVM on Travis (stof) · symfony/symfony@c4149a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit c4149a4

Browse files
minor #18947 Run an uptodate version of HHVM on Travis (stof)
This PR was merged into the 2.7 branch. Discussion ---------- Run an uptodate version of HHVM on Travis | Q | A | ------------- | --- | Branch? |2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | n/a Using the Trusty infrastructure allows running an uptodate version of HHVM rather than running the latest version supporting Precise, which is very old. It relies on an undocumented feature of the Travis config file, namely the fact that ``matrix.include`` actually allows to overwrite everything from the config file (it is merged with the main config), even though the Travis linter complains about it. I think it is fine to use this and to replace it with an official approach once there is one. Refs #18922 Commits ------- e6956c9 Skip some tests on HHVM due to a PHPunit bug e041da0 Use the Trusty Travis infrastructure for HHVM builds
2 parents 553855b + e6956c9 commit c4149a4

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ env:
1717

1818
matrix:
1919
include:
20+
# Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
2021
- php: hhvm
22+
sudo: required
23+
dist: trusty
24+
group: edge
2125
- php: 5.3
2226
- php: 5.4
2327
- php: 5.5
@@ -37,10 +41,10 @@ services: mongodb
3741
before_install:
3842
- PHP=$TRAVIS_PHP_VERSION
3943
# Matrix lines for intermediate PHP versions are skipped for pull requests
40-
- if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && $PHP != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; skip=1; fi
44+
- if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; skip=1; fi
4145
# A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line
4246
- if [[ ! $deps && $PHP = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi
43-
- if [[ $PHP != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
47+
- if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
4448
- if [[ ! $skip ]]; then echo memory_limit = -1 >> $INI_FILE; fi
4549
- if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi
4650
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi
@@ -49,8 +53,8 @@ before_install:
4953
- if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $INI_FILE); fi
5054
- if [[ ! $deps && $PHP = 5.* ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi
5155
- if [[ ! $skip && $PHP = 5.* ]]; then pecl install -f memcached-2.1.0; fi
52-
- if [[ ! $skip && $PHP != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi
53-
- if [[ ! $skip && $PHP != hhvm ]]; then phpenv config-rm xdebug.ini; fi
56+
- if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = ldap.so >> $INI_FILE; fi
57+
- if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini; fi
5458
- if [[ ! $skip ]]; then composer self-update --stable; fi
5559
- if [[ ! $skip ]]; then cp .composer/* ~/.composer/; fi
5660
- if [[ ! $skip ]]; then ./phpunit install; fi
@@ -68,7 +72,7 @@ install:
6872
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
6973
- if [[ ! $deps ]]; then composer update; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi
7074
- if [[ $TRAVIS_BRANCH = master ]]; then export SYMFONY_PHPUNIT_OVERLOAD=1; fi
71-
- if [[ $PHP != hhvm ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
75+
- if [[ ! $PHP = hhvm* ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
7276

7377
script:
7478
- if [[ $skip ]]; then echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"; fi

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class MemcacheSessionHandlerTest extends \PHPUnit_Framework_TestCase
3030

3131
protected function setUp()
3232
{
33+
if (defined('HHVM_VERSION')) {
34+
$this->markTestSkipped('PHPUnit_MockObject cannot mock the Memcache class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289');
35+
}
36+
3337
parent::setUp();
3438
$this->memcache = $this->getMock('Memcache');
3539
$this->storage = new MemcacheSessionHandler(

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class MemcachedSessionHandlerTest extends \PHPUnit_Framework_TestCase
3131

3232
protected function setUp()
3333
{
34+
if (defined('HHVM_VERSION')) {
35+
$this->markTestSkipped('PHPUnit_MockObject cannot mock the Memcached class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289');
36+
}
37+
3438
parent::setUp();
3539

3640
if (version_compare(phpversion('memcached'), '2.2.0', '>=')) {

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ public function testReadWriteReadWithNullByte()
135135

136136
public function testReadConvertsStreamToString()
137137
{
138+
if (defined('HHVM_VERSION')) {
139+
$this->markTestSkipped('PHPUnit_MockObject cannot mock the PDOStatement class on HHVM. See https://github.c 92C4 om/sebastianbergmann/phpunit-mock-objects/pull/289');
140+
}
141+
138142
$pdo = new MockPdo('pgsql');
139143
$pdo->prepareResult = $this->getMock('PDOStatement');
140144

@@ -152,6 +156,10 @@ public function testReadConvertsStreamToString()
152156

153157
public function testReadLockedConvertsStreamToString()
154158
{
159+
if (defined('HHVM_VERSION')) {
160+
$this->markTestSkipped('PHPUnit_MockObject cannot mock the PDOStatement class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289');
161+
}
162+
155163
$pdo = new MockPdo('pgsql');
156164
$selectStmt = $this->getMock('PDOStatement');
157165
$insertStmt = $this->getMock('PDOStatement');

0 commit comments

Comments
 (0)
0