使用替代路径满足Composer平台依赖性 [英] Satisfy Composer platform dependency using alternative path

查看:96
本文介绍了使用替代路径满足Composer平台依赖性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何用替代路径满足Composer平台软件包的依赖性?我有一个依赖于 php> = 5.4 的软件包,但是我的库存PHP是5.3,并且我有一个单独维护的PHP 5.4安装,可执行文件名为<$ c $。 c> php54 。有什么方法可以使Composer知道吗?

How can I satisfy a Composer platform package dependency with an alternative path? I have a package that depends on php >=5.4, but my stock PHP is 5.3 and I have a separately maintained PHP 5.4 installation under the executable name of php54. Any way to make Composer aware of it?

推荐答案

您可以通过php54可执行文件运行composer。要么显式地调用它 php54 composer.phar ... ,但是如果您在全球范围内安装了作曲家,那会很痛苦。在这种情况下,最好做一个名为composer的shell脚本,该脚本将用php54调用phar文件或为其注册bash别名。

You can run composer through your php54 executable. Either call it explicitly php54 composer.phar ... but that is painful if you have composer installed globally. In that case you're probably better off doing a shell script called composer that will call the phar file with php54 or register a bash alias for it.

这篇关于使用替代路径满足Composer平台依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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