Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Project installation ignores version constraints when checking already-installed extensions

Chiusa
#775 1 commento 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@asgrim ci sta già lavorando.

Dal 13/10/2026.

  • #777 di @asgrim — integrata

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement maintainer investigating

I'm using PIE in a PaaS environment, which provides PHP with a bunch of extension.
A few more extensions are automatically installed, using composer.json as source (this mechanism is implemented by the PaaS).

My setup requires ext-mongodb:^2.5.0.
The PaaS already provides mongodb 1.21.5.

When running php pie.phar install, PIE reports that the mongodb extension is already installed:

% php pie.phar install
[...]
requires: ext-mongodb:^2.5.0 ✅ Already installed

But when looking more closely:

% composer check-platform-reqs
[...]
ext-mongodb 1.21.5 __root__ requires ext-mongodb ([>= 2.5.0.0-dev < 3.0.0.0-dev]) __root__ requires ext-mongodb (^2.5.0) failed

% php --ri mongodb | grep version
MongoDB extension version => 1.21.5
[...]

I'd expect PIE to notice that the installed version does not satisfy the constraint and:

  • ideally, replace the version by the appropriate one.
  • at least don't report that the requirement is fulfilled, and instead report a version mismatch.

Here's my composer.json file:

{
  "require": {
    "ext-mongodb": "^2.5.0",
    "php": "8.5.*"
  }
}

Here are the different versions I'm using:

% php pie.phar --version
🥧 PHP Installer for Extensions (PIE) 1.5.2

% php -v
PHP 8.5.11 (cli) (built: Sep 25 2026 12:32:53) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.11, Copyright (c), by Zend Technologies

Is this intended behavior? Or am I missing something?

Lingua principale
PHP
Stelle
2k
Fork
75
Merge medio
20h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di php/pie

Tutte le issue di php/pie

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.