wp-cli-dev
wp-cli-dev copied to clipboard
Prefetch `WP_VERSION=latest` when running `composer install`
On hack days with a slow internet connection, the initial run of composer behat
can be quite slow as WP-CLI fetches a copy of WordPress across the network. This can cause the user to think something is broken with their test suite.
Let's instead download WP_VERSION=latest
during composer install
and put it in the appropriate cache directory. This will provide more visibility into what's going on.
@danielbachhuber That will make the Composer run seem unnecessarily slow, and there might be scenarios where people need to run composer install
but have no use for the Behat tests.
How about instead just providing meaningful progression feedback while Behat is downloading WP?
@schlessera Or a third option: a composer cache-wordpress
or similar command that a user can run during the setup process.
@danielbachhuber I'm not sure how this third option would solve the actual issue, it just seems to add complexity, isn't it?
@schlessera The actual issue is that the downloading of WordPress is an opaque part of the setup process. The third option solves it by making it an explicit (albeit not required) step.
I don't feel strongly about it, though. More verbosity works for me too.
@danielbachhuber I think the current timing and behavior is already correct (only downloading when needed, caching as possible, not requiring the user to know about the details).
But, definitely, it needs more feedback.
What could work is to prepend it onto composer behat
instead, that would not change the behavior or the requirements, but allows for adding the feedback without messing with the Behat STDOUT/STDERR.