有人知道如何解决以下错误:
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'Symfony\Component\Security\Core\Util\SecureRandom' not found
我的composer.json
是:
{
"require": {
"laravel/framework": "4.0.*",
"cartalyst/sentry": "2.0.*",
"mockery/mockery": "dev-master@dev",
"phpunit/phpunit": "3.7.*"
},
"require-dev": {
"way/generators": "1.0.*@dev"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
],
"psr-0": {
"Authority": "app/"
}
},
"scripts": {
"post-update-cmd": "php artisan optimize"
},
"minimum-stability": "dev"
}
任何想法?我认为是由于克隆的存储库版本而导致的laravel版本。
答案 0 :(得分:0)
尝试重新下载您的包:
cd /your/application/dir
rm bootstrap/compiled.php
rm -rf vendor
rm composer.lock
composer install
然后你可以
composer update --dev
再次
答案 1 :(得分:0)
更新:
{“require”:{“laravel / framework”:“4.0。”, “cartalyst / sentry”:“2.1。”, “嘲弄/嘲弄”:“dev-master @ dev”, “phpunit / phpunit”:“3.7。*”},
稍后再尝试
rm -rf供应商 rm composer.lock 作曲家安装 作曲家更新
答案 2 :(得分:0)
检查vendor/symfony/security-core/Symfony/Component/Security/Core
$ ll vendor/symfony/security-core/Symfony/Component/Security/Core
total 0
我发现我没有文件。所以我删除了它并再次更新:
$ rm vendor/symfony/security-core/ -rf
$ phpcomposer update
Loading composer repositories with package information
The "https://packagist.org/packages.json" file could not be downloaded: Failed to open https://packagist.org/packages.json (Could not resolve host: packagist.org)
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)
- Installing symfony/security-core (v2.5.3)
Loading from cache
symfony/security-core suggests installing symfony/validator (For using the user password constraint)
symfony/security-core suggests installing symfony/expression-language (For using the expression voter)
Generating autoload files
Generating optimized class loader
现在可行。
答案 3 :(得分:0)
最后我想出了如何修复它。
我使用了follow composer.json
{ "要求":{ " laravel / framework":" 4.1。*", " cartalyst / sentry":" ~2.1" }, " require-dev":{ "方式/发电机":" ~2.6", " mockery / mockery":" ~0.9", " phpunit / phpunit":" ~4.0" }, " autoload":{ " classmap":[ "应用程序/命令&#34 ;, "应用程序/控制器&#34 ;, "应用程序/模型&#34 ;, "应用程序/数据库/迁移&#34 ;, "应用程序/数据库/种子&#34 ;, "应用程序/测试/ TestCase.php" ] " psr-0":{ "权限":" app /" } }, "脚本":{ " post-update-cmd":" php artisan optimize" }, "最小稳定性":"稳定" }
现在一切正常。
谢谢大家。