Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea4121a

Browse files
Make CI green for regular jobs
1 parent a8d95dd commit ea4121a

File tree

8 files changed

+60
-13
lines changed

8 files changed

+60
-13
lines changed

.travis.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ cache:
3636
directories:
3737
- .phpunit
3838
- php-$MIN_PHP
39+
- ~/php-ext
3940

4041
services:
4142
- memcached
@@ -108,10 +109,26 @@ before_install:
108109
[[ $PHP = 5.* ]] && echo extension = memcache.so >> $INI
109110
if [[ $PHP = 5.* ]]; then
110111
echo extension = mongo.so >> $INI
111-
elif [[ $PHP = 7.* ]]; then
112-
echo extension = mongodb.so >> $INI
113112
fi
114113
114+
# tpecl is a helper to compile and cache php extensions
115+
tpecl () {
116+
local ext_name=$1
117+
local ext_so=$2
118+
local INI=$3
119+
local ext_dir=$(php -r "echo ini_get('extension_dir');")
120+
local ext_cache=~/php-ext/$(basename $ext_dir)/$ext_name
121+
122+
if [[ -e $ext_cache/$ext_so ]]; then
123+
echo extension = $ext_cache/$ext_so >> $INI
124+
else
125+
mkdir -p $ext_cache
126+
echo yes | pecl install -f $ext_name &&
127+
cp $ext_dir/$ext_so $ext_cache
128+
fi
129+
}
130+
export -f tpecl
131+
115132
# Matrix lines for intermediate PHP versions are skipped for pull requests
116133
if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then
117134
deps=skip
@@ -130,10 +147,17 @@ before_install:
130147
- |
131148
# Install extra PHP extensions
132149
if [[ ! $skip && $PHP = 5.* ]]; then
133-
([[ $deps ]] || tfold ext.symfony_debug 'cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> '"$INI") &&
134-
tfold ext.apcu4 'echo yes | pecl install -f apcu-4.0.11'
150+
([[ $deps ]] || tfold ext.symfony_debug 'cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> '"$INI")
151+
tfold ext.apcu tpecl apcu-4.0.11 apcu.so $INI
135152
elif [[ ! $skip && $PHP = 7.* ]]; then
136-
tfold ext.apcu5 'echo yes | pecl install -f apcu-5.1.6'
153+
# install libsodium
154+
sudo add-apt-repository ppa:ondrej/php -y
155+
sudo apt-get update -q
156+
sudo apt-get install libsodium-dev -y
157+
158+
tfold ext.apcu tpecl apcu-5.1.6 apcu.so $INI
159+
tfold ext.libsodium tpecl libsodium sodium.so $INI
160+
tfold ext.mongodb tpecl mongodb-1.4.0RC1 mongodb.so $INI
137161
fi
138162
139163
- |

appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ install:
1818
- mkdir c:\php && cd c:\php
1919
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/cacert.pem
2020
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-5.5.9-nts-Win32-VC11-x86.zip
21-
- 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y >nul
2221
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
22+
- 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul
2323
- cd ext
2424
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-4.0.10-5.5-nts-vc11-x86.zip
2525
- 7z x php_apcu-4.0.10-5.5-nts-vc11-x86.zip -y >nul
@@ -45,19 +45,21 @@ install:
4545
- echo extension=php_pdo_sqlite.dll >> php.ini-max
4646
- echo extension=php_curl.dll >> php.ini-max
4747
- echo curl.cainfo=c:\php\cacert.pem >> php.ini-max
48-
- copy /Y php.ini-max php.ini
48+
- copy /Y php.ini-min php.ini
49+
- echo extension=php_openssl.dll >> php.ini
4950
- cd c:\projects\symfony
5051
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar)
5152
- php composer.phar self-update
5253
- copy /Y .composer\* %APPDATA%\Composer\
5354
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
5455
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
55-
- php -dmemory_limit=-1 composer.phar update --no-progress --no-suggest --ansi
56+
- php composer.phar config platform.php 5.5.9
57+
- php composer.phar update --no-progress --no-suggest --ansi
5658
- php phpunit install
5759

5860
test_script:
5961
- SET X=0
60-
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul && copy /Y php.ini-min php.ini
62+
- cd c:\php && copy /Y php.ini-min php.ini
6163
- cd c:\projects\symfony
6264
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
6365
- cd c:\php && 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y >nul && copy /Y php.ini-min php.ini

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ $foo = new FooTestCase();
5959
$foo->testLegacyFoo();
6060
$foo->testNonLegacyBar();
6161

62+
register_shutdown_function(function () {
63+
exit('I get precedence over any exit statements inside the deprecation error handler.');
64+
});
65+
6266
?>
6367
--EXPECTF--
6468
Unsilenced deprecation notices (3)
@@ -80,3 +84,4 @@ Other deprecation notices (1)
8084

8185
1x: root deprecation
8286

87+
I get precedence over any exit statements inside the deprecation error handler.

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/fake_vendor/acme/lib/deprecation_riddled.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public function testLegacyFoo()
2121
{
2222
@trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
2323
trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
24+
@trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
25+
trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
2426
}
2527

2628
public function testNonLegacyBar()

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ Unsilenced deprecation notices (1)
3737
Legacy deprecation notices (1)
3838

3939
Other deprecation notices (1)
40-

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_eval_d_deprecation.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ while (!file_exists($vendor.'/vendor')) {
1515
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
1616
require PHPUNIT_COMPOSER_INSTALL;
1717
require_once __DIR__.'/../../bootstrap.php';
18-
eval("@trigger_error('who knows where I come from?', E_USER_DEPRECATED);")
18+
eval("@trigger_error('who knows where I come from?', E_USER_DEPRECATED);");
1919

2020
?>
2121
--EXPECTF--
2222

2323
Other deprecation notices (1)
24+
25+
1x: who knows where I come from?

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_phar_deprecation.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ include 'phar://deprecation.phar/deprecation.php';
2323
--EXPECTF--
2424

2525
Other deprecation notices (1)
26+
27+
1x: I come from… afar! :D

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php';
2020

2121
?>
2222
--EXPECTF--
23-
Unsilenced deprecation notices (2)
23+
Unsilenced deprecation notices (3)
24+
25+
2x: unsilenced foo deprecation
26+
2x in FooTestCase::testLegacyFoo
27+
28+
1x: unsilenced bar deprecation
29+
1x in FooTestCase::testNonLegacyBar
2430

2531
Remaining vendor deprecation notices (1)
2632

27-
Legacy deprecation notices (1)
33+
1x: silenced bar deprecation
34+
1x in FooTestCase::testNonLegacyBar
35+
36+
Legacy deprecation notices (2)
2837

2938
Other deprecation notices (1)
39+
40+
1x: root deprecation

0 commit comments

Comments
 (0)