我是否可以通过某种方式禁用composer require <package>
步骤加快Updating dependencies
的速度?我只是想安装一个简单的包,而不是阅读所有其他包。使它详细显示它将执行的许多次读取。
Updating dependencies (including require-dev)
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2017-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2017-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016-10.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2017-01.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2017-04.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-latest.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-drupal-composer$drupal-scaffold.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-cweagans$composer-patches.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-composer$installers.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-stdlib.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-escaper.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-feed.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-hydrator.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-psr$http-message.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-diactoros.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-twig$twig.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$translation.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$validator.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-ircmaxell$password-compat.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-php55.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$serializer.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$routing.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-php54.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$http-foundation.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$psr-http-message-bridge.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-iconv.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-psr$log.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$debug.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-apcu.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$class-loader.json from cache
... Goes on...
答案 0 :(得分:1)
似乎
composer require <package> --no-update
仅使用新软件包的定义更新composer.json。要实际安装该软件包,您随后需要运行:
composer update --no-dev <package>
这将安装软件包而不安装开发软件包。