Phpdocumentor: @method and @deprecated

Created on 3 Jul 2015  路  6Comments  路  Source: phpDocumentor/phpDocumentor

Hi Guys,

How does one mark a magic method as deprecated? There's no mention of this in the documentation. I tried different combination in PhpStorm but nothing works:

  • @deprecated @method int count()
  • @method @deprecated int count()
  • @method int count() @deprecated

That would be nice to implement because event magic methods get deprecated sometime.

Most helpful comment

@midlan Here you go.

All 6 comments

Hi @olvlvl,

At current there is no way to mark a magic method as being deprecated; in the draft of PSR-5 (the new PHPDoc standard) there is a syntax to make that possible but that is not implemented in phpDocumentor yet.

The new Syntax would be:

@method int count() {
    @deprecated
}

Thanks for your answer @mvriel. I'll wait for PhpStorm to update then.

I've run into same problem today. So I guess it is not fixed yet, so we should reopen the issue then @olvlvl ?

I completely forgot about this. I'm mostly writting Golang these days, no magic methods there :)

Ok I understand. Can you reopen the issue for us who miss that feature? Thanks.

@midlan Here you go.

Was this page helpful?
0 / 5 - 0 ratings