[The] existing solution is pretty verbose, creating single Feature requires us to define name, config variable, group.
The most basic (and likely most common) usecase for the developer will be to create a feature that has one or more requirements that are specific to that feature. Vector's Feature Manager currently requires that requirements be created separately to features, e.g.
$featureManager->registerSimpleRequirement( 'foo_enabled', $config->get( 'wgFooEnabled' ) ); $featureManager->registerRequirement( new LatestSkinVersionRequirement() ); $featureManager->registerFeature( 'FooFeature', [ 'foo_enabled', LatestSkinVersionRequirement::class ] );
It should be possible to write the above using on function call:
$featureManager->registerFeature( 'FooFeature', [ $config->get( 'wgFooEnabled' ), new LatestSkinVersionRequirement(), ] );