Want to add a new plugin using composer instead of updating all plugins

I want to add a specific plugin to my laravel application using composer. I do not want to synchronize all plugins with composer.json, I just want to add a new plugin.

If I remove the remaining plugins and add the json ie value "mgallegos/laravel-jqgrid": "1.*"as soon as the files are downloaded, all the plugins will be deleted because they are not mentioned there in the json file.

Is it possible to add only one separate plugin without making any changes to other plugins?

This is what my json file looks like:

enter image description here

+4
source share
2 answers

, require :

composer require vendor/package_name ~version

, update:

composer update vendor/package_name

update :

composer update vendor/package_name vendor/package_name2

:

  • - prefer-source: , .
  • - prefer-dist: dist, .
  • - ignore-platform-reqs: php, hhvm, lib- * ext- * , . . .
  • - dry-run: , .
  • - dev: , require-dev ( ).
  • - no-dev: , require-dev. autoload-dev.
  • - no-autoloader: .
  • - no-scripts: , composer.json.
  • - : , , .
  • - optimize-autoloader (-o): PSR-0/4 classmap, . , , .
  • - classmap-authoritative (-a): Autoload . --optimize-autoloader.
  • - lock: , .
  • - : .
  • - root-reqs: .
  • - : .
  • - prefer-lower: . , -prefer-stable.

: https://getcomposer.org/doc/03-cli.md

+3

, composer.json composer install. , , composer.lock .

composer require thenew/package ~1.0

: composer install -. composer.lock composer install, , . composer update , .

: vendor. : , , , composer require . () - composer install , composer.json composer.lock .

+3

All Articles