php - composer require phpoffice/phpspreadsheet don't work

Solution:

I'm using Ubuntu 18.04 with Apache. Using the script from here works.

sudo apt-get install libpcre3-dev php5-dev php-pear -y
sudo pecl install SPL_Types
echo extension=spl_types.so | sudo tee /etc/php5/mods-available/spl_types.ini
sudo php5enmod spl_types
sudo service apache2 reload

Answer

Solution:

This is a PHP PECL extension and it's installation is managed out of composer: https://www.php.net/manual/en/spl-types.installation.php

Composer is just checking if it's present and fails if it's not.

Answer

Solution:

i delete "ext-spltype": "*" from composer.json and it work now

Source