hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Allow ::class to be used in user attributes

Open HRMsimon opened this issue 11 years ago • 0 comments

We're using class names in user attributes and it would be nice to be able to use ::class which the type checker can detected typos in instead of a string.

Example:

<?hh

class Authorise_Allow {}

class Controller {
    <<Authorise(Authorise_Allow::class)>>
    public function index() {}
}

Currently fatals in the run time, but not the type checker.

HRMsimon avatar Aug 18 '15 06:08 HRMsimon