-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full PHP Class Documentation #12
Comments
Hmm... could this be automised here somehow with Github Actions and push the html-docs to repo? |
Not sure if it can be automated with Actions, as it would have to do a git commit in the action. No idea if this is possible. I could certainly do static html pages and put them in a doc directory. I can submit a PR for just the docs directory with html files. If you like it, I can write a script that will generate it. You could run it by hand easily before doing a release. Bug fixes would not need a regen, as the class interfaces would not change. But updating doc blocks would. There may be an issue with css and JS files that are needed by Foundation, but it might work depending on how GitHub serves html pages. The InstaDoc library is meant to be run from a configured server (Foundation installed) and are not 100% independent pages. If this sounds good to you, let me know. |
Ok, maybe it's too much then. And I just realised as this gets installed as package with Composer we would deliver those docs everytime. So maybe describing/linking this in the readme or in the wiki good be enough. |
You can link to my site if you want. Or host your own. I'll see if I can get some simple code to make it work just for one repo installed via composer. |
Yeah, I'd like to see how it works. It would be easier then for me to estimate how to utilize it the best way. |
This would be the minimal code to show just the docs from this library: <?php
include '../vendor/autoload.php';
$fileManager = new \PHPFUI\InstaDoc\FileManager();
$fileManager->addNamespace('Druidfi\Mysqldump', '../vendor/druidfi/mysqldump-php/src');
$fileManager->load();
\PHPFUI\InstaDoc\ChildClasses::load('../ChildClasses.serial');
$controller = new \PHPFUI\InstaDoc\Controller($fileManager);
echo $controller->display(); The display method returns a fully formed HTML page. I generally have a controller to resolve the route, then run this code and exit, but you could do something else, or have a stand alone "doc.php" file with this just code. Either will work. |
I looked into it and checked alternatives. I went with phpDocumentor (PR #18) as it gave me oneliner solution with Docker. I just need to figure out how & where I wanna put the html or do I just leave it = ppl can generate when needed. |
LOL! I looked at PhpDocumentor years ago before I wrote InstaDoc. Still has all the same issues (static pages, 92 megs in my project alone, not counting all packages I use, generates html with errors and warnings, documentation is not compact or separated by access and even misses valid doc blocks, horrible interface). But at least they made it easier to generate docs. Before it was hours of configuration before you got something usable. |
You can see the full class documentation for this library at PHPFUI/InstaDoc It also has the full source code in case the documentation is unclear. Updated to the latest version nightly.
The text was updated successfully, but these errors were encountered: