Composer Hate
People keep seeing how great APT was, and reinventing their own
wheels. There is pip
and Rubygems and npm
and on and on and on.
Mostly I do not like these solutions, but it is clear that
Debian-style stable releases lost
the packaging wars, and so we are stuck with a dozen different
incompatible updating mechanisms. Have fun checking each one of them
individually!
PHP's attempt to keep up with the Jonses is composer
. People pretend
that Composer is like APT for PHP. But there are some differences.
Firstly, as noted before, composer
is
not good at managing dependencies. It will lock down versions of
Drupal modules so that they cannot be easily updated even when you
want them updated. (You had ONE JOB, composer
.)
Here is another deficiency:
$ time composer update
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 37 updates, 1 removal
- Removing drupal/console-extend-plugin (0.4.0)
Fatal error: Class 'Drupal\Console\Composer\Plugin\ExtenderManager' not found in /home/kwlugor/kwlug-composer/vendor/drupal/console-extend-plugin/src/Extender.php on line 55
real 9m54.965s
user 0m56.226s
sys 0m3.659s
$
Look. If you are going to have an error then have an error. Clearly I
am a terrible person for calling composer update
instead of
composer update --with-dependencies
. Why are
you taking 10 MINUTES to tell me this? Was somebody not paying
attention during their algorithms and data structures classes?
I get it. I should not be comparing drush up
(which was fast and
just worked) to composer update
because Composer was invented off
the island and has to do so many more difficult things. But drush up
doesn't make me want to ragequit every time I have to do some basic
updates.
Also: that cute feature where you have to be in a specific directory
to call composer update
or it tries to create new composer.json
files everywhere? That's not so cute.