Visibility=api not working
When I run phpdoc with visibility set to api, it's still including all methods (including private and protected methods).
See documentation here, suggesting that this approach should work.
Example command
phpdoc --visibility=api -f ./path/to/file -t docs/api
Also faced with the same issue.
After spending half an hour trying to figure out what I was doing wrong, I've found this. Same problem here, of course.
Very useful feature, I think. It will be good to have it fixed.
Ignored tags aren't working either. I see calls to setIgnoredTags in the Parser class, but the class has nothing in it. Possibly related.
Same problem here, @ignore and --visibility=api not working
same issue phpDoc v2.8.5 on php 5.5.9
I'm seeing the same problem.
- phpDocumentor version 2.8.5
- PHP 5.6.3
I'm using the workaround, --visibility=public,protected.
If the code to be documented uses the @api tag at all, then anything without that tag should not be included in the documentation. Also, if any code uses @api, then phpdoc should behave as though the --visibility=api option were used. If the user wants the documentation to include code covered by one of the other visibilities, then they would need to explicitly state them using --visibility=private (for example).
I couldn't get Isloan's workaround to work, but here's a different workaround I'm using (begrudgingly):
Instead of marking API elements with @api, I'm marking non-API elements with @internal. Then when you run phpdoc by default it will hide the @internal elements, which allows you to generate public API documentation. Then, to generate full documentation, use the parameter --parseprivate to show @internal elements.
Very frustrating since I imagine it would be very easy for the devs to add an @api-only parameter and this request is 2 years old. I don't understand what the point of having @api is if you can't use it in this way.
PUSH!? Same here --ignore-tags and --visibility "api" dont work. It would be very nice to create a Developer Doc on the one hand, and User/Consumer Doc (very restricted) on the other hand.
This issue is solved on master and will be released as part of phpDocumentor 3. The latest builds in Github Actions contain a PHAR file that includes this fix if you want to try a bleeding-edge version.