Skip to content
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

Clean template does not generate classes when installed with Composer #1427

Closed
mvriel opened this issue Sep 9, 2014 · 7 comments
Closed

Comments

@mvriel
Copy link
Member

mvriel commented Sep 9, 2014

On IRC the user BadCodSmell has reported that when he installs phpDocumentor using Composer that the clean template runs as expected but no class documentation pages are generated. Even the /classes folder is absent.

the used command is

phpdoc run --template=clean --filename=test3.php -t docs --title='Elvis Returns' --visibility=public -vvv

Both the PHAR and PEAR installation do not suffer from this issue and it is reported with both 2.7 and 2.6.1.

This might be related to a version of PHP-Parser as BadCodSmell indicated that he uses that package.

@mvriel mvriel added the bug label Sep 9, 2014
@mvriel mvriel added this to the 2.8 milestone Sep 9, 2014
@rjkip
Copy link
Contributor

rjkip commented Nov 22, 2014

Confirmed. No class documentation is generated and classes/ directory is missing when installing alongside nikic/php-parser:~1. Will try to find cause.

@rjkip
Copy link
Contributor

rjkip commented Nov 22, 2014

So by requiring nikic/php-parser:~1, phpdocumentor/reflection reverts to 1.0.3, in which it required nikic/php-parser:>=0.9. Would the behaviour as described in the issue be expected with /reflection:1.0.3?

@mvriel
Copy link
Member Author

mvriel commented Nov 22, 2014

Reflection 1.0.3 should not cause this type of issue but PHP-Parser introduced a few incompatibilities between PHP-Parser 0.9.4 and later versions. It might be imaginable that that might actually be related

@throup
Copy link

throup commented Dec 20, 2014

I have experienced the same issue with the responsive-twig template when running phpDocumentor from composer.

If I require both phpDocumentor and phpdox, the dependencies resolve to give me phpdocumentor/reflection=1.0.3 and nikic/php-parser=1.0.2. In this configuration, phpDocumentor generates no class documentation.

If I remove the requirement for phpdox, the dependencies resolve to give me phpdocumentor/reflection=1.0.7 and nikic/php-parser=0.9.5. In this configuration, phpDocumentor does generate the class documentation.

@cmb69
Copy link

cmb69 commented Mar 13, 2015

Apparently, the fix didn't make it to 2.8.2. I suggest to adjust the milestone accordingly.

@mrobinsonuk
Copy link

This evening I also encountered the same problem and I agree with @throup's description. I'm realise I'm not adding much, but I thought it may be helpful to add my observations.

Using phpDocumentor 2.8.2 installed via composer, if I also explicitly specify phpdocumentor/reflection 1.0.0, 1.0.1, 1.0.2 or 1.0.3 I receive nikic/php-parser v1.3.0 as a dependency. In these cases, the generated HTML documentation is effectively empty.

When I specify phpdocumentor/reflection 1.0.4, 1.0.5, or 1.0.6 I instead receive nikic/php-parser v0.9.4, and with phpdocumentor/reflection 1.0.7 I receive nikic/php-parser v0.9.5. In these cases, the HTML documentation is generated just fine.

Would setting the minimum required version of phpdocumentor/reflection to 1.0.4 be a solution, or is there more to it than that?

@beporter
Copy link

Just a note, I'm still seeing this using composer require phpdocumentor/phpdocumentor. (This currently installs the package version 2.8.4, even though the command line tool still reports v2.8.3.)

Regardless of what template I choose, there are no namespaces or classes listed in the generated HTML, only "stubbed" pages without any content in them, and strangely, the "Errors" page is populated properly.

$ composer info phpdocumentor/phpdocumentor
name     : phpdocumentor/phpdocumentor
descrip. : Documentation Generator for PHP
keywords : api, application, dga, documentation, phpdoc
versions : dev-master, 3.0.x-dev, * v2.8.4, v2.8.3, v2.8.2, v2.8.1, v2.8.0, v2.7.1, v2.7.0, v2.6.1, v2.6.0, v2.5.0, v2.4.0, v2.3.2, v2.3.1, v2.3.0, v2.2.0, v2.1.0, v2.0.1, v2.0.0, 2.0.0b7, v2.0.0b6, v2.0.0b5, v2.0.0b4, v2.0.0b3, v2.0.0b2, v2.0.0b1, 2.0.0a11, v2.0.0a10, v2.0.0a9, v2.0.0a8, v2.0.0a7, v2.0.0a5, 2.0.0a4, v2.0.0a3, dev-develop, dev-revert-1363-avoid-assert-true, dev-release-2.0.2, dev-release-2.0.1
type     : library
license  : MIT License (MIT) (OSI approved) http://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/phpDocumentor/phpDocumentor2.git 6d8f4c6381283dd2ae21efae30080adde9bfb1ba
dist     : [zip] https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/6d8f4c6381283dd2ae21efae30080adde9bfb1ba 6d8f4c6381283dd2ae21efae30080adde9bfb1ba
names    : phpdocumentor/phpdocumentor

autoload
psr-0
phpDocumentor => src/, tests/unit/
Cilex\Provider => src/

requires
cilex/cilex ~1.0
erusev/parsedown ~1.0
herrera-io/phar-update 1.0.3
jms/serializer ~0.12
monolog/monolog ~1.6
php >=5.3.3
phpdocumentor/fileset ~1.0
phpdocumentor/graphviz ~1.0
phpdocumentor/reflection ~1.0
phpdocumentor/reflection-docblock ~2.0
symfony/config ~2.3
symfony/console ~2.3
symfony/event-dispatcher ~2.1
symfony/process ~2.0
symfony/stopwatch ~2.3
symfony/validator ~2.2
twig/twig ~1.3
zendframework/zend-cache ~2.1
zendframework/zend-config ~2.1
zendframework/zend-filter ~2.1
zendframework/zend-i18n ~2.1
zendframework/zend-serializer ~2.1
zendframework/zend-servicemanager ~2.1
zendframework/zend-stdlib ~2.1
zetacomponents/document >=1.3.1

requires (dev)
behat/behat ~3.0
mikey179/vfsstream ~1.2
mockery/mockery ~0.9@dev
phpunit/phpunit ~4.0
squizlabs/php_codesniffer ~1.4
symfony/expression-language ~2.4

suggests
ext-twig Enabling the twig extension improves the generation of twig based templates.
ext-xslcache Enabling the XSLCache extension improves the generation of xml based templates.


$ bin/phpdoc -V
phpDocumentor version 2.8.3

beporter added a commit to loadsys/CakePHP-Shell-Scripts that referenced this issue Jul 20, 2015
Depends on moving the skeleton's config/phpdoc.xml file to /phpdoc.dist.xml.

There also seems to be some serious issues with the composer package of phpdoc. It fails to produce any documentation, only "blank" html shell files. I've posted here:

* phpDocumentor/phpDocumentor#1427 (comment)
* phpDocumentor/phpDocumentor#1523 (comment)
beporter added a commit to loadsys/CakePHP-Shell-Scripts that referenced this issue Aug 9, 2015
Depends on moving the skeleton's config/phpdoc.xml file to /phpdoc.dist.xml.

There also seems to be some serious issues with the composer package of phpdoc. It fails to produce any documentation, only "blank" html shell files. I've posted here:

* phpDocumentor/phpDocumentor#1427 (comment)
* phpDocumentor/phpDocumentor#1523 (comment)
@mvriel mvriel added the ready label Dec 2, 2015
@jaapio jaapio closed this as completed May 22, 2016
@jaapio jaapio removed the ready label May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants