有人知道如何修复以下错误:
Symfony Component Debug Exception FatalErrorException
Class 'SymfonyComponentSecurityCoreUtilSecureRandom' 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版本或由于克隆库版本。
尝试重新下载软件包:
cd /your/application/dir
rm bootstrap/compiled.php
rm -rf vendor
rm composer.lock
composer install
那么你可以
composer update --dev
再次update this:
{"要求":{"laravel/框架":"4.0 。"cartalyst/哨兵":"2.1。","嘲笑/嘲弄":"dev-master@dev","phpunit)/phpunit)":"3.7。*"},
try this later
rm -rf vendorrm composer.lock作曲家安装作曲家更新
检查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
我终于想出了解决办法。
我使用了下面的composer.json
{"需要":{4.1"laravel/框架":"。*","cartalyst/哨兵":"~ 2.1"}," require-dev ": {"的方式/发电机":"~ 2.6","嘲笑/嘲弄":"~ 0.9","phpunit)/phpunit)":"~ 4.0"},"自动装载":{"classmap":("app/命令","app/控制器","app/模型","应用程序/数据库/迁移","应用程序/数据库/种子","应用程序/测试/TestCase.php"]," psr-0 ": {"权威":"app/"}},"脚本":{"post-update-cmd": "php artisan optimize"},"minimum-stability":"稳定"}
现在一切正常
谢谢一切。