HomePhabricator

FileRepo: Use Late Static Binding in File static constructors

Authored by TK-999 on May 22 2019, 7:26 PM.

Description

FileRepo: Use Late Static Binding in File static constructors

The FileRepo extension API allows to specify factory methods that
FileRepo implementations will use to instantiate File instances.
Currently, the default static constructors in LocalFile and OldLocalFile
do not use Late Static Binding, so every subclass is forced to re-implement them,
even if they would not need any custom logic. Switching to Late Static Binding
(available since PHP 5.3) allows File implementors to reduce boilerplate
if they do not need to overwrite the existing logic.

Change-Id: Id8f6f5362b68269c2a3232796a1703be14116dd5