No longer require system-wide install of phpdoc#4
Conversation
Allows the developer to not require phpdoc be installed on their development system, instead downloading and installing it local to the project.
|
johnkary, is this PR still valid? Can I go ahead and merge it? |
|
I haven't checked for sure, but the linked bug in phpDocumentor2 about the doc templates installed in the wrong location is not yet closed: phpDocumentor/phpDocumentor#597 That bug is slated for their 2.0 final milestone and looks like they're still in alpha. |
|
@johnkary getting back to this pull request or is teh phpDocument still working on the issue you stated above? |
|
I played around with this a bit today, and I'm pretty sure I had phpDocumentor working, but only with their The following instructions are for To use phpDocumentor2 with Symfony and install via Composer: Step 1. Add phpDocumentor2 to your {
"require-dev": {
"phpunit/phpunit": "3.7.*",
"artur-gajewski/documentor-bundle": "dev-master",
"phpdocumentor/phpdocumentor": "dev-master",
"nikic/php-parser": "dev-master",
"phpdocumentor/fileset": "1.0.0-beta2",
"phpdocumentor/graphviz": "1.*@beta",
"cilex/cilex": "dev-master",
"cilex/console-service-provider": "1.*@dev",
"phpdocumentor/reflection-docblock": "2.0.0a1"
},
"repositories": [
{ "type":"composer", "url":"http://packages.zendframework.com"}
]
}Step 2. Ensure the following libraries are installed in your dev environment, as phpDocumentor 2 will check for or use them during doc generation: Step 3. Allow Composer to resolve your new dependencies: Step 4. Add to Step 5. Create a file <?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<transformations>
<template name="../data/templates/responsive" />
</transformations>
<parser>
<target>../data/output</target>
</parser>
<transformer>
<target>../data/output</target>
</transformer>
<files>
<directory>../src</directory>
<ignore>../src/*/*Bundle/Tests</ignore>
<ignore>../src/*/Bundle/*Bundle/Tests</ignore>
</files>
</phpdoc>NOTE: I couldn't get phpDocumentor on dev-master to find the responsive template when using the config file. I could, however, get it to find it when using dev-develop. Maybe specifying it on the CLI with dev-master would work. Step 6. Add Step 7. Generate your project's documentation: Step 8. Documentation is output in I'm curious if this bundle should continue to exist. I suppose if you wanted to provide the easiest way to generate only the basic documentation you could change the bundle to set all CLI flags that are defined by |
|
phpDocumentor/phpDocumentor#597 is closed now, might want to consider merging this PR :) |
Allows generating documentation without needing
phpdocinstalled system-wide.Instead, we can add
phpdocumentor/phpdocumentoras a Composer dependency of the bundle, so it will be installed along with the bundle. Now the bundle uses thephpdocexecutable installed at./bin/phpdoc.phpBUT the phpDocumentor2 project is still working through the issues to properly install it via Composer. There is at least 1 bug that must be resolved before this PR can be merged, and also 1 feature request relative to how the developers think the project should be updated we should keep tabs on:
Blocking Bug: phpDocumentor/phpDocumentor#597 - Templates being installed into project root when installed via composer
Relative Feature: phpDocumentor/phpDocumentor#609 - Add command to update phpDocumentor