This bug is intended to track background code-cleanup work aimed at reducing the use of global and public variables in the MediaWiki code base. The use of such variables is discouraged in software engineering, because as the software grows it becomes increasingly hard to ensure that they remain in a consistent state. It also makes the code more difficult to modularize, because different modules become dependent on each others' internal implementation details, instead of on clearly defined interfaces.
The most common practice to reduce these difficulties is to wrap the variables in get/set functions. Many of these functions are already present in the MW code base, but are not being used consistently. Progress on this bug will primarily consist of ensuring that access to the variables is properly routed through these functions, introducing new functions where they do not exist, and making the variables 'private' where possible, to ensure that that the accessors are not bypassed in the future.