usabilla / php-docker-template

Docker images for PHP applications, CLI and FPM with shared socket
https://hub.docker.com/r/usabillabv/php
MIT License
177 stars 15 forks source link

Enforce versions (Semantically) in the ext helper scripts #145

Open renatomefi opened 4 years ago

renatomefi commented 4 years ago

The problem:

For instance in the example below:

https://github.com/usabilla/php-docker-template/blob/91c2a84abae82177ab78f6709c029080884eb684/src/php/utils/docker/docker-php-ext-rdkafka#L9

We see that we aren't locking the version pecl is installing, this can lead to bugs and major versions being upgraded without the user's consent.

A proposed solution would be:

The script should take an argument (.i.e.: $1 or ENV variable) which specifies the version to be installed.

A bonus is to be able to specify the version semantically, we have to check weather pecl supports it.

carusogabriel commented 4 years ago

@renatomefi Is this considered a BC? As by your proposal, we'd need to provide a rdkafka version?

renatomefi commented 4 years ago

Good point, we could start with a flexible version and later see how to break the compatibility