theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
600 stars 121 forks source link

Compatibility problem with symfony-maker bundle #340

Closed crevillo closed 6 years ago

crevillo commented 6 years ago

Hello, i'm using phpdox for some of my projects. In the last one i'm trying to add it, i'm using symfony 4.1. problem is i have a deps issue. here's the output of my composer command...

composer require --dev theseer/phpdox
Using version ^0.11.2 for theseer/phpdox
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for theseer/phpdox ^0.11.2 -> satisfiable by theseer/phpdox[0.11.2].
    - Conclusion: don't install nikic/php-parser v4.0.3
    - theseer/phpdox 0.11.2 requires nikic/php-parser ^3.1 -> satisfiable by nikic/php-parser[v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5].
    - Can only install one of: nikic/php-parser[v3.1.0, v4.0.3].
    - Can only install one of: nikic/php-parser[v3.1.1, v4.0.3].
    - Can only install one of: nikic/php-parser[v3.1.2, v4.0.3].
    - Can only install one of: nikic/php-parser[v3.1.3, v4.0.3].
    - Can only install one of: nikic/php-parser[v3.1.4, v4.0.3].
    - Can only install one of: nikic/php-parser[v3.1.5, v4.0.3].
    - Installation request for nikic/php-parser (locked at v4.0.3) -> satisfiable by nikic/php-parser[v4.0.3].

This php-parser requirement comes from the symfony/maker-bundle package which we need too.
https://github.com/symfony/maker-bundle/blob/v1.7.0/composer.json#L17

So, the question. would it be possible to add nikic/php-parser 4 also in the composer? i can make a pr if you want.

thanks.

theseer commented 6 years ago

Thanks for the the report.

PHP-Parser 4 requires PHP 7 and that in turn would require to raise the minimum PHP version of phpDox. So for now, that is sadly a won't fix.

For details on this check #328.

crevillo commented 6 years ago

not even telling composer to allow it to download php-parser 4 and also php-parser 3.1? like in https://github.com/crevillo/phpdox/blob/master/composer.json#L27

thanks.

theseer commented 6 years ago

As is allowed for a major version, the API changed between 3.x and 4.x.

I admit I didn't verify if phpDox would be affected but the list of changes is quite long according to the Upgrading guide of PHP-Parser.

Again, tools should not be installed via composer.