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

Skip to content

Commit f667d79

Browse files
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 composer/composer#9637 Commits ------- b40e71f Replace "branch-version" by "versions" in composer.json
2 parents aeb15a1 + b40e71f commit f667d79

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ install:
5050
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex
5151
- git config --global user.email ""
5252
- git config --global user.name "Symfony"
53-
- FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep branch-version composer.json | grep -o '[0-9.x]*'"`) DO (SET SYMFONY_VERSION=%%F)
53+
- FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*'"`) DO (SET SYMFONY_VERSION=%%F)
5454
- php .github/build-packages.php HEAD^ %SYMFONY_VERSION% src\Symfony\Bridge\PhpUnit
5555
- SET "SYMFONY_REQUIRE=>=%SYMFONY_VERSION%"
56+
- SET COMPOSER_ROOT_VERSION=%SYMFONY_VERSION%.x-dev
5657
- php composer.phar update --no-progress --ansi
5758
- php phpunit install
5859

.github/build-packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
4747
}
4848

49-
$package->version = (isset($package->extra->{'branch-version'}) ? $package->extra->{'branch-version'} : $version).'.x-dev';
49+
$package->version = preg_replace('/(?:\.x)?-dev$/', '', $package->extra->{'branch-alias'}->{'dev-main'} ?? $version).'.x-dev';
5050
$package->dist['type'] = 'tar';
5151
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
5252

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
- name: Configure composer
8181
run: |
8282
COMPOSER_HOME="$(composer config home)"
83+
composer self-update
8384
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
84-
echo "COMPOSER_ROOT_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
85+
echo "COMPOSER_ROOT_VERSION=$(grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
8586
8687
- name: Determine composer cache directory
8788
id: composer-cache

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ addons:
1414

1515
env:
1616
global:
17+
- SYMFONY_VERSION=4.4
1718
- MIN_PHP=7.1.3
1819
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php
1920
- SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
@@ -170,8 +171,8 @@ install:
170171
git fetch --depth=2 origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
171172
git rm -rq src/Symfony/Bridge/PhpUnit
172173
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
173-
export SYMFONY_VERSION=$(curl -s https://api.github.com/repos/symfony/symfony/pulls/$SYMFONY_PHPUNIT_BRIDGE_PR | jq -r .base.ref)
174-
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json
174+
SYMFONY_PHPUNIT_BRIDGE_REF=$(curl -s https://api.github.com/repos/symfony/symfony/pulls/$SYMFONY_PHPUNIT_BRIDGE_PR | jq -r .base.ref)
175+
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_PHPUNIT_BRIDGE_REF'.x@dev"/' composer.json
175176
rm -rf .phpunit
176177
fi
177178
@@ -180,7 +181,6 @@ install:
180181
git config --global user.email ""
181182
git config --global user.name "Symfony"
182183
183-
export SYMFONY_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*')
184184
SYMFONY_VERSIONS=$(git ls-remote -q --heads);
185185
186186
if [[ ! $deps ]]; then
@@ -227,6 +227,7 @@ install:
227227
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
228228
[[ $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
229229
230+
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
230231
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
231232
232233
- |
@@ -265,6 +266,7 @@ install:
265266
export FLIP='^'
266267
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
267268
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
269+
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
268270
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
269271
git fetch --depth=2 origin $SYMFONY_VERSION
270272
git checkout -m FETCH_HEAD

composer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,13 @@
156156
"repositories": [
157157
{
158158
"type": "path",
159-
"url": "src/Symfony/Contracts"
159+
"url": "src/Symfony/Contracts",
160+
"options": {
161+
"versions": {
162+
"symfony/contracts": "1.1.x-dev"
163+
}
164+
}
160165
}
161166
],
162-
"minimum-stability": "dev",
163-
"extra": {
164-
"branch-version": "4.4"
165-
}
167+
"minimum-stability": "dev"
166168
}

src/Symfony/Contracts/Cache/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
}
3434
},
3535
"extra": {
36-
"branch-version": "1.1",
3736
"branch-alias": {
3837
"dev-main": "1.1-dev"
3938
}

src/Symfony/Contracts/EventDispatcher/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
}
3434
},
3535
"extra": {
36-
"branch-version": "1.1",
3736
"branch-alias": {
3837
"dev-main": "1.1-dev"
3938
}

src/Symfony/Contracts/HttpClient/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
}
3333
},
3434
"extra": {
35-
"branch-version": "1.1",
3635
"branch-alias": {
3736
"dev-main": "1.1-dev"
3837
}

src/Symfony/Contracts/Service/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
}
3434
},
3535
"extra": {
36-
"branch-version": "1.1",
3736
"branch-alias": {
3837
"dev-main": "1.1-dev"
3938
}

src/Symfony/Contracts/Translation/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
}
3333
},
3434
"extra": {
35-
"branch-version": "1.1",
3635
"branch-alias": {
3736
"dev-main": "1.1-dev"
3837
}

src/Symfony/Contracts/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
},
4747
"minimum-stability": "dev",
4848
"extra": {
49-
"branch-version": "1.1",
5049
"branch-alias": {
5150
"dev-main": "1.1-dev"
5251
}

0 commit comments

Comments
 (0)