drupal - composer install -n --ignore-platform-reqs 不忽略 PHP 扩展
问题描述
我们有运行的循环构建,composer install -n --ignore-platform-reqs --no-dev
但这不再忽略平台要求。
这是我在圈子日志中看到的。--ignore-platform-reqs
显然不起作用。请问有什么想法吗?
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].
解决方案
与其使用--ignore-platform-reqs
或provide
破解,不如使用platform
设置来模拟您的环境 - 它使您可以更好地控制平台要求,并且比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 扩展的约束之外,使用任何内容都非常罕见):
composer show -p
推荐阅读
- r - 绘制图表以强调 R 中的差异电流和期望值
- python - Python Eve 文档版本控制不会将所有文件存储到 resource_version 文档中,除非我在模式中声明字段,我
- python - 安装python模块失败
- node.js - 使用 webpack 保存调整大小的图像
- wordpress - 有什么办法可以阻止从 wordpress 网站收到垃圾邮件?
- jquery - Owl Carousel data-dot 属性内的链接
- angular - 在angular 6 Home route中设置可选语言参数
- java - 用 Jackson 替换 Uri 的 URL 字段
- triggers - 带有触发器的多项目管道,来自 gitlab 文档的示例不起作用
- bash - 哦,我的 zsh 主题颜色没有在屏幕截图中显示