WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

Allow specifc config files for wp-env #50072

Open jonny-bull opened 1 year ago

jonny-bull commented 1 year ago

What problem does this address?

Due to WordPress' backwards compatibility and large install base, it's important to make sure PRs work as well on PHP 8.1 as they do 7.4. The same applies to WordPress versions.

While wp-envis a very powerful and useful tool for quickly spinning up WP installs, it only allows for one configuration file: .wp-env.json.

This means anyone wishing to test multiple configurations would need to manually edit the .wp-env.json file to change what wp-env runs. It also prevents CI tooling from automatically picking a configuration to test against.

What is your proposed solution?

Adding a --config [MY-CONFIG-FILE] flag to wp-env start would allow specifying a configuration file.

This could be picked up by CI tooling in order to spin up multiple configurations of WordPress, installed plugins, themes, PHP versions.

ObliviousHarmony commented 1 year ago

It isn't necessarily what you're asking for, but, you can kind of achieve this already. I have a few solutions that might work for you: