Skip to content

Commit 967a2b9

Browse files
authored
Merge pull request #461 from heroku/develop
v189
2 parents bb6aaa8 + ad134a7 commit 967a2b9

Some content is hidden

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

44 files changed

+70
-7
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion

bin/compile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ fi
218218
mkdir -p $build_dir/.heroku/php-min
219219
ln -s $build_dir/.heroku/php-min /app/.heroku/php-min
220220

221-
curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/php-min.tar.gz "${s3_url}php-min-7.4.14.tar.gz" || {
221+
curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/php-min.tar.gz "${s3_url}php-min-7.4.15.tar.gz" || {
222222
mcount "failures.bootstrap.download.php-min"
223223
error <<-EOF
224224
Failed to download minimal PHP for bootstrapping!
@@ -231,7 +231,7 @@ curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/php-min.tar.gz
231231
tar xzf $build_dir/.heroku/php-min.tar.gz -C $build_dir/.heroku/php-min
232232
rm $build_dir/.heroku/php-min.tar.gz
233233

234-
curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/composer.tar.gz "${s3_url}composer-1.10.19.tar.gz" || {
234+
curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/composer.tar.gz "${s3_url}composer-1.10.20.tar.gz" || {
235235
mcount "failures.bootstrap.download.composer"
236236
error <<-EOF
237237
Failed to download Composer for bootstrapping!

bin/util/platform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function mkmetas($package, array &$metapaks, &$have_runtime_req = false) {
168168
$require["heroku-sys/nginx"] = "^1.8.0";
169169

170170
preg_match("#^([^-]+)(?:-([0-9]+))?\$#", $STACK, $stack);
171-
$provide = ["heroku-sys/".$stack[1] => (isset($stack[2])?$stack[2]:"1").gmdate(".Y.m.d")]; # cedar: 14.2016.02.16 etc
171+
$provide = ["heroku-sys/".$stack[1] => (isset($stack[2])?$stack[2]:"1").gmdate(".Y.m.d")]; # heroku: 20.2021.02.04 etc
172172
$json = [
173173
"config" => ["cache-files-ttl" => 0, "discard-changes" => true],
174174
"minimum-stability" => isset($lock["minimum-stability"]) ? $lock["minimum-stability"] : "stable",

support/build/_util/mkrepo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ if $upload || [[ -t 1 ]]; then
8585
exec 3>&1 1>packages.json
8686
fi
8787

88-
# sort so that packages with the same name and version (e.g. ext-memcached 2.2.0) show up with their php requirement in descending order - otherwise a Composer limitation means that a simple "ext-memcached: * + php: ^7.0.0" request would install 7.0.latest and not 7.4.latest, as it finds the 7.0.* requirement extension first and sticks to that instead of 7.4. For packages with identical names and versions (but different e.g. requirements), Composer basically treats them as equal and picks as a winner whatever it finds first. The requirements have to be written like "x.y.*" for this to work of course.
89-
python -c 'import sys, json; from distutils import version; json.dump({"packages": [ sorted([json.load(open(item)) for item in sys.argv[1:] if json.load(open(item)).get("type", "") != "heroku-sys-package"], key=lambda package: version.LooseVersion(package.get("require", {}).get("heroku-sys/php", "0.0.0")), reverse=True) ] }, sys.stdout, sort_keys=True)' $manifests
88+
# sort so that packages with the same name and version (e.g. ext-memcached 2.2.0) show up with their php requirement in descending order - otherwise a Composer limitation means that a simple "ext-memcached: * + php: ^7.0.0" request would install 7.0.latest and not 7.4.latest, as it finds the 7.0.* requirement extension first and sticks to that instead of 7.4. For packages with identical names and versions (but different e.g. requirements), Composer basically treats them as equal and picks as a winner whatever it finds first. The requirements have to be written like "x.y.*" for this to work of course (we replace "*", "<=" and so forth with "0", as that's fine for the purpose of just sorting - otherwise, a comparison of e.g. "^7.0.0" and "7.0.*" would cause "TypeError: '<' not supported between instances of 'str' and 'int'")
89+
python -c 'import sys, re, json; from distutils import version; json.dump({"packages": [ sorted([json.load(open(item)) for item in sys.argv[1:] if json.load(open(item)).get("type", "") != "heroku-sys-package"], key=lambda package: version.LooseVersion(re.sub("[<>=*~^]", "0", package.get("require", {}).get("heroku-sys/php", "0.0.0"))), reverse=True) ] }, sys.stdout, sort_keys=True)' $manifests
9090

9191
# restore stdout
9292
# note that 'exec >$(tty)' does not work as FD 1 may have been a pipe originally and not a tty

support/build/composer

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,21 @@ export PATH="$HOME/.heroku/php/bin:$PATH"
7777
export PATH="$PATH:$(realpath "$(PHP_INI_SCAN_DIR= composer config --no-plugins bin-dir)")"
7878
EOF
7979

80-
MANIFEST_REQUIRE="${MANIFEST_REQUIRE:-"{\"heroku-sys/php\":\"*\"}"}"
80+
# the || true (needs to be there, not before the <<-'HEREDOC') prevents 'set -e' induced termination from the 'read' encountering EOF
81+
read -r -d '' require <<-'EOF' || true
82+
{
83+
"heroku-sys/php": ">=5.3.2",
84+
"heroku-sys/ext-filter": "*",
85+
"heroku-sys/ext-hash": "*",
86+
"heroku-sys/ext-iconv": "*",
87+
"heroku-sys/ext-json": "*",
88+
"heroku-sys/ext-phar": "*",
89+
"heroku-sys/ext-openssl": "*",
90+
"heroku-sys/ext-zlib": "*"
91+
}
92+
EOF
93+
94+
MANIFEST_REQUIRE="${MANIFEST_REQUIRE:-"$require"}"
8195
MANIFEST_CONFLICT="${MANIFEST_CONFLICT:-"{}"}"
8296
MANIFEST_REPLACE="${MANIFEST_REPLACE:-"{}"}"
8397
MANIFEST_PROVIDE="${MANIFEST_PROVIDE:-"{\"heroku-sys/composer-plugin-api\":\"${plugin_api_version}\"}"}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)