docker-php-extension-installer icon indicating copy to clipboard operation
docker-php-extension-installer copied to clipboard

Trying to install OCI8 with caret constraint, but latest stable version was not installed

Open llaville opened this issue 1 year ago • 3 comments

Version of install-php-extensions

2.6.1

Error description

Hello @mlocati

I've built a Docker image for PHP 8.4 in context of my project https://github.com/llaville/php-compatinfo-db

With constraint oci8-^3.3 I'm expected to have at least installed the latest stable version 3.4.0, but it was not the case. I've only the version 3.3.0

I'm expecting that the SemVer was applied (check with https://jubianchi.github.io/semver-check/#/constraint/^3.3) and caret constraint was followed, but it's not true !

If I remove the caret constraint (RUN install-php-extensions oci8), the PHP Extension installer download and install the version 3.4.0

What's wrong or it is a special semver implementation ?

https://github.com/mlocati/docker-php-extension-installer?tab=readme-ov-file#installing-specific-versions-of-an-extension

Docker image

php:8.4.0RC3-fpm

Minimal Dockerfile

# syntax=docker/dockerfile:1
FROM php:8.4.0RC3-fpm as base

FROM base as builder

ARG DOCKER_PHP_EXTENSION_INSTALLER=2.6.1
ADD https://github.com/mlocati/docker-php-extension-installer/releases/download/${DOCKER_PHP_EXTENSION_INSTALLER}/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions

FROM builder as build-version-8400
RUN install-php-extensions oci8-^3.3

llaville avatar Oct 29 '24 07:10 llaville

What's wrong or it is a special semver implementation ?

It's a special semver implementation (checking versions with a posix script is not that easy).

mlocati avatar Oct 29 '24 07:10 mlocati

It's a special semver implementation (checking versions with a posix script is not that easy).

OK I understand. So a note on README page will be greatly appreciated to avoid futur user confusion !

llaville avatar Oct 29 '24 07:10 llaville

So a note on README page will be greatly appreciated to avoid futur user confusion !

Of course I'm open to review pull requests

mlocati avatar Nov 28 '24 14:11 mlocati