Unable to install phpDocumentor via Composer

In composer.json I have

{ "require": { "phpdocumentor/phpdocumentor": "*" } } 

This is what it is because I'm trying to install phpDocumentor in an isolated folder using the ./composer.phar install command. But I get

 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 - phpdocumentor/phpdocumentor v2.0.0 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.0.1 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.1.0 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.2.0 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.3.2 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.4.0 requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1]. - phpdocumentor/phpdocumentor v2.3.1 requires dompdf/dompdf dev-master@dev -> no matching package found. - phpdocumentor/phpdocumentor v2.3.0 requires dompdf/dompdf dev-master@dev -> no matching package found. - phpdocumentor/template-abstract 1.2.1 requires ext-xsl * -> the requested PHP extension xsl is missing from your system. - phpdocumentor/template-abstract 1.2 requires ext-xsl * -> the requested PHP extension xsl is missing from your system. - Installation request for phpdocumentor/phpdocumentor * -> satisfiable by phpdocumentor/phpdocumentor[v2.0.0, v2.0.1, v2.1.0, v2.2.0, v2.3.0, v2.3.1, v2.3.2, v2.4.0]. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. 
+7
php documentation-generation composer-php package-managers
source share
3 answers

The error message indicates that you are missing the XSL extension in your PHP settings. You can see http://www.php.net/manual/en/xsl.installation.php for more information on installing this extension.

Note that the XSL extension is not required for the default template; You can also use the PHAR executable or downloadable archive. They can be downloaded from https://github.com/phpDocumentor/phpDocumentor2/releases/latest . These two do not test the XSL extension and therefore can be used safely.

+8
source share

Try sudo apt-get install php5-xsl

+9
source share

You can easily enable the XSL extension (since it is enabled by default in php 5).

Find the php.ini file and enable (uncomment)

extension = php_xsl.dll

(on WAMP, click the wamp icon → PHP → PHP Extensions → php_xsl)

Please DO NOT FORGET also to include the extension in the php.ini file used by the PHP CLI ( see here ), as this is the one that uses one composer when run on the command line.

For reference (link above):

/etc/php5/cli/php.ini is for the PHP CLI program that you found running php on the terminal.

/etc/php5/cgi/php.ini for the php-cgi system, which is not specifically used in this setting.

/etc/php5/apache2/php.ini is for the PHP plugin used by Apache. This is the one you need to edit to make changes for your Apache installation.

It may be useful to restart server words.

PS: You can check the availability of the extension using:

composer show -p

Good luck.

+1
source share

All Articles