composer install -n --ignore-platform-reqs不忽略PHP扩展 [英] composer install -n --ignore-platform-reqs not ignoring PHP extension
问题描述
我们有一个运行 composer install -n --ignore-platform-reqs --no-dev
的循环构建,但这不再忽略平台要求。
we have circle build that runs composer install -n --ignore-platform-reqs --no-dev
but this is not ignoring the platform requirements anymore.
这是我在圈子日志中看到的内容。 -ignore-platform-reqs
显然不起作用。有什么想法为什么?
This is what i see in the circle log. The --ignore-platform-reqs
is clearly not working. Any ideas why please?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drupal/core 8.6.13 -> satisfiable by drupal/core[8.6.13].
- drupal/core 8.6.13 requires ext-pdo * -> the requested PHP extension pdo is missing from your system.
Problem 2
- typo3/phar-stream-wrapper v2.1.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- typo3/phar-stream-wrapper v2.1.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for typo3/phar-stream-wrapper v2.1.0 -> satisfiable by typo3/phar-stream-wrapper[v2.1.0].
推荐答案
而不是使用-忽略平台要求
或提供
黑客,最好使用 平台
设置-它使您可以更好地控制平台要求,并且比提供
(您的软件包并未真正提供 ext-fileinfo
):
Instead of using --ignore-platform-reqs
or provide
hack it is better to mimic your environment using platform
setting - it gives you more control about platform requirements and it is more intuitive than provide
(your package does not really provide ext-fileinfo
):
"config": {
"platform": {
"php": "7.2.14",
"ext-fileinfo": "1.0.5",
"ext-pdo": "7.2.14",
"ext-session": "7.2.14",
"ext-iconv": "7.2.14",
"ext-zip": "1.15.4"
}
},
您可以通过在生产环境中调用此命令来找到扩展的实际版本(尽管您可以在扩展版本中放置任何内容-使用任何内容很少见除了 *
作为PHP扩展的约束之外):
Actual versions of extensions you may find by calling this command on production environment (although you could probably put anything for extensions version - it is quite uncommon to use anything except *
as a constraint for PHP extensions):
composer show -p
这篇关于composer install -n --ignore-platform-reqs不忽略PHP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!