mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 01:20:07 +00:00
9177c22365
With complex additions to Vector's codebase like the Desktop Improvement Program upcoming, it's important that we have a shared, intuitive language to talk about features and their requirements. Centralising the registration of features and creating an API satisfies does exactly this. This change introduces a greatly-reduced version of Piotr Miazga's (polishdeveloper, pmiazga) original proposed API and associated scaffolding classes for feature management in Vector, which itself was based upon his work in MobileFrontend/MinervaNeue. This is done to establish a foundation upon which we can build the more sophisticated parts of Piotr's proposal in a piecemeal basis, thereby minimising risk. Distinct from Piotr's proposed API is the ability to register sets and features that are always enabled or disabled. Additionally: - A Vector.FeatureManager service is registered but not used - A list of proposed immediate next steps is included Bug: T244481 Change-Id: Ie53c41d479eaf15559d5bb00f269774760360bde
33 lines
1 KiB
PHP
33 lines
1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Service Wirings for Vector skin
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
*
|
|
* @file
|
|
* @since 1.35
|
|
*/
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use Vector\FeatureManagement\FeatureManager;
|
|
|
|
return [
|
|
'Vector.FeatureManager' => function ( MediaWikiServices $services ) {
|
|
return new FeatureManager();
|
|
}
|
|
];
|