minor #40002 Replace "branch-version" by "versions" in composer.json (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
Replace "branch-version" by "versions" in composer.json
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Accommodates for https://github.com/composer/composer/pull/9637
Commits
-------
b40e71f096
Replace "branch-version" by "versions" in composer.json
This commit is contained in:
commit
f667d792df
@ -50,9 +50,10 @@ install:
|
||||
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex
|
||||
- git config --global user.email ""
|
||||
- git config --global user.name "Symfony"
|
||||
- FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep branch-version composer.json | grep -o '[0-9.x]*'"`) DO (SET SYMFONY_VERSION=%%F)
|
||||
- FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*'"`) DO (SET SYMFONY_VERSION=%%F)
|
||||
- php .github/build-packages.php HEAD^ %SYMFONY_VERSION% src\Symfony\Bridge\PhpUnit
|
||||
- SET "SYMFONY_REQUIRE=>=%SYMFONY_VERSION%"
|
||||
- SET COMPOSER_ROOT_VERSION=%SYMFONY_VERSION%.x-dev
|
||||
- php composer.phar update --no-progress --ansi
|
||||
- php phpunit install
|
||||
|
||||
|
2
.github/build-packages.php
vendored
2
.github/build-packages.php
vendored
@ -46,7 +46,7 @@ foreach ($dirs as $k => $dir) {
|
||||
passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
|
||||
}
|
||||
|
||||
$package->version = (isset($package->extra->{'branch-version'}) ? $package->extra->{'branch-version'} : $version).'.x-dev';
|
||||
$package->version = preg_replace('/(?:\.x)?-dev$/', '', $package->extra->{'branch-alias'}->{'dev-main'} ?? $version).'.x-dev';
|
||||
$package->dist['type'] = 'tar';
|
||||
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
|
||||
|
||||
|
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@ -80,8 +80,9 @@ jobs:
|
||||
- name: Configure composer
|
||||
run: |
|
||||
COMPOSER_HOME="$(composer config home)"
|
||||
composer self-update
|
||||
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
|
||||
echo "COMPOSER_ROOT_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
|
||||
echo "COMPOSER_ROOT_VERSION=$(grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
|
||||
|
||||
- name: Determine composer cache directory
|
||||
id: composer-cache
|
||||
|
@ -14,6 +14,7 @@ addons:
|
||||
|
||||
env:
|
||||
global:
|
||||
- SYMFONY_VERSION=4.4
|
||||
- MIN_PHP=7.1.3
|
||||
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php
|
||||
- SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
|
||||
@ -170,8 +171,8 @@ install:
|
||||
git fetch --depth=2 origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
|
||||
git rm -rq src/Symfony/Bridge/PhpUnit
|
||||
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
|
||||
export SYMFONY_VERSION=$(curl -s https://api.github.com/repos/symfony/symfony/pulls/$SYMFONY_PHPUNIT_BRIDGE_PR | jq -r .base.ref)
|
||||
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json
|
||||
SYMFONY_PHPUNIT_BRIDGE_REF=$(curl -s https://api.github.com/repos/symfony/symfony/pulls/$SYMFONY_PHPUNIT_BRIDGE_PR | jq -r .base.ref)
|
||||
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_PHPUNIT_BRIDGE_REF'.x@dev"/' composer.json
|
||||
rm -rf .phpunit
|
||||
fi
|
||||
|
||||
@ -180,7 +181,6 @@ install:
|
||||
git config --global user.email ""
|
||||
git config --global user.name "Symfony"
|
||||
|
||||
export SYMFONY_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*')
|
||||
SYMFONY_VERSIONS=$(git ls-remote -q --heads);
|
||||
|
||||
if [[ ! $deps ]]; then
|
||||
@ -227,6 +227,7 @@ install:
|
||||
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
|
||||
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
|
||||
|
||||
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
||||
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
|
||||
|
||||
- |
|
||||
@ -265,6 +266,7 @@ install:
|
||||
export FLIP='^'
|
||||
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
|
||||
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
|
||||
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
||||
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
|
||||
git fetch --depth=2 origin $SYMFONY_VERSION
|
||||
git checkout -m FETCH_HEAD
|
||||
|
@ -156,11 +156,13 @@
|
||||
"repositories": [
|
||||
{
|
||||
"type": "path",
|
||||
"url": "src/Symfony/Contracts"
|
||||
"url": "src/Symfony/Contracts",
|
||||
"options": {
|
||||
"versions": {
|
||||
"symfony/contracts": "1.1.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-version": "4.4"
|
||||
}
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
@ -33,7 +33,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
@ -33,7 +33,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
@ -33,7 +33,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
@ -46,7 +46,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-version": "1.1",
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
}
|
||||
|
Reference in New Issue
Block a user