How can I deprecate a class on hacklang?

127 views Asked by At

I have an old class and I want to deprecate it. I added a deprecation as Phpdoc:

/**
*  @deprecated use MyNewClass.
*/
class MyDeprecatedClass {
 
   public static function doDeprecatedThings() {...}
   ...
}

Which is pretty soft. I like to have a more explicit error or notation for future devs, and there is a deprecation warning describe on: https://docs.hhvm.com/hack/attributes/predefined-attributes#__deprecated

Sadly seems to work for functions/methods.

My current approach is to go to all public methods and flag them as deprecated, which isn't ideal. Also is use statically, so deprecating the constructor is not a full fix.

Is there a way to deprecate the whole class?

0

There are 0 answers