0

I want to install phpdocumentor to my Symfony 2.4 project, so I added this two lines to my composer.json:

"require": {
   //my old requires
   "phpdocumentor/template-abstract": "~1.2",
   "phpdocumentor/phpdocumentor": "2.1.*@dev"
}

whene I execut php composer.phar update, i have these errors:

 Problem 1
- 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/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1].

although I installed php_xsl in my php extensions?!! Thank you.

medkhelifi
  • 1,071
  • 3
  • 17
  • 35
  • 2
    What is the location of the php.ini file in which you have the php_xsl extension enabled? Sometimes webservers use a different php.ini than composer, so you can have the extension enabled for your website (i.e. shows up in phpinfo()) but not for the command line. – Divey Jan 21 '14 at 18:37
  • Thank you for your response, I work in my local machine i installed wampserver 2.4 and i activated php_xsl from its graphic interface. – medkhelifi Jan 21 '14 at 18:40
  • Enabling for WAMP doesn't necessarily mean that it is enabled for composer. Check out http://stackoverflow.com/questions/16372888/intl-extension-php-intl-dll-with-wamp and http://stackoverflow.com/questions/16372888/intl-extension-php-intl-dll-with-wamp. – Divey Jan 21 '14 at 18:45
  • Sorry, I did what mentioned in topic: (copie all icu* to my apache bin folder) but I have the same problem !!! – medkhelifi Jan 21 '14 at 19:08
  • what's the output of `php -m | grep xsl` and `php -i | grep ini`? compare the location of the `php.ini` file with the one you see when accessing a php-file with `phpinfo()` from your webserver. – Nicolai Fröhlich Jan 22 '14 at 02:01

2 Answers2

1

Ok I just answered this here.. might as well elucidate.

Basically you also need to enable the extension in the php.ini file used by PHP CLI as this is the one composer uses when you run it on the command line.

( Mine is at: C:\wamp\bin\php\php5.4.12\php.ini )

Good Luck.

Community
  • 1
  • 1
ugochimbo
  • 261
  • 3
  • 5
-1

@Mohamed: I was getting the same problem few days back but when I tried the following command it then worked successfully.This will update your composer.phar file.

php composer.phar self-update
Manu
  • 109
  • 1
  • 5
  • It has nothing to do with a composer version. https://github.com/phpDocumentor/phpDocumentor2/issues/587 – white Apr 20 '14 at 18:26