Skip to content

Commit

Permalink
Merge pull request #461 from heroku/develop
Browse files Browse the repository at this point in the history
v189
  • Loading branch information
dzuelke authored Feb 5, 2021
2 parents bb6aaa8 + ad134a7 commit 967a2b9
Show file tree
Hide file tree
Showing 44 changed files with 70 additions and 7 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# heroku-buildpack-php CHANGELOG

## v189 (2021-02-??)
## v189 (2021-02-05)

### ADD

- ext-rdkafka/5.0.0 [David Zuelke]
- PHP/7.3.27 [David Zuelke]
- PHP/7.4.15 [David Zuelke]
- PHP/8.0.2 [David Zuelke]
- ext-ev/1.1.1 [David Zuelke]
- ext-redis/5.3.3 [David Zuelke]
- ext-blackfire/1.49.1 [David Zuelke]
- ext-newrelic/9.16.0.295 [David Zuelke]

### CHG

- Drop support for cedar-14 [David Zuelke]
- Drop support for HHVM [David Zuelke]
- Drop support for PHP 5.5 [David Zuelke]
- Use PHP 7.4 for bootstrapping [David Zuelke]
- librdkafka/1.6.0 [David Zuelke]
- Composer/1.10.20 [David Zuelke]
- Composer/2.0.9 [David Zuelke]

## v188 (2021-01-08)

Expand Down
4 changes: 2 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ fi
mkdir -p $build_dir/.heroku/php-min
ln -s $build_dir/.heroku/php-min /app/.heroku/php-min

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

curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/composer.tar.gz "${s3_url}composer-1.10.19.tar.gz" || {
curl_retry_on_18 --fail --silent --location -o $build_dir/.heroku/composer.tar.gz "${s3_url}composer-1.10.20.tar.gz" || {
mcount "failures.bootstrap.download.composer"
error <<-EOF
Failed to download Composer for bootstrapping!
Expand Down
2 changes: 1 addition & 1 deletion bin/util/platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function mkmetas($package, array &$metapaks, &$have_runtime_req = false) {
$require["heroku-sys/nginx"] = "^1.8.0";

preg_match("#^([^-]+)(?:-([0-9]+))?\$#", $STACK, $stack);
$provide = ["heroku-sys/".$stack[1] => (isset($stack[2])?$stack[2]:"1").gmdate(".Y.m.d")]; # cedar: 14.2016.02.16 etc
$provide = ["heroku-sys/".$stack[1] => (isset($stack[2])?$stack[2]:"1").gmdate(".Y.m.d")]; # heroku: 20.2021.02.04 etc
$json = [
"config" => ["cache-files-ttl" => 0, "discard-changes" => true],
"minimum-stability" => isset($lock["minimum-stability"]) ? $lock["minimum-stability"] : "stable",
Expand Down
4 changes: 2 additions & 2 deletions support/build/_util/mkrepo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ if $upload || [[ -t 1 ]]; then
exec 3>&1 1>packages.json
fi

# 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.
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
# 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'")
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

# restore stdout
# note that 'exec >$(tty)' does not work as FD 1 may have been a pipe originally and not a tty
Expand Down
16 changes: 15 additions & 1 deletion support/build/composer
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,21 @@ export PATH="$HOME/.heroku/php/bin:$PATH"
export PATH="$PATH:$(realpath "$(PHP_INI_SCAN_DIR= composer config --no-plugins bin-dir)")"
EOF

MANIFEST_REQUIRE="${MANIFEST_REQUIRE:-"{\"heroku-sys/php\":\"*\"}"}"
# the || true (needs to be there, not before the <<-'HEREDOC') prevents 'set -e' induced termination from the 'read' encountering EOF
read -r -d '' require <<-'EOF' || true
{
"heroku-sys/php": ">=5.3.2",
"heroku-sys/ext-filter": "*",
"heroku-sys/ext-hash": "*",
"heroku-sys/ext-iconv": "*",
"heroku-sys/ext-json": "*",
"heroku-sys/ext-phar": "*",
"heroku-sys/ext-openssl": "*",
"heroku-sys/ext-zlib": "*"
}
EOF

MANIFEST_REQUIRE="${MANIFEST_REQUIRE:-"$require"}"
MANIFEST_CONFLICT="${MANIFEST_CONFLICT:-"{}"}"
MANIFEST_REPLACE="${MANIFEST_REPLACE:-"{}"}"
MANIFEST_PROVIDE="${MANIFEST_PROVIDE:-"{\"heroku-sys/composer-plugin-api\":\"${plugin_api_version}\"}"}"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-7.0.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-7.1.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-7.2.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-7.3.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-7.4.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
5 changes: 5 additions & 0 deletions support/build/extensions/no-debug-non-zts-20200930/ev-1.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.0.*

source $(dirname $0)/../no-debug-non-zts-20131226/ev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/php
# Build Deps: php-8.0.*, libraries/librdkafka-1.*

source $(dirname $0)/../no-debug-non-zts-20131226/rdkafka
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 967a2b9

Please sign in to comment.