* 3.0: [travis] Fix deps=low/high builds fixed CS skip test with current phpunit bridge Fix for #19183 to add support for new PHP MongoDB extension in sessions. [Console] Fix for block() padding formatting after #19189 [Security][Guard] check if session exist before using it bumped Symfony version to 3.0.9 updated VERSION for 3.0.8 updated CHANGELOG for 3.0.8 bumped Symfony version to 2.8.9 updated VERSION for 2.8.8 updated CHANGELOG for 2.8.8 bumped Symfony version to 2.7.16 updated VERSION for 2.7.15 update CONTRIBUTORS for 2.7.15 updated CHANGELOG for 2.7.15 Fix some lowest deps Fixed typos in the expectedException annotations Conflicts: src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Security/Guard/Authenticator/AbstractFormLoginAuthenticator.php
55 lines
1.7 KiB
PHP
55 lines
1.7 KiB
PHP
<?php
|
|
|
|
if (4 > $_SERVER['argc']) {
|
|
echo "Usage: branch version dir1 dir2 ... dirN\n";
|
|
exit(1);
|
|
}
|
|
chdir(dirname(__DIR__));
|
|
|
|
$dirs = $_SERVER['argv'];
|
|
array_shift($dirs);
|
|
$branch = array_shift($dirs);
|
|
$version = array_shift($dirs);
|
|
|
|
$packages = array();
|
|
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
|
|
|
|
foreach ($dirs as $dir) {
|
|
if (!system("git diff --name-only $branch...HEAD -- $dir", $exitStatus)) {
|
|
if ($exitStatus) {
|
|
exit($exitStatus);
|
|
}
|
|
continue;
|
|
}
|
|
echo "$dir\n";
|
|
|
|
$json = ltrim(file_get_contents($dir.'/composer.json'));
|
|
if (null === $package = json_decode($json)) {
|
|
passthru("composer validate $dir/composer.json");
|
|
exit(1);
|
|
}
|
|
|
|
$package->repositories = array(array(
|
|
'type' => 'composer',
|
|
'url' => 'file://'.dirname(__DIR__).'/',
|
|
));
|
|
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
|
|
file_put_contents($dir.'/composer.json', $json);
|
|
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
|
|
|
|
$package->version = 'master' !== $version ? $version.'.999' : 'dev-master';
|
|
$package->dist['type'] = 'tar';
|
|
$package->dist['url'] = 'file://'.dirname(__DIR__)."/$dir/package.tar";
|
|
|
|
$packages[$package->name][$package->version] = $package;
|
|
|
|
$versions = @file_get_contents('https://packagist.org/packages/'.$package->name.'.json') ?: '{"package":{"versions":[]}}';
|
|
$versions = json_decode($versions);
|
|
|
|
foreach ($versions->package->versions as $v => $package) {
|
|
$packages[$package->name] += array($v => $package);
|
|
}
|
|
}
|
|
|
|
file_put_contents('packages.json', json_encode(compact('packages'), $flags));
|