Yii2 安装PHPOffice/PHPExcel报错的解决办法
  • 2018-10-25发布
  • 2018-10-25修改

./composer.phar require "phpoffice/phpexcel": "*"

安装时报如下错误:

Could not find package * at any version for your minimum-stability (dev). Check the package spelling or your minimum-stability 

解决办法:

to test installation with composer:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/csanquer/PHPExcel.git"
        }
    ],
    "minimum-stability": "dev",
    "require": {
        "phpoffice/phpexcel": "*"
    }
}

then run

php composer.phar update

A class mapping is generated in vendor/composer/autoload_classmap.php and you need only to include the autoloader vendor/autoload.php