Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Request #17011 Add option to ignore missing parent class
Submitted: 2010-01-18 23:09 UTC
From: hschletz Assigned: ashnazg
Status: Wont fix Package: PhpDocumentor (version 1.4.3)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2010-01-18 23:09 UTC] hschletz (Holger Schletz)
Description: ------------ I have a set of classes that extend classes from an external library that is not available to phpdoc. As a consequence, phpdoc spits out PDERROR_PARENT_NOT_FOUND warnings. This behavior is correct and expected, but I'd like to keep the error log clean for real warnings. A nice solution would be an option to ignore missing parent classes with a particular name, or even better with a particular prefix.

Comments

 [2011-01-03 13:37 UTC] ronan (Ronan Guilloux)
Hi, I encountered the same problem for class inheritance from PEAR-installed frameworks, such as Zeta components. In this case, Phpdoc spits out PDERROR_PARENT_NOT_FOUND, wich is correct but not relevant. A nice solution would be an option to add a dependency-directory path (such as /usr/share/php/MyFramework), o keep the error log clean for real warnings.
 [2011-01-03 20:33 UTC] ashnazg (Chuck Burgess)
Note to self: perhaps an option here would be a runtime argument that can accept a list of PDERROR constants to ignore.
 [2011-01-03 21:47 UTC] hschletz (Holger Schletz)
Generally ignoring PDERROR_PARENT_NOT_FOUND (and possibly other messages too) would go a bit too far because the user might miss some legitimate error messages. I'd support the proposed idea of passing a dependency path. This could be easier to handle on the user-side than my initial idea of specifying class names or prefixes. However, depending on the code structure, this might be problematic in some cases, so the best solution would be to support both ways of specifying exceptions.
 [2011-09-24 12:40 UTC] ashnazg (Chuck Burgess)
My approach to this situation has usually been to include those other libraries in the code I tell phpDocumentor to parse, since I do want to show what things are inherited from those library classes. Then, in order to limit the documentation output to just my own code, I'll explicitly list only the packages that I want documented, using the --packageoutput arg. Another "hack" approach would be to have one dummy file where you write empty class declarations for all the "not found" classes, and populate their docblocks with @ignore. Still, a new runtime arg that accepts a specific classname to ignore from "not found" errors would be useful.
 [2012-01-13 08:25 UTC] ashnazg (Chuck Burgess)
-Roadmap Versions: +Roadmap Versions: 2.0.0a1
 [2012-09-01 01:11 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: ashnazg -Roadmap Versions: 2.0.0a1 +Roadmap Versions:
No more feature work on phpDocumentor 1.x. Check out the new phpDocumentor 2.x (http://www.phpdoc.org/).