跳过作曲家PHP要求 [英] Skip composer PHP requirement

查看:187
本文介绍了跳过作曲家PHP要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用PHPCI和作曲家。运行PHPCI的服务器是在PHP 5.3。

We are using PHPCI and composer. The server which runs PHPCI is on PHP 5.3.

对于一个项目,我们添加了Facebook PHP SDK,使用composer。它需要PHP 5.4。
编译器被PHPCI触发并被执行。但是因为CI服务器刚刚得到PHP 5.3作曲家失败,并显示错误信息:

For a project we added the Facebook PHP SDK, using composer. It requires PHP 5.4. Composer gets triggered by PHPCI and get executed. But because the CI server just got PHP 5.3 composer failed with the error message:

facebook/php-sdk-v4 4.0.9 requires php >=5.4.0 -> no matching package found.

这当然会失败我的PHPCI版本。

This let fail my build in PHPCI, of course.

是否有可能跳过此要求?也许通过添加一个选项composer.json?或者是composer.phar调用的参数?

Is there a possibility to skip this requirement? Maybe by adding an option to composer.json? Or a parameter to composer.phar call?

推荐答案

我找到了选项:

composer install --ignore-platform-reqs

忽略平台要求(php& ext-packages)。

Ignore platform requirements (php & ext- packages).

这篇关于跳过作曲家PHP要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆