Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch WP_VERSION=latest when running composer install #58

Open
danielbachhuber opened this issue Nov 16, 2023 · 5 comments
Open

Prefetch WP_VERSION=latest when running composer install #58

danielbachhuber opened this issue Nov 16, 2023 · 5 comments

Comments

@danielbachhuber
Copy link
Member

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.

@schlessera
Copy link
Member

@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?

@danielbachhuber
Copy link
Member Author

@schlessera Or a third option: a composer cache-wordpress or similar command that a user can run during the setup process.

@schlessera
Copy link
Member

@danielbachhuber I'm not sure how this third option would solve the actual issue, it just seems to add complexity, isn't it?

@danielbachhuber
Copy link
Member Author

@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.

@schlessera
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants