The GUI only allows you to create composer.json (init Composer) and add dependency."Add dependency" is what the terminal calls the require
command.
$composer require vendor/package name:version
The GUI allows you to select packages and versions after searching by keyword, which is easier to understand.
Since the most common operation of the composer is to add packages, isn't this the only way to cover it with the GUI?
PhpStorm's official site said that if you want to use all the commands in the composer, use Ctrl+Shift+X to use the command-line window.The complement of the command seems to work, but it's not much different from using a terminal.
Reference Site
http://qiita.com/pakiln/items/22f4b86501f78a21d34f
https://www.jetbrains.com/phpstorm/help/using-composer-dependency-manager.html
From now on, I will guess from the text of the question, but do you update the package after adding it to composer.json?If so, this operation is incorrect.In this way, items other than the added package may unintentionally be upgraded and the program may not work.If you just want to add a package, use the require command instead of adding it to composer.json.
© 2024 OneMinuteCode. All rights reserved.