Skip to content

Commit bb6aaa8

Browse files
authored
Merge pull request #460 from heroku/good-riddance-cedar-14
Remove cedar-14 and related logic
2 parents 9e577b8 + 0b6a2b0 commit bb6aaa8

File tree

202 files changed

+377
-1886
lines changed

Some content is hidden

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

202 files changed

+377
-1886
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# heroku-buildpack-php CHANGELOG
22

3+
## v189 (2021-02-??)
4+
5+
### CHG
6+
7+
- Drop support for cedar-14 [David Zuelke]
8+
- Drop support for HHVM [David Zuelke]
9+
- Drop support for PHP 5.5 [David Zuelke]
10+
- Use PHP 7.4 for bootstrapping [David Zuelke]
11+
312
## v188 (2021-01-08)
413

514
### ADD

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
This is the official [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for PHP applications.
77

8-
It uses Composer for dependency management, supports PHP or HHVM (experimental) as runtimes, and offers a choice of Apache2 or Nginx web servers.
8+
It uses Composer for dependency management, supports all recent versions of PHP as runtimes, and offers a choice of Apache2 or Nginx web servers.
99

1010
## Usage
1111

@@ -27,11 +27,11 @@ Please refer to [Dev Center](https://devcenter.heroku.com/categories/php) for fu
2727

2828
## Custom Platform Repositories
2929

30-
The buildpack uses Composer repositories to resolve platform (`php`, `hhvm`, `ext-something`, ...) dependencies.
30+
The buildpack uses Composer repositories to resolve platform (`php`, `ext-something`, ...) dependencies.
3131

3232
To use a custom Composer repository with additional or different platform packages, add the URL to its `packages.json` to the `HEROKU_PHP_PLATFORM_REPOSITORIES` config var:
3333

34-
$ heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://mybucket.s3.amazonaws.com/cedar-14/packages.json"
34+
$ heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://mybucket.s3.amazonaws.com/heroku-18/packages.json"
3535

3636
To allow the use of multiple custom repositories, the config var may hold a list of multiple repository URLs, separated by a space character, in ascending order of precedence.
3737

bin/compile

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -eu
99
# move hidden files too, just in case
1010
shopt -s dotglob
1111

12-
STACK=${STACK:-cedar-14} # Anvil has none
12+
STACK=${STACK:-heroku-18} # Anvil has none
1313
build_dir=$1
1414
cache_dir=$2/php
1515
mkdir -p "$cache_dir"
@@ -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.3.26.tar.gz" || {
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" || {
222222
mcount "failures.bootstrap.download.php-min"
223223
error <<-EOF
224224
Failed to download minimal PHP for bootstrapping!
@@ -335,8 +335,8 @@ composer validate --no-plugins --no-check-publish --no-check-all --quiet "$COMPO
335335

336336
status "Installing platform packages..."
337337

338-
if [[ $STACK == "cedar-14" || $STACK == "heroku-16" ]]; then
339-
HEROKU_PHP_DEFAULT_RUNTIME_VERSION="^5.5.17"
338+
if [[ $STACK == "heroku-16" ]]; then
339+
HEROKU_PHP_DEFAULT_RUNTIME_VERSION="^5.6.0"
340340
elif [[ $STACK == "heroku-18" ]]; then
341341
HEROKU_PHP_DEFAULT_RUNTIME_VERSION="^7.0.0"
342342
else
@@ -446,7 +446,6 @@ else
446446
For reference, the following runtimes are currently available:
447447
448448
PHP: $(composer show -d "$build_dir/.heroku/php" --available heroku-sys/php 2>&1 | sed -n 's/^versions : //p' | fold -s -w 58 || true)
449-
HHVM: $(composer show -d "$build_dir/.heroku/php" --available heroku-sys/hhvm 2>&1 | sed -n 's/^versions : //p' | fold -s -w 58 || true)
450449
451450
Please verify that all requirements for runtime versions in
452451
'$COMPOSER_LOCK' are compatible with the list above, and ensure
@@ -461,14 +460,6 @@ else
461460
EOF
462461
fi
463462

464-
if composer show -d "$build_dir/.heroku/php" --installed --quiet heroku-sys/php 2>/dev/null; then
465-
engine="php"
466-
engine_r="php -r"
467-
elif composer show -d "$build_dir/.heroku/php" --installed --quiet heroku-sys/hhvm 2>/dev/null; then
468-
engine="hhvm"
469-
engine_r="hhvm --php -r"
470-
fi
471-
472463
# log number of installed platform packages
473464
mmeasure "platform.count" $(composer show -d "$build_dir/.heroku/php" --installed "heroku-sys/*" 2> /dev/null | wc -l)
474465

@@ -481,13 +472,6 @@ rm -rf /app/.heroku/php-min $build_dir/.heroku/php-min
481472
# unset composer function that used php-min for invocation
482473
unset -f composer
483474

484-
if [[ "$engine" == "hhvm" ]]; then
485-
composer() {
486-
$engine $(which composer) "$@"
487-
}
488-
export -f composer
489-
fi
490-
491475
# export our "do not auto.start APM extensions" magic INI directory to PHP_INI_SCAN_DIR for ourself and for later buildpacks (but not for runtime)
492476
export_env_dir "$env_dir" '^PHP_INI_SCAN_DIR$'
493477
echo "export PHP_INI_SCAN_DIR=\${PHP_INI_SCAN_DIR-}:$bp_dir/conf/php/apm-nostart-overrides/" >> $bp_dir/export
@@ -498,9 +482,9 @@ source $bp_dir/export
498482
# from here onwards we're using the composer we installed via platform install with the PHP runtime that we installed via platform install
499483

500484
# log runtime version
501-
mcount "platform.packages.php.$($engine_r "echo ${engine^^}_VERSION;")"
485+
mcount "platform.packages.php.$(php -r "echo PHP_VERSION;")"
502486

503-
if eoldate=$($engine $bp_dir/bin/util/eol.php); then
487+
if eoldate=$(php $bp_dir/bin/util/eol.php); then
504488
:
505489
else
506490
code=$?
@@ -723,8 +707,8 @@ ln -fs $relbins .
723707
cd $build_dir
724708

725709
if [[ ! -f "Procfile" ]]; then
726-
echo "web: heroku-$engine-apache2" > Procfile
727-
notice_inline "No Procfile, using 'web: heroku-$engine-apache2'."
710+
echo "web: heroku-php-apache2" > Procfile
711+
notice_inline "No Procfile, using 'web: heroku-php-apache2'."
728712
fi
729713

730714
# write empty WEB_CONCURRENCY.sh to overwrite the defaults logic from a prior buildpack, e.g. Node (all buildpacks use the same filename to allow this)

0 commit comments

Comments
 (0)