Clarify documentation of SkinVector::__construct()

With I5772eb7 merged in core, it's no longer accurate to say that the
$options param is optional.

It's important to note this now, before someone report it as a bug.

Since the method is a public API and technically does not require a
parameter, no one will expect that following the rules (providing no
argument, as in `$skin = new SkinVector`) will throw fatal exception.

Bug: T262233
Change-Id: I771e5cc8ff205943016a26854da18088817b9238
This commit is contained in:
Ammar Abdulhamid 2020-09-16 11:23:54 +01:00 committed by Jdlrobson
parent db254ab4b3
commit cf895f19e2
1 changed files with 5 additions and 0 deletions

View File

@ -79,6 +79,11 @@ class SkinVector extends SkinMustache {
* in legacy mode.
*
* @inheritDoc
* @param array|null $options Note; this param is only optional for internal purpose.
* Do not instantiate Vector, use SkinFactory to create the object instead.
* If you absolutely must to, this paramater is required; you have to provide the
* skinname with the `name` key. That's do it with `new SkinVector( ['name' => 'vector'] )`.
* Failure to do that, will lead to fatal exception.
*/
public function __construct( $options = [] ) {
if ( $this->isLegacy() ) {