Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Project installation ignores version constraints when checking already-installed extensions

已关闭
#775 1 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@asgrim 已经在做这个了。

开始于 2026年10月13日。

  • #777 来自 @asgrim —— 已合并

评估

这个 Issue 还没有评估数据。

描述

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?

主要语言
PHP
星标
2k
派生
75
平均合并
20 小时
30 天内合并 PR
17

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

php/pie 的其他 Issue

查看 php/pie 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。