Skip to content

Commit 7f0015e

Browse files
Merge branch '5.1' into 5.x
* 5.1: Remove "version" from composer.json files, use "branch-version" instead [String] fix "is too large" ValueError on PHP 8
2 parents dc6e8d0 + e95f87d commit 7f0015e

File tree

90 files changed

+273
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+273
-104
lines changed

.appveyor.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ install:
4646
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar)
4747
- php composer.phar self-update
4848
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
49-
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
49+
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex
5050
- git config --global user.email ""
5151
- git config --global user.name "Symfony"
52-
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit src\Symfony\Contracts
52+
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
53+
- SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev
5354
- php composer.phar update --no-progress --no-suggest --ansi
5455
- php phpunit install
5556

.github/build-packages.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@
5050
passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
5151
}
5252

53-
if (!isset($package->version)) {
54-
echo "Missing \"version\" in composer.json.\n";
53+
if (!isset($package->extra->{'branch-version'})) {
54+
echo "Missing \"branch-version\" in composer.json's \"extra\".\n";
5555
exit(1);
5656
}
57+
$package->version = substr_replace($package->extra->{'branch-version'}, '.x-dev', -4);
5758
$package->dist['type'] = 'tar';
5859
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
5960

@@ -62,8 +63,6 @@
6263
$versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"%s":%s}}}', $package->name, $package->version, file_get_contents($dir.'/composer.json'));
6364
$versions = json_decode($versions)->packages->{$package->name};
6465

65-
unset($versions->{'dev-master'});
66-
6766
foreach ($versions as $v => $package) {
6867
$packages[$package->name] += array($v => $package);
6968
}

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ install:
209209
git fetch --depth=2 origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
210210
git rm -rq src/Symfony/Bridge/PhpUnit
211211
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
212-
export SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"version": *"[1-9]' | grep -o '[0-9.]*[0-9]')
212+
export SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"branch-version": *"[1-9]' | grep -o '[0-9.]*')
213213
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json
214214
rm -rf .phpunit
215215
fi
@@ -235,19 +235,19 @@ install:
235235
fi
236236
237237
- |
238-
# For the .x branch, when deps=high, the version before .x is checked out and tested with the locally patched components
238+
# For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
239239
if [[ $deps = high && $TRAVIS_BRANCH = *.x ]]; then
240240
export FLIP='🙃'
241241
export SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
242242
git fetch --depth=2 origin $SYMFONY_VERSION &&
243243
git checkout -m FETCH_HEAD &&
244244
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
245245
else
246-
export SYMFONY_VERSION=$(cat composer.json | grep '^ *"version". *"[1-9]' | grep -o '[0-9.]*[0-9]')
246+
export SYMFONY_VERSION=$(cat composer.json | grep '^ *"branch-version": *"[1-9]' | grep -o '[0-9.]*')
247247
fi
248248
249249
- |
250-
# Skip the phpunit-bridge on bugfix-only branches when $deps is empty
250+
# Skip the phpunit-bridge on bugfix-branches when $deps is empty
251251
if [[ ! $deps && ! $TRAVIS_BRANCH = *.x ]]; then
252252
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
253253
fi
@@ -266,11 +266,11 @@ install:
266266
else
267267
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
268268
fi
269-
composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
269+
composer global require --no-progress --no-scripts --no-plugins symfony/flex
270270
271271
- |
272272
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
273-
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"version". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
273+
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"branch-version": *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
274274
275275
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
276276
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,7 @@
175175
}
176176
],
177177
"minimum-stability": "dev",
178-
"version": "5.2.x-dev"
178+
"extra": {
179+
"branch-version": "5.2-dev"
180+
}
179181
}

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@
7878
]
7979
},
8080
"minimum-stability": "dev",
81-
"version": "5.2.x-dev"
81+
"extra": {
82+
"branch-version": "5.2-dev"
83+
}
8284
}

src/Symfony/Bridge/Monolog/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,7 @@
4646
]
4747
},
4848
"minimum-stability": "dev",
49-
"version": "5.2.x-dev"
49+
"extra": {
50+
"branch-version": "5.2-dev"
51+
}
5052
}

src/Symfony/Bridge/PhpUnit/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
],
4242
"minimum-stability": "dev",
4343
"extra": {
44+
"branch-version": "5.2-dev",
4445
"thanks": {
4546
"name": "phpunit/phpunit",
4647
"url": "https://github.com/sebastianbergmann/phpunit"
4748
}
48-
},
49-
"version": "5.2.x-dev"
49+
}
5050
}

src/Symfony/Bridge/ProxyManager/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@
3333
]
3434
},
3535
"minimum-stability": "dev",
36-
"version": "5.2.x-dev"
36+
"extra": {
37+
"branch-version": "5.2-dev"
38+
}
3739
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,7 @@
8181
]
8282
},
8383
"minimum-stability": "dev",
84-
"version": "5.2.x-dev"
84+
"extra": {
85+
"branch-version": "5.2-dev"
86+
}
8587
}

src/Symfony/Bundle/DebugBundle/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,7 @@
4242
]
4343
},
4444
"minimum-stability": "dev",
45-
"version": "5.2.x-dev"
45+
"extra": {
46+
"branch-version": "5.2-dev"
47+
}
4648
}

0 commit comments

Comments
 (0)