Merge branch '3.1'
* 3.1: [ci] Fix build-packages.php [Validator] Update IpValidatorTest data set with a valid reserved IP
This commit is contained in:
commit
1d4bee5330
11
.github/build-packages.php
vendored
11
.github/build-packages.php
vendored
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (4 > $_SERVER['argc']) {
|
if (3 > $_SERVER['argc']) {
|
||||||
echo "Usage: branch version dir1 dir2 ... dirN\n";
|
echo "Usage: branch dir1 dir2 ... dirN\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
chdir(dirname(__DIR__));
|
chdir(dirname(__DIR__));
|
||||||
@ -9,7 +9,6 @@ chdir(dirname(__DIR__));
|
|||||||
$dirs = $_SERVER['argv'];
|
$dirs = $_SERVER['argv'];
|
||||||
array_shift($dirs);
|
array_shift($dirs);
|
||||||
$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs))));
|
$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs))));
|
||||||
$version = array_shift($dirs);
|
|
||||||
|
|
||||||
$packages = array();
|
$packages = array();
|
||||||
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
|
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
|
||||||
@ -40,7 +39,11 @@ foreach ($dirs as $k => $dir) {
|
|||||||
}
|
}
|
||||||
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
|
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
|
||||||
|
|
||||||
$package->version = $version.'.999';
|
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
|
||||||
|
echo "Missing \"dev-master\" branch-alias in composer.json extra.\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
$package->version = str_replace('-dev', '.999', $package->extra->{'branch-alias'}->{'dev-master'});
|
||||||
$package->dist['type'] = 'tar';
|
$package->dist['type'] = 'tar';
|
||||||
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
|
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ install:
|
|||||||
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
|
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
|
||||||
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
|
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
|
||||||
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
|
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
|
||||||
- if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH $COMPONENTS; fi
|
- if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $COMPONENTS; fi
|
||||||
- if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi
|
- if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi
|
||||||
- if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH src/Symfony/Bridge/PhpUnit; fi
|
- if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit; fi
|
||||||
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
|
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
|
||||||
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi
|
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi
|
||||||
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
|
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
|
||||||
|
@ -49,7 +49,7 @@ install:
|
|||||||
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.2.1/composer.phar)
|
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.2.1/composer.phar)
|
||||||
- php composer.phar self-update
|
- php composer.phar self-update
|
||||||
- copy /Y .composer\* %APPDATA%\Composer\
|
- copy /Y .composer\* %APPDATA%\Composer\
|
||||||
- php .github/build-packages.php "HEAD^" %APPVEYOR_REPO_BRANCH% src\Symfony\Bridge\PhpUnit
|
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
|
||||||
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
|
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
|
||||||
- php composer.phar update --no-progress --ansi
|
- php composer.phar update --no-progress --ansi
|
||||||
- SET COMPOSER_ROOT_VERSION=
|
- SET COMPOSER_ROOT_VERSION=
|
||||||
|
@ -216,7 +216,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('0.0.0.0'),
|
array('0.0.0.0'),
|
||||||
array('224.0.0.1'),
|
array('240.0.0.1'),
|
||||||
array('255.255.255.255'),
|
array('255.255.255.255'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user