这个是一个Yii2框架依赖包版本问题导致的,是最近几天的出现的,详情参看:
https://github.com/yiisoft/yii2/issues/14275
解决步骤:
composer create-project fancyecommerce/fecshop-app-advanced fecshop 1.0.2.9
出现报错后,
cd fecshop
vim composer.json
打开composer.json后
config部分配置修改为:
"config": {
"process-timeout": 1800,
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"repositories": [
{
"type": "bower-vcs",
"url": "https://github.com/RobinHerbots/Inputmask.git",
"name": "bower-asset/jquery.inputmask"
}
]
}
},
修改完的composer.json的文件完整内容如下:
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "fecshop","cart", "shop", "e-commerce"],
"homepage": "http://www.fecshop.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"forum": "http://www.fecshop.com/forum/",
"wiki": "http://www.fecshop.com/wiki/",
"source": "https://github.com/fancyecommerce/yii2_fecshop_app_advanced"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.6",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-apidoc": "~2.0.0",
"fancyecommerce/fecshop": ">=1.1.3.3"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"repositories": [
{
"type": "bower-vcs",
"url": "https://github.com/RobinHerbots/Inputmask.git",
"name": "bower-asset/jquery.inputmask"
}
]
}
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"scripts": {
"post-install-cmd": "php init --env=Development --overwrite=n"
}
}
修改完成后,在fecshop文件夹下执行 composer update
即可通过安装
后面按照文档一步一步的执行:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-hand-install.html
我的安装log为:
[root@localhost fecshop]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with packagUpdating dependencies (including require-dev)
Package operations: 48 installs, 0 updates, 0 removals
- Installing yiisoft/yii2-composer (2.0.5): Downloading (100%)
- Installing hightman/xunsearch (1.4.10): Downloading (100%)
- Installing tubalmartin/cssmin (v4.1.0): Downloading (100%)
- Installing pimple/pimple (v3.0.2): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Installing container-interop/container-interop (1.2.0): Downloading (100%)
- Installing mrclay/props-dic (2.2.0): Downloading (100%)
- Installing mrclay/jsmin-php (2.3.2): Downloading (100%)
- Installing psr/log (1.0.2): Downloading (100%)
- Installing monolog/monolog (1.22.1): Downloading (100%)
- Installing intervention/httpauth (2.0.2): Downloading (100%)
- Installing mrclay/minify (3.0.1): Downloading (100%)
- Installing natxet/cssmin (v3.0.4): Downloading (100%)
- Installing tedivm/jshrink (v1.1.0): Downloading (100%)
- Installing bower-asset/jquery (2.2.4): Downloading (100%)
- Installing bower-asset/yii2-pjax (v2.0.6): Downloading (100%)
- Installing bower-asset/punycode (v1.3.2): Downloading (100%)
- Installing cebe/markdown (1.0.2): Downloading (100%)
- Installing ezyang/htmlpurifier (v4.9.3): Downloading (100%)
- Installing bower-asset/jquery.inputmask (3.3.7): Downloading (100%)
- Installing yiisoft/yii2 (2.0.12): Downloading (100%)
- Installing skeeks/yii2-assets-auto-compress (1.2.3): Downloading (100%)
- Installing yiisoft/yii2-mongodb (2.1.3): Downloading (100%)
- Installing phpoffice/phpexcel (1.8.1): Downloading (100%)
- Installing yiisoft/yii2-redis (2.0.6): Downloading (100%)
- Installing imagine/imagine (v0.5.0): Downloading (100%)
- Installing fancyecommerce/fec (1.1.3.2): Downloading (100%)
- Installing fancyecommerce/fec_admin (1.3.6.7): Downloading (100%)
- Installing fancyecommerce/fecshop (1.1.3.3): Downloading (100%)
- Installing swiftmailer/swiftmailer (v5.4.8): Downloading (100%)
- Installing yiisoft/yii2-swiftmailer (2.0.7): Downloading (100%)
- Installing scrivo/highlight.php (v8.9.1): Downloading (100%)
- Installing mikevanriel/text-to-latex (1.0.1): Downloading (100%)
- Installing cebe/markdown-latex (1.1.4): Downloading (100%)
- Installing cebe/js-search (0.9.3): Downloading (100%)
- Installing nikic/php-parser (v0.9.5): Downloading (100%)
- Installing phpdocumentor/reflection-docblock (2.0.5): Downloading (100%)
- Installing phpdocumentor/reflection (1.0.7): Downloading (100%)
- Installing bower-asset/bootstrap (v3.3.7): Downloading (100%)
- Installing yiisoft/yii2-bootstrap (2.0.6): Downloading (100%)
- Installing yiisoft/yii2-apidoc (2.0.6): Downloading (100%)
- Installing yiisoft/yii2-codeception (2.0.6): Downloading (100%)
- Installing yiisoft/yii2-debug (2.0.9): Downloading (100%)
- Installing bower-asset/typeahead.js (v0.11.1): Downloading (100%)
- Installing phpspec/php-diff (v1.1.0): Downloading (100%)
- Installing yiisoft/yii2-gii (2.0.5): Downloading (100%)
- Installing fzaninotto/faker (v1.6.0): Downloading (100%)
- Installing yiisoft/yii2-faker (2.0.3): Downloading (100%)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
mrclay/minify suggests installing firephp/firephp-core (Use FirePHP for Log messages)
mrclay/minify suggests installing leafo/lessphp (LESS support)
mrclay/minify suggests installing meenie/javascript-packer (Keep track of the Packer PHP port using Composer)
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead.
Writing lock file
Generating autoload files
[root@localhost fecshop]#