【发布时间】:2016-07-25 06:28:54
【问题描述】:
我想我在尝试访问我的 laravel 网站时遇到了这个错误:
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
Class 'Mews\Purifier\PurifierServiceProvider' not found
我尝试执行composer update,但出现此错误:
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 package mews/purifier could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
我也尝试了上述链接,但没有任何反应。这是我的 composer.json 的内容
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"vtalbot/markdown": "1.*",
"mews/purifier": "dev-master-14",
"hybridauth/hybridauth": "dev-master#6d89473",
"symfony/yaml": "dev-master",
"greggilbert/recaptcha": "1.*",
"php": ">=5.3.0",
"ext-curl": "*",
"ext-json": "*",
"gloudemans/shoppingcart": "~1.2",
"stripe/stripe-php":"dev-master"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
],
"files" : [
"vendor/stripe/stripe-php/lib/Stripe.php"
]
}, "scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
有什么想法吗?
我收到此错误是因为我尝试将 "mews/purifier": "dev-master-14", 替换为 "mews/purifier": "dev-master", 但我再次遇到错误,例如 Composer Update error in Laravel 4 after renaming a controller file ...
对我的案子有任何想法吗?任何帮助将不胜感激..
我也尝试composer install,但我收到此错误:
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
PHP Fatal error: Class 'Mews\Purifier\PurifierServiceProvider' not found in /var/www/staging.theskitrip.ca/protected/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Mews\\Purifier\\PurifierServiceProvider' not found","file":"\/var\/www\/staging.theskitrip.ca\/protected\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Mews\Purifier\PurifierServiceProvider' not foun
d in /var/www/staging.theskitrip.ca/protected/vendor/laravel/framework/src/Illuminate/
Foundation/ProviderRepository.php on line 157
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
【问题讨论】:
-
你能粘贴你的app.php的内容吗??
标签: php laravel-4 composer-php