diff --git a/support/build/README.md b/support/build/README.md index c96f9459f..635fbebf1 100644 --- a/support/build/README.md +++ b/support/build/README.md @@ -252,9 +252,9 @@ A manifest looks roughly like this (example is for `ext-apcu/5.1.17` for PHP 7.3 *Example: `curl -s https://lang-php.s3.amazonaws.com/dist-heroku-18-stable/packages.json | jq '[ .packages[][] | select(.type == "heroku-sys-php-extension" and .name == "heroku-sys/ext-apcu") ] | .[0]'`* -Package `name`s must be prefixed with "`heroku-sys/`". Possible `type`s are `heroku-sys-php`, `heroku-sys-hhvm`, `heroku-sys-php-extension` or `heroku-sys-webserver`. The `dist` type must be "`heroku-sys-tar`". If the package is a `heroku-sys-php-extension`, it's important to specify a `conflict` with "`heroku-sys/hhvm`". +Package `name`s must be prefixed with "`heroku-sys/`". Possible `type`s are `heroku-sys-php`, `heroku-sys-hhvm`, `heroku-sys-library`, `heroku-sys-php-extension`, `heroku-sys-program` or `heroku-sys-webserver`. The `dist` type must be "`heroku-sys-tar`". If the package is a `heroku-sys-php-extension`, it's important to specify a `conflict` with "`heroku-sys/hhvm`". -The special package type `heroku-sys-php-package` is used for generic packages that should not be available to applications during app deploys (such as vendored libraries used to build PHP or an extension). +The special package type `heroku-sys-package` is used for internal packages used for bootstrapping (e.g. a minimal PHP build). The `require`d package `heroku/installer-plugin` will be available during install. Package `heroku-sys/heroku` is a virtual package `provide`d by the platform `composer.json` generated in `bin/compile` and has the right stack version (either "`16`" or "`18`"); the selector for `heroku-sys/php` ensures that the package only applies to PHP 7.0.x. @@ -339,6 +339,7 @@ The `type` of a package must be one of the following: - 'heroku-sys-library', for a system library - 'heroku-sys-php', for a PHP runtime - 'heroku-sys-php-extension', for a PHP extension +- 'heroku-sys-program', for executable utilities etc - 'heroku-sys-webserver', for a web server #### Dist Type and URL diff --git a/support/build/_util/include/manifest.py b/support/build/_util/include/manifest.py index 42cf7f34a..8ee6c341e 100644 --- a/support/build/_util/include/manifest.py +++ b/support/build/_util/include/manifest.py @@ -7,6 +7,8 @@ require["heroku/installer-plugin"] = "^1.2.0" if sys.argv[1] == 'heroku-sys-library': require["heroku/installer-plugin"] = "^1.3.0" +elif sys.argv[1] == 'heroku-sys-program': + require["heroku/installer-plugin"] = "^1.4.0" manifest = { "type": sys.argv[1], diff --git a/support/installer/composer.json b/support/installer/composer.json index 646713608..178284182 100644 --- a/support/installer/composer.json +++ b/support/installer/composer.json @@ -1,7 +1,7 @@ { "type": "composer-plugin", "name": "heroku/installer-plugin", - "version": "1.3.0", + "version": "1.4.0", "autoload": { "psr-4": { "Heroku\\Buildpack\\PHP\\": "src/" diff --git a/support/installer/src/ComposerInstaller.php b/support/installer/src/ComposerInstaller.php index e668abf13..f95c421b9 100644 --- a/support/installer/src/ComposerInstaller.php +++ b/support/installer/src/ComposerInstaller.php @@ -22,6 +22,7 @@ public function supports($packageType) 'heroku-sys-library', 'heroku-sys-php', 'heroku-sys-php-extension', + 'heroku-sys-program', 'heroku-sys-webserver', ]); } diff --git a/support/installer/src/ComposerInstallerPlugin.php b/support/installer/src/ComposerInstallerPlugin.php index c94faeba7..2e35f1a16 100644 --- a/support/installer/src/ComposerInstallerPlugin.php +++ b/support/installer/src/ComposerInstallerPlugin.php @@ -57,7 +57,7 @@ public static function getSubscribedEvents() public function onPostPackageInstall(PackageEvent $event) { - if(!in_array($event->getOperation()->getPackage()->getType(), ['heroku-sys-php', 'heroku-sys-hhvm', 'heroku-sys-php-extension', 'heroku-sys-hhvm-extension', 'heroku-sys-webserver', 'heroku-sys-library'])) return; + if(!in_array($event->getOperation()->getPackage()->getType(), ['heroku-sys-php', 'heroku-sys-hhvm', 'heroku-sys-php-extension', 'heroku-sys-hhvm-extension', 'heroku-sys-webserver', 'heroku-sys-library', 'heroku-sys-program'])) return; $this->initAllPlatformRequirements($event->getOperations());