Page MenuHomePhabricator

MediaWiki development orientation for Surbhi Gupta
Closed, ResolvedPublic9 Estimated Story Points

Description

Background/Goal

Become oriented on MediaWiki development in preparation for future MediaWiki development tasks

Acceptance Criteria

Be generally prepared to take on MediaWiki development tasks. This does not imply deep familiarity with any particular part of the codebase; it is expected that additional ramp-up time would be needed for any such assigned task. It simply means a basic level of setup and understanding has been obtained, as covered in the Key Tasks below.

Key Tasks

  • review the Developer Portal as a starting point for finding technical information on MediaWiki development
  • review the Technical Ecosystem page for context
  • review the How to become a MediaWiki hacker page, and any linked documentation that feels relevant
  • set up local development. The recommended way is mwcli, but it is still somewhat experimental. If you run into showstopper issues with it, feel free to use any of the other ways listed on How to become a MediaWiki hacker. There is no particular required way of setting up local development, and different developers prefer different methods.
  • set up a PHP IDE of your choice. We have free access to the JetBrains tools if you like PhpStorm. The linked page contains lots of info about configuring PhpStorm for things like unit testing and gerrit. That is at your discretion. Some developers like to set all that up, while others prefer to do all that from the normal terminal.
  • run unit tests (however you choose), just to make sure you know how
  • consider setting up debugging. XDebug is incredibly useful, but notoriously tricky to configure. So you might give it a try, but don't feel obligated to spend too much time on it if you find yourself struggling. It isn't absolutely necessary.
  • explore the codebase. Review files related to the MediaWiki REST API in particular, but look around into any areas that interest you.
  • run a maintenance script, just to be sure you know how. There are a bunch to choose from. The ones starting with "Check" are informational and shouldn't hurt anything in your local wiki, so they might be good choices.
  • change something in your local wiki by altering either code or a settings file. Maybe you just change the logo. Maybe you alter something in one of the API return values. Maybe you just print your name at the top of every page. The point is to make sure that you have a functional editing workflow.
  • install an extension of your choice, just to be sure you know how. The OAuth Extension wouldn't be a bad choice, as API Platform is sometimes involved with it. You can see a list of your local wiki's installed extensions on your Special:Version page.

Artifacts & Resources

Most of the relevant links are listed above. CodeSearch is really useful for searching across both MediaWiki Core and extension code, but you probably don't need it for this orientation task.

If you use mwcli, there is info on unit testing and XDebug here. Again, XDebug is great but can be difficult to configure, so don't feel like you have to spend a lot of time on that if it doesn't work out.

Be aware that while our on-wiki documentation is extensive, finding things in it can sometimes be challenging. Given how long the Foundation has been around, there's a lot of hidden tech - little services or scripts that you kind of just have to know about. I learn about new things all the time.

This is mentioned in an above link, but easy to miss. So for avoidance of confusion:

  • the REST API (also known as MediaWiki REST API, also known as Core REST API) is a REST infrastructure that we created a couple of years ago, but which isn't very mature yet. Its entry point is the rest.php file in the MediaWiki codebase, and the related code lives under includes/Rest.
  • the Action API is an extremely powerful RPC-based API that has been in MediaWiki Core for many years. Its entry point is the api.php file in the MediaWiki codebase, and the related code lives under includes/api.

Don't be afraid to ask questions! This is a large, complicated codebase and it takes everyone awhile to get familiar with it. If you have a question when nobody else on our team is available, some good Slack channels to ask in are #no-stupid-questions, #techsnag, and #wmf-coding-rookies. There may be other good channels as well. If you identify yourself as a staff member new to MediaWiki and trying to learn the code, people will be very happy to help.

Event Timeline

SGupta-WMF changed the task status from Open to In Progress.Dec 20 2022, 7:05 AM
SGupta-WMF changed the task status from In Progress to Stalled.Jan 9 2023, 9:46 AM
JArguello-WMF removed SGupta-WMF as the assignee of this task.
JArguello-WMF added a subscriber: SGupta-WMF.