You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Local Environment: Add support for reading wp-env configuration #230
changed the title [-]Local Environment: Read `wp-env` configuration.[/-][+]Local Environment: Add support for reading `wp-env` configuration[/+]on May 2, 2023
I think it'd be good to have some tests around this too. Tests will prevent accidental breakage and save us time from testing various permutations of the config file.
Where should I look for the .wp-env.json file? To where the user executes the code, or into the folder the user provides via path?
Where typically a .wp-env.json file exists?
.wp-env.json usually exists in the plugin/theme project root folder. You need to use the given --path=, which is the current directory by default.
Should I take into consideration .wp-env.override.json as well?
Yes, I think it's easy to implement. If this override file .wp-env.override.json exists, then read it, if it doesn't exist, try to read .wp-env.json`. And the arguments passed inline should have higher priority.
We need to take into consideration only php, path, and port as parameters to override for now?
Yes, php, wp versions and port.
I think path is not supported by .wp-env.json
In the future, we could support plugins and mappings.
Be sure to read about Blueprints (merged in #211 and improved in #214 – documentation coming soon!) – you may be able to rewrite a good chunk of .wp-env.json as a Blueprint, and then we'll see if it makes sense to add support for anything that cannot yet be expressed as one.
Activity
[-]Local Environment: Read `wp-env` configuration.[/-][+]Local Environment: Add support for reading `wp-env` configuration[/+]kozer commentedon May 4, 2023
Hey @sejas ! Can you assign me this one? Thanks!
sejas commentedon May 4, 2023
@kozer, Thanks for taking this issue 🙏
danielbachhuber commentedon May 4, 2023
I think it'd be good to have some tests around this too. Tests will prevent accidental breakage and save us time from testing various permutations of the config file.
kozer commentedon May 5, 2023
Hello @sejas ,
I have some questions for you:
.wp-env.jsonfile? To where the user executes the code, or into the folder the user provides viapath?..wp-env.override.jsonas well?.wp-env.jsonfile exists?php,path, andportas parameters to override for now?sejas commentedon May 5, 2023
@kozer,
.wp-env.jsonusually exists in the plugin/theme project root folder. You need to use the given--path=, which is the current directory by default.Yes, I think it's easy to implement. If this override file
.wp-env.override.json exists, then read it, if it doesn't exist, try to read.wp-env.json`. And the arguments passed inline should have higher priority.Yes,
php,wpversions andport.I think
pathis not supported by.wp-env.jsonIn the future, we could support plugins and mappings.
adamziel commentedon May 5, 2023
Be sure to read about Blueprints (merged in #211 and improved in #214 – documentation coming soon!) – you may be able to rewrite a good chunk of .wp-env.json as a Blueprint, and then we'll see if it makes sense to add support for anything that cannot yet be expressed as one.
danielbachhuber commentedon May 17, 2023
🚢