我在 package.json 中列出了很多库,但我知道其中大多数没有使用。我该如何知道我使用哪些库以及未使用的库是哪些?
我正在使用 Symfony 3.4 和 Yarn 作为依赖管理器。
谢谢!
我在 package.json 中列出了很多库,但我知道其中大多数没有使用。我该如何知道我使用哪些库以及未使用的库是哪些?
我正在使用 Symfony 3.4 和 Yarn 作为依赖管理器。
谢谢!
>composer show
doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
phpdocumentor/reflection-common 1.0.1 Common reflection classes used by
.....
input/output with nice error messages.
>composer why doctrine/instantiator
phpspec/prophecy 1.8.0 requires doctrine/instantiator (^1.0.2)
phpunit/phpunit-mock-objects 2.3.8 requires doctrine/instantiator (^1.0.2)
你也可以尝试使用树状结构版本:
>composer why -t doctrine/instantiator
doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
├──phpspec/prophecy 1.8.0 (requires doctrine/instantiator ^1.0.2)
│ └──phpunit/phpunit 4.8.36 (requires phpspec/prophecy ^1.3.1)
│ └──XXXXXXXX dev-master (requires (for development) phpunit/phpunit ~4.6)
└──phpunit/phpunit-mock-objects 2.3.8 (requires doctrine/instantiator ^1.0.2)
└──phpunit/phpunit 4.8.36 (requires phpunit/phpunit-mock-objects ~2.3)
└──XXXXXXXX dev-master (requires (for development) phpunit/phpunit ~4.6)
composer.json
的“require”部分中。 - john Smith