我有两个问题:
我正在尝试通过我的zend 2项目中的composer安装 ScnSocialAuth ,但收到此错误消息:
Problem 1
- socalnick/scn-social-auth 1.9.4 requires hybridauth/hybridauth dev-master -> no matching package found.
- socalnick/scn-social-auth 1.5.1 requires zf-commons/zfc-base dev-master -> no matching package found.
- socalnick/scn-social-auth 1.18.1 requires zf-commons/zfc-user 1.2.* -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
这是我的composer.json文件:
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.3.*",
"zf-commons/zfc-user": "~0.1.2",
"doctrine/doctrine-orm-module": "0.*",
"zf-commons/zfc-user-doctrine-orm": "0.*",
"zendframework/zend-developer-tools": "dev-master",
"slm/mail": "~1.5",
"bjyoungblood/bjy-authorize": "1.4.*",
"acelaya/zf2-acmailer": "4.*",
"phpunit/phpunit": "4.3.*",
"nikolaposa/zf-open-graph": "1.*",
"socalnick/scn-social-auth": "1.*"
}
我尝试手动安装软件包但后来收到此错误消息:
Fatal error: Class 'Hybrid_Auth' not found in \vendor\ScnSocialAuth\src\ScnSocialAuth\Service\HybridAuthFactory.php on line 34
所以,我怀疑包需要通过composer
安装非常感谢您如何正确安装它。
答案 0 :(得分:0)
尝试在composer.json中为hybridauth添加@dev
版本要求,即让它看起来像这样......
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.3.*",
"zf-commons/zfc-user": "~0.1.2",
"doctrine/doctrine-orm-module": "0.*",
"zf-commons/zfc-user-doctrine-orm": "0.*",
"zendframework/zend-developer-tools": "dev-master",
"slm/mail": "~1.5",
"bjyoungblood/bjy-authorize": "1.4.*",
"acelaya/zf2-acmailer": "4.*",
"phpunit/phpunit": "4.3.*",
"nikolaposa/zf-open-graph": "1.*",
"socalnick/scn-social-auth": "1.*",
"hybridauth/hybridauth": "@dev"
}