johnbillion / php-docs-standards

PHPUnit tests for documentation standards of PHP functions and methods.
GNU General Public License v2.0
24 stars 4 forks source link

InvalidArgumentException: Expected a string. Got: ReflectionMethod #3

Open ahungry opened 8 years ago

ahungry commented 8 years ago

I've tried this out on a few files that are in classes within my Symfony project.

It seems to parse the methods within the class, however instead of doing anything useful, each DataProvider map across those methods simply returns:

InvalidArgumentException: Expected a string. Got: ReflectionMethod

This is with PHP7

johnbillion commented 8 years ago

I've seen this too. It's due to PHPUnit bundling a newer version of phpdocumentor/reflection-docblock.

Can you try running your tests with ./vendor/bin/phpunit (instead of just phpunit) and let me know if the issue goes away?

ahungry commented 8 years ago

It did fix the issue, thanks!

Do you plan to update the code in php-docs-standards to work with the newer version eventually, or will it be locked to the older version?

johnbillion commented 8 years ago

Yep. I'm planning to update the library to allow it to use static analysis instead too. See #1.

johnbillion commented 8 years ago

I'll get the docs updated to mention the PHPUnit issue.