phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 241 forks source link

Fix the handling of invalid phpdoc tags #468

Closed stof closed 4 years ago

stof commented 4 years ago

Such tags are represented by an InvalidTag instance rather than a Method tag, but the name might still be method. As we want to ignore invalid tags (that's the reason to catch exceptions), these tags are filtered out.

stof commented 4 years ago

I caught this when working on the nelmio/alice testsuite, which tries to generate a double for Faker\Generator. And this class has some phpdoc that the library considers invalid (I copied 2 @method annotations of Faker in my fixture).