How to perform composer install, composer update from phpstorm to gui

Asked 1 years ago, Updated 1 years ago, 101 views

As the title suggests, how do I perform operations equivalent to composer install, composer update on phpstorm8?

The Tool->Composer on the menu has only init Composer and Add dependency and runs from the terminal only when installing and updating every time.

php phpstorm

2022-09-29 22:08

1 Answers

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.


2022-09-29 22:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.