我如何从项目laravel中解析发现包?
composer update
加载作曲家存储库,其中包含包装信息更新依赖项(包括require-dev)没有安装或更新生成优化的自动加载文件 IlluminateFoundationComposerScripts::postAutoloadDump
@php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: gloudemans/shoppingcart
Discovered Package: htmlmin/htmlmin
Discovered Package: mews/purifier
Discovered Package: rap2hpoutre/laravel-log-viewer
Discovered Package: roumen/sitemap
Discovered Package: laravel/socialite
Discovered Package: spatie/laravel-image-optimizer
Discovered Package: aloha/twilio
Discovered Package: laravel/tinker
Discovered Package: socialiteproviders/manager
Discovered Package: davejamesmiller/laravel-breadcrumbs
Package manifest generated successfully.
composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"aloha/twilio": "^3.0",
"davejamesmiller/laravel-breadcrumbs": "^4.2",
"fideloper/proxy": "^3.3",
"gloudemans/shoppingcart": "^2.4",
"golonka/bbcodeparser": "^2.2",
"htmlmin/htmlmin": "^5.0",
"kim/activity": "^1.1",
"laravel/framework": "5.5.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"mews/purifier": "^2.0",
"rap2hpoutre/laravel-log-viewer": "^0.11.0",
"roumen/sitemap": "^2.7",
"socialiteproviders/vkontakte": "^3.0",
"spatie/laravel-image-optimizer": "^1.1"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}}
如何解决这个问题?我有包裹。但是为什么要发现写呢?如何解决已发现的软件包?
,如果下一个版本与项目中的其他库发生冲突,或者您的 composer.json
中的其他版本都无法更新。
Laravel有自己的composer.json
,其中描述了这样的库版本(这是我的Laravel 5.4的JSON):
"symfony/console": "~3.2", // ~3.2 means 3.2 ONLY
"symfony/debug": "~3.2",
"symfony/finder": "~3.2",
"symfony/http-foundation": "~3.2",
是composer.json
统治着作曲家。