Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 2.8: (21 commits) Fix merge Fix typo Various fixes esp. on Windows Fix the validation of form resources to register the default theme Fix the retrieval of the value with property path when using a loader [appveyor] minor enhancements [Process] Disable failing tests on Windows [Translation] Fix the string casting in the XliffFileLoader Windows and Intl fixes Add appveyor.yml for C.I. on Windows [VarDumper] fixed HtmlDumper to target specific the head tag [travis] merge php: nightly and deps=high test-matrix lines consistently use str_replace to unify directory separators Support omitting the <target> node in an .xlf file. Fix the handling of values for multiple choice types moved PHP nightly to PHP 7.0 fixed tests using deprecation features [Form] made deprecation notice more precise fixed CS Fix BC break after split of ACL from core ... Conflicts: .travis.yml composer.json src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php src/Symfony/Component/Locale/Tests/LocaleTest.php
- Loading branch information
Showing
64 changed files
with
555 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ phpunit.xml | |
composer.phar | ||
package.tar | ||
/packages.json | ||
/.phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
build: false | ||
shallow_clone: true | ||
platform: x86 | ||
clone_folder: c:\projects\symfony | ||
|
||
environment: | ||
matrix: | ||
- PHP_EXT: 1 | ||
- PHP_EXT: 0 | ||
|
||
cache: | ||
- c:\php -> appveyor.yml | ||
- .phpunit -> phpunit | ||
|
||
init: | ||
- SET PATH=c:\php;%PATH% | ||
- SET COMPOSER_NO_INTERACTION=1 | ||
- SET SYMFONY_DEPRECATIONS_HELPER=strict | ||
- SET PHP=1 | ||
- SET ANSICON=121x90 (121x90) | ||
|
||
install: | ||
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php) | ||
- cd c:\php | ||
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.6.11-nts-Win32-VC11-x86.zip | ||
- IF %PHP%==1 7z x php-5.6.11-nts-Win32-VC11-x86.zip -y > 7z.log | ||
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat | ||
- appveyor DownloadFile https://getcomposer.org/composer.phar | ||
- copy php.ini-production php.ini /Y | ||
- echo date.timezone="UTC" >> php.ini | ||
- echo extension_dir=ext >> php.ini | ||
- echo extension=php_openssl.dll >> php.ini | ||
- IF %PHP_EXT%==1 echo extension=php_intl.dll >> php.ini | ||
- IF %PHP_EXT%==1 echo extension=php_mbstring.dll >> php.ini | ||
- IF %PHP_EXT%==1 echo extension=php_fileinfo.dll >> php.ini | ||
- IF %PHP_EXT%==1 echo extension=php_pdo_sqlite.dll >> php.ini | ||
- cd c:\projects\symfony | ||
- php phpunit install | ||
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) | ||
- composer update --prefer-source --no-progress --ansi | ||
|
||
test_script: | ||
- cd c:\projects\symfony | ||
- php phpunit symfony --exclude-group benchmark,intl-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
error_reporting(-1); | ||
|
||
$PHPUNIT_VERSION = 4.8; | ||
$PHPUNIT_DIR = __DIR__.'/.phpunit'; | ||
|
||
if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) { | ||
// Build a standalone phpunit without symfony/yaml | ||
|
||
$oldPwd = getcwd(); | ||
mkdir($PHPUNIT_DIR); | ||
chdir($PHPUNIT_DIR); | ||
if (extension_loaded('openssl') && ini_get('allow_url_fopen')) { | ||
stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb')); | ||
} else { | ||
passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip"); | ||
} | ||
$zip = new ZipArchive(); | ||
$zip->open("$PHPUNIT_VERSION.zip"); | ||
$zip->extractTo(getcwd()); | ||
$zip->close(); | ||
chdir("phpunit-$PHPUNIT_VERSION"); | ||
passthru("composer remove --no-update symfony/yaml"); | ||
passthru("composer install --prefer-source --no-progress --ansi"); | ||
chdir($oldPwd); | ||
} | ||
|
||
$cmd = array_map('escapeshellarg', $argv); | ||
$exit = 0; | ||
|
||
if (isset($argv[1]) && 'symfony' === $argv[1]) { | ||
// Find Symfony components in plain php for Windows portability | ||
|
||
$finder = new RecursiveDirectoryIterator('src/Symfony', FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::UNIX_PATHS); | ||
$finder = new RecursiveIteratorIterator($finder); | ||
$finder->setMaxDepth(3); | ||
|
||
array_shift($cmd); | ||
$cmd[0] = "php $PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit --colors=always"; | ||
$procs = array(); | ||
|
||
foreach ($finder as $file => $fileInfo) { | ||
if ('phpunit.xml.dist' === $file) { | ||
$component = dirname($fileInfo->getPathname()); | ||
|
||
// Run phpunit tests in parallel | ||
|
||
$c = escapeshellarg($component); | ||
|
||
if ($proc = proc_open(implode(' ', $cmd)." $c > $c/phpunit.stdout 2> $c/phpunit.stderr", array(), $pipes)) { | ||
$procs[$component] = $proc; | ||
} else { | ||
$exit = 1; | ||
echo "\033[41mKO\033[0m $component\n\n"; | ||
} | ||
} | ||
} | ||
|
||
// Fixes for colors support on appveyor | ||
// See http://help.appveyor.com/discussions/suggestions/197-support-ansi-color-codes | ||
$colorFixes = array( | ||
array("S\033[0m\033[0m\033[36m\033[1mS", "E\033[0m\033[0m\033[31m\033[1mE", "I\033[0m\033[0m\033[33m\033[1mI", "F\033[0m\033[0m\033[41m\033[37mF"), | ||
array("SS", "EE", "II", "FF"), | ||
); | ||
$colorFixes[0] = array_merge($colorFixes[0], $colorFixes[0]); | ||
$colorFixes[1] = array_merge($colorFixes[1], $colorFixes[1]); | ||
|
||
foreach ($procs as $component => $proc) { | ||
$procStatus = proc_close($proc); | ||
|
||
foreach (array('out', 'err') as $file) { | ||
$file = "$component/phpunit.std$file"; | ||
|
||
if ('\\' === DIRECTORY_SEPARATOR) { | ||
$h = fopen($file, 'rb'); | ||
while (false !== $line = fgets($h)) { | ||
echo str_replace($colorFixes[0], $colorFixes[1], preg_replace( | ||
'/(\033\[[0-9]++);([0-9]++m)(?:(.)(\033\[0m))?/', | ||
"$1m\033[$2$3$4$4", | ||
$line | ||
)); | ||
} | ||
fclose($h); | ||
} else { | ||
readfile($file); | ||
} | ||
unlink($file); | ||
} | ||
|
||
if ($procStatus) { | ||
$exit = 1; | ||
echo "\033[41mKO\033[0m $component\n\n"; | ||
} else { | ||
echo "\033[32mOK\033[0m $component\n\n"; | ||
} | ||
} | ||
|
||
} elseif (!isset($argv[1]) || 'install' !== $argv[1]) { | ||
// Run regular phpunit in a subprocess | ||
|
||
$cmd[0] = "php $PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit --colors=always"; | ||
|
||
$errFile = tempnam(sys_get_temp_dir(), 'phpunit.stderr.'); | ||
if ($proc = proc_open(implode(' ', $cmd).' 2> '.escapeshellarg($errFile), array(1 => array('pipe', 'w')), $pipes)) { | ||
stream_copy_to_stream($pipes[1], STDOUT); | ||
fclose($pipes[1]); | ||
$exit = proc_close($proc); | ||
|
||
readfile($errFile); | ||
unlink($errFile); | ||
} | ||
|
||
if (!file_exists($component = array_pop($argv))) { | ||
$component = basename(getcwd()); | ||
} | ||
|
||
if ($exit) { | ||
echo "\033[41mKO\033[0m $component\n\n"; | ||
} else { | ||
echo "\033[32mOK\033[0m $component\n\n"; | ||
} | ||
} | ||
|
||
exit($exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.