当我们从自己的PHP自定义构建包转移到受支持的Heroku构建包时,我们遇到了一个问题。Heroku要求我们向composer.json“要求”部分添加某些扩展,但是当您尝试在本地更新时,它会失败,因为回购程序中不存在这些包。
配置文件:
{
"config":{
"github-oauth":{
"github.com":""
}
},
"require": {
"php": "*",
"ext-newrelic": "*",
"ext-memcached": "*",
"aws/aws-sdk-php": "2.*",
"rollbar/rollbar": "*",
"yiisoft/yii": "1.1.15",
"cloudinary/cloudinary_php": "1.0.11",
"geoip/geoip": "v1.14",
"sendgrid/sendgrid": "2.1.1",
"swiftmailer/swiftmailer": "v5.2.1",
"crisu83/yiistrap": "dev-bs3"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbunit": ">=1.2",
"phpunit/php-invoker": "*",
"phpunit/phpunit-selenium": ">=1.2",
"phpunit/phpunit-story": "*",
"squizlabs/php_codesniffer": "1.*",
"phpmd/phpmd" : "1.4.*",
"phploc/phploc": "*",
"pdepend/pdepend" : "1.1.0",
"sebastian/phpcpd": "*",
"mayflower/php-codebrowser": "~1.1"
}
}错误消息:
11:08:55 {development} /Volumes/Development/web$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-newrelic * is missing from your system.
Problem 2
- The requested PHP extension ext-memcached * is missing from your system.有什么想法吗?
发布于 2014-08-05 00:28:34
你需要安装那些扩展。假设您在开发过程中使用与生产中大致相同的组件和环境在本地开发、运行和测试代码,因此,如果在生产中使用memcache,也可以在本地使用它。这可以确保您不会遇到令人讨厌的惊喜,因为不同的数据存储程序的行为不同等等。
规则的例外:您不需要安装need扩展;如果您提供了need外接程序(通过检测NEW_RELIC_LICENSE_KEY env ),它就会自动启用,请参阅https://devcenter.heroku.com/articles/php-support#extensions (在开发人员的机器上本地没有什么用处,安装起来可能有点麻烦)。
发布于 2014-08-01 09:48:25
安装扩展为我解决了这个问题(新的扩展给我带来了麻烦,但这是另一个问题)。
(答案被张贴在这里,但那个人又把它删除了。)
https://stackoverflow.com/questions/25076923
复制相似问题