Project installation ignores version constraints when checking already-installed extensions
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
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
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
php/pie 的其他 Issue
-
When --from-lock is used, --no-dev becomes a no-op可能已有人在做 @asgrim 今天认领。 未关闭maintainer investigating
php/pie#778 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Do not duplicate an ext in pie show output for dev versions可能已有人在做 @asgrim 于 18 天前认领。 未关闭enhancement maintainer investigating
维护者通常 1 天内回复
-
Allow building from existing sources on disk可能重新可做 @asgrim 于 29 天前认领,目前没有进行中的 PR。 未关闭enhancement maintainer investigating
php/pie#738 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Optionally remove build-only dependencies and bloat after install可能重新可做 @asgrim 于 150 天前认领,目前没有进行中的 PR。 未关闭enhancement maintainer investigating
php/pie#618 · 2 条评论 · 4 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Display number of downloads/stars when results are shown可能重新可做 @asgrim 于 177 天前认领,目前没有进行中的 PR。 未关闭enhancement maintainer investigating
php/pie#592 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
omegaup/omegaup#10353 · 1 条评论 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
Featured image not passed to checks in the Tasks column or publish blocks可能已有人在做 @roborourke 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
humanmade/publication-checklist#100 ·
维护者通常 1 天内回复
-
bug customer-reported
难度 2/5 1-3 小时 新手友好度 62/100
MagnaCapax/PMSS#1072 ·
维护者通常 5 天内回复