I've helped guide two teammates through homebrew based local environment setup (after bad experiences with trying to get started with MediaWiki-Docker) on macOS, and am thinking that it could be useful to have this managed by mwcli, so it's more easily repeated.
The main reference is the Homebrew section of this document https://www.mediawiki.org/w/index.php?title=Manual:Running_MediaWiki_on_macOS#Homebrew_Setup
I'm unsure of how this would fit into the existing command structure, especially as dev is aliased to mwdd, but maybe somethjing like mw dev-environment init --homebrew or something like that. The command would do the following:
- check if homebrew is installed, if not, execute the install script from https://brew.sh or error out and ask the user to install via https://brew.sh/
- once homebrew is installed
- check if php is installed, if not guide the user to install it.
- if php is installed, verify that which php comes from a homebrew managed directory, if not guide the user how to install and export the php binary to PATH
- prompt the user to install xdebug and other plugins as needed with pecl
- guide the user through downloading and installing composer globally
- check if httpd is installed, if not guide the userto install it.
- ask the user where mediawiki/core is cloned, if not prompt to clone it
- modify the httpd conf to include the path to the user's mediawiki core directory and support apache short URLs
- modify httpd conf to ensure php7 is linked
- restart httpd and php-fpm
- ask the user if they want to run mysql through mariadb (homebrew) or via a docker image (in single container setup or replicated setup)
- print out relevant docker run command, or guide user through homebrew managed mariadb install
- ask the user if they want to run elasticsearch (through docker only)
- print out relevant docker run command
- guide the user through cloning additional extensions/skins (I think there's already a mwcli task for this)
- guide the user through the install.php script