Talk:Local development quickstart

macOS and PHP
Since macOS Monterey, PHP is no longer preinstalled. So perhaps that should change to reflect an install from Homebrew or Macports or something else if that is preferred. TTaylor (WMF) (talk) 13:50, 31 October 2023 (UTC)


 * Reference: php.net installation on macOS TTaylor (WMF) (talk) 13:51, 31 October 2023 (UTC)
 * Thanks! I'll fix that. APaskulin (WMF) (talk) 16:26, 1 November 2023 (UTC)
 * I'd really like to add apcu for Mac, but that requires several additional steps. Perhaps I should add that to Manual:Running MediaWiki on macOS. —Th e DJ (Not WMF) (talk • contribs) 10:17, 23 November 2023 (UTC)

Serving
There's a composer script called  for running , if that's easier. It doesn't make it possible to change the port, is probably the main drawback. Sam Wilson 03:26, 22 November 2023 (UTC)


 * Good point! I had considered this but felt that it obscured the function of the command unnecessarily and that using the full command provided the option to change the port if the user needed to. But maybe it would be worth including it as an option since it is easier to type. APaskulin (WMF) (talk) 18:54, 22 November 2023 (UTC)
 * Yeah, I do like the fact that it makes it clear that it's a pretty simple command, that's a good point. Sam Wilson 06:36, 23 November 2023 (UTC)
 * I'd also suggest going with, for the same reason that we also wrap the contents of the install.php invocation. Also, we might want to update the  command to include  . KHarlan (WMF) (talk) 07:22, 24 November 2023 (UTC)

Node / npm
You really need node/npm, even grunt for some of the development work. Do we want to add that here as well ? Shouldn't be too many additional packages right ?

If not, I suggest we add a section with what this does NOT do (npm, performance optimisation, php debugging, MariaDB, thumbnailing etc) and then from that section, we can link to further instructions ? —Th e DJ (Not WMF) (talk • contribs) 10:19, 23 November 2023 (UTC)


 * Or we point people directly at fresh.. but that brings a few very MW specific things into the picture again, which I guess we don't really want here ? —Th e DJ (Not WMF) (talk • contribs) 10:39, 23 November 2023 (UTC)

Use shallow clone
I suggest using  for cloning MW and Vector. That takes 13 seconds or so instead of several minutes. After the initial clone, you could make the MW repo "unshallow" (a full clone). For example, this command would use a shallow clone, and then put the multi-minute process of obtaining a full clone in the background:

KHarlan (WMF) (talk) 07:10, 24 November 2023 (UTC)

Multiple workers for PHP server
We might want to suggest to the user that they set e.g.  per the documentation in https://www.php.net/manual/en/features.commandline.webserver.php. So the command would be  Not sure if it will make a big different in practice. KHarlan (WMF) (talk) 07:24, 24 November 2023 (UTC)

Warn about blocked requests?
Maybe this is out of scope for the quick start document, but wanted to flag that the built-in server manual warns:

The web server runs only one single-threaded process, so PHP applications will stall if a request is blocked.

In the past, I saw this cause problems for extensions like VisualEditor, which made internal API requests as part of the process for saving an edit. That doesn't seem to be an issue anymore, but we might want a "Troubleshooting" section which explains that if the page stops loading, one possible cause is the single-threaded process. KHarlan (WMF) (talk) 07:58, 24 November 2023 (UTC)

Load DevelopmentSettings.php from the outset
Without that, it's really hard for a novice to figure out why errors are occurring, or to get more detailed feedback from someone else. I'd suggest a one-liner as part of  that adds this to LocalSettings.php. KHarlan (WMF) (talk) 08:00, 24 November 2023 (UTC)