minor #24108 [travis] update to trusty (nicolas-grekas)
This PR was merged into the 2.7 branch.
Discussion
----------
[travis] update to trusty
| 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 | -
Precise is dying, see https://blog.travis-ci.com/2017-08-31-trusty-as-default-status
Commits
-------
cfc9346
[travis] update to trusty
This commit is contained in:
commit
cf4f8325e9
@ -1,6 +1,6 @@
|
|||||||
language: php
|
language: php
|
||||||
|
|
||||||
dist: precise
|
dist: trusty
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
git:
|
git:
|
||||||
@ -13,17 +13,14 @@ addons:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- MIN_PHP=5.3.9
|
- MIN_PHP=5.4.9
|
||||||
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php
|
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
|
|
||||||
- php: hhvm-3.18
|
- php: hhvm-3.18
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
|
||||||
group: edge
|
group: edge
|
||||||
- php: 5.3
|
|
||||||
- php: 5.4
|
- php: 5.4
|
||||||
- php: 5.5
|
- php: 5.5
|
||||||
- php: 5.6
|
- php: 5.6
|
||||||
@ -99,7 +96,6 @@ before_install:
|
|||||||
echo opcache.enable_cli = 1 >> $INI
|
echo opcache.enable_cli = 1 >> $INI
|
||||||
echo hhvm.jit = 0 >> $INI
|
echo hhvm.jit = 0 >> $INI
|
||||||
echo apc.enable_cli = 1 >> $INI
|
echo apc.enable_cli = 1 >> $INI
|
||||||
echo extension = ldap.so >> $INI
|
|
||||||
[[ $PHP = 5.* ]] && echo extension = memcache.so >> $INI
|
[[ $PHP = 5.* ]] && echo extension = memcache.so >> $INI
|
||||||
if [[ $PHP = 5.* ]]; then
|
if [[ $PHP = 5.* ]]; then
|
||||||
echo extension = mongo.so >> $INI
|
echo extension = mongo.so >> $INI
|
||||||
|
@ -17,8 +17,8 @@ init:
|
|||||||
install:
|
install:
|
||||||
- mkdir c:\php && cd c:\php
|
- mkdir c:\php && cd c:\php
|
||||||
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/cacert.pem
|
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/cacert.pem
|
||||||
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-5.3.11-nts-Win32-VC9-x86.zip
|
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-5.3.9-nts-Win32-VC9-x86.zip
|
||||||
- 7z x php-5.3.11-nts-Win32-VC9-x86.zip -y >nul
|
- 7z x php-5.3.9-nts-Win32-VC9-x86.zip -y >nul
|
||||||
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/ICU-51.2-dlls.zip
|
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/ICU-51.2-dlls.zip
|
||||||
- 7z x ICU-51.2-dlls.zip -y >nul
|
- 7z x ICU-51.2-dlls.zip -y >nul
|
||||||
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
|
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
|
||||||
@ -61,7 +61,7 @@ test_script:
|
|||||||
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul && copy /Y php.ini-min php.ini
|
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul && copy /Y php.ini-min php.ini
|
||||||
- cd c:\projects\symfony
|
- cd c:\projects\symfony
|
||||||
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
|
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
|
||||||
- cd c:\php && 7z x php-5.3.11-nts-Win32-VC9-x86.zip -y >nul && copy /Y php.ini-min php.ini
|
- cd c:\php && 7z x php-5.3.9-nts-Win32-VC9-x86.zip -y >nul && copy /Y php.ini-min php.ini
|
||||||
- cd c:\projects\symfony
|
- cd c:\projects\symfony
|
||||||
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
|
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
|
||||||
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
|
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
|
||||||
|
@ -23,20 +23,20 @@
|
|||||||
"symfony/http-kernel": "~2.7"
|
"symfony/http-kernel": "~2.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/browser-kit": "~2.4",
|
"symfony/browser-kit": "~2.7",
|
||||||
"symfony/console": "~2.7",
|
"symfony/console": "~2.7",
|
||||||
"symfony/css-selector": "^2.0.5",
|
"symfony/css-selector": "^2.7",
|
||||||
"symfony/dependency-injection": "^2.6.6",
|
"symfony/dependency-injection": "^2.7",
|
||||||
"symfony/dom-crawler": "^2.0.5",
|
"symfony/dom-crawler": "^2.7",
|
||||||
"symfony/form": "~2.7.15|^2.8.8",
|
"symfony/form": "~2.7.15|^2.8.8",
|
||||||
"symfony/framework-bundle": "~2.7.25|^2.8.18",
|
"symfony/framework-bundle": "~2.7.25|^2.8.18",
|
||||||
"symfony/http-foundation": "~2.7",
|
"symfony/http-foundation": "~2.7",
|
||||||
"symfony/twig-bundle": "~2.7",
|
"symfony/twig-bundle": "~2.7",
|
||||||
"symfony/twig-bridge": "^2.7.4",
|
"symfony/twig-bridge": "^2.7.4",
|
||||||
"symfony/process": "^2.0.5",
|
"symfony/process": "^2.7",
|
||||||
"symfony/validator": "~2.5",
|
"symfony/validator": "~2.7",
|
||||||
"symfony/yaml": "^2.0.5",
|
"symfony/yaml": "^2.7",
|
||||||
"symfony/expression-language": "~2.6",
|
"symfony/expression-language": "~2.7",
|
||||||
"doctrine/doctrine-bundle": "~1.2",
|
"doctrine/doctrine-bundle": "~1.2",
|
||||||
"twig/twig": "~1.34|~2.4",
|
"twig/twig": "~1.34|~2.4",
|
||||||
"ircmaxell/password-compat": "~1.0"
|
"ircmaxell/password-compat": "~1.0"
|
||||||
|
@ -121,7 +121,7 @@ class JsonResponse extends Response
|
|||||||
$data = json_encode($data, $this->encodingOptions);
|
$data = json_encode($data, $this->encodingOptions);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
if (\PHP_VERSION_ID < 50400) {
|
if (!interface_exists('JsonSerializable', false)) {
|
||||||
// PHP 5.3 triggers annoying warnings for some
|
// PHP 5.3 triggers annoying warnings for some
|
||||||
// types that can't be serialized as JSON (INF, resources, etc.)
|
// types that can't be serialized as JSON (INF, resources, etc.)
|
||||||
// but doesn't provide the JsonSerializable interface.
|
// but doesn't provide the JsonSerializable interface.
|
||||||
@ -153,7 +153,7 @@ class JsonResponse extends Response
|
|||||||
if (\PHP_VERSION_ID < 50500) {
|
if (\PHP_VERSION_ID < 50500) {
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
if (\PHP_VERSION_ID >= 50400 && 'Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) {
|
if (interface_exists('JsonSerializable', false) && 'Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) {
|
||||||
throw $e->getPrevious() ?: $e;
|
throw $e->getPrevious() ?: $e;
|
||||||
}
|
}
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -206,10 +206,13 @@ class JsonResponseTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @expectedException \Exception
|
* @expectedException \Exception
|
||||||
* @expectedExceptionMessage This error is expected
|
* @expectedExceptionMessage This error is expected
|
||||||
* @requires PHP 5.4
|
|
||||||
*/
|
*/
|
||||||
public function testSetContentJsonSerializeError()
|
public function testSetContentJsonSerializeError()
|
||||||
{
|
{
|
||||||
|
if (!interface_exists('JsonSerializable', false)) {
|
||||||
|
$this->markTestSkipped('JsonSerializable is required.');
|
||||||
|
}
|
||||||
|
|
||||||
$serializable = new JsonSerializableObject();
|
$serializable = new JsonSerializableObject();
|
||||||
|
|
||||||
JsonResponse::create($serializable);
|
JsonResponse::create($serializable);
|
||||||
@ -224,7 +227,7 @@ class JsonResponseTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interface_exists('JsonSerializable')) {
|
if (interface_exists('JsonSerializable', false)) {
|
||||||
class JsonSerializableObject implements \JsonSerializable
|
class JsonSerializableObject implements \JsonSerializable
|
||||||
{
|
{
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
|
Reference in New Issue
Block a user