Skip to content

[custom-buildpack] Install extensions when required by Composer dependencies #30

@holtkamp

Description

@holtkamp

The idea of the custom buildpack is to allow users to determine what PHP version and extensions are installed. However, lets revert the part about the extensions. The purpose of Composer is to:

  • derive dependencies based on composer.json files
  • install derived dependencies

So, why won't we let Composer determine what extensions are required?

Lets take the following example:

    "require": {
        "php-64bit": "5.5.23",
        "beberlei/assert": "*"
}

The beberlei/assert package, depends on the ext-mbstring extension. I would expect that based on that dependency, the buildpack would install it. This way only the 'minimal' set of extensions would be installed, optimizing the resulting image.

Other examples to be used during testing:

Of course, for stuff like database connections that require extensions like MySQL and MongoDB, the author of the application would need to add the dependencies to its own composer.json file...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions