弱弱的问一下关于composer update的问题

bug问题 · myred08 · 于 5年前 发布 · 3460 次阅读

按照 http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-update.html 这个说明文档对fecshop核心进行升级。

2.2 核心包以及第三方包升级:
打开根目录下面的composer.json配置文件, 找到下面的代码

"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.2.9"
   
},

疑问1: 打开根目录,这个根目录是指网站的根目录吗? 还是/www/web/fecshop/vendor/fancyecommerce/fecshop/ fecshop核心的根目录。

打开网站的根目录(/www/web/fecshop/)下的composer.json修改以下代码

    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-apidoc": "~2.0.0",
        "fancyecommerce/fecshop": ">=1.4.3.0"
    },

把 "fancyecommerce/fecshop": ">=1.4.2.1" 修改成 "fancyecommerce/fecshop": ">=1.4.3.0" 运行 composer update

[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 package information
Updating dependencies (including require-dev)                                             Nothing to install or update                                                                             
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Generating autoload files
[root@localhost fecshop]# 

更新不能成功

https://github.com/fecshop/yii2_fecshop/blob/master/composer.json 文件替换掉 网站的根目录(/www/web/fecshop/)下的composer.json。 composer update 后。

[root@localhost fecshop]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 2 updates, 56 removals  
  - Removing yiisoft/yii2-gii (2.0.7)
  - Removing yiisoft/yii2-faker (2.0.4)
  - Removing yiisoft/yii2-debug (2.0.13)
  - Removing yiisoft/yii2-bootstrap (2.0.8)
  - Removing theseer/tokenizer (1.1.0)
  - Removing symfony/yaml (v3.4.9)
  - Removing symfony/polyfill-mbstring (v1.8.0)
。。。

会删除根目录下的一些包。失败。

到/www/web/fecshop/vendor/fancyecommerce/fecshop/ fecshop核心的根目录下。把composer.json替换成https://github.com/fecshop/yii2_fecshop/blob/master/composer.json 内容

composer update

[root@localhost fecshop]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals  
  - Installing yiisoft/yii2-composer (2.0.6): Loading from cache
  - Installing swiftmailer/swiftmailer (v5.4.9): Loading from cache
  - Installing bower-asset/jquery (3.2.1): Loading from cache
  - Installing bower-asset/yii2-pjax (2.0.7.1): Loading from cache
  - Installing bower-asset/punycode (v1.3.2): Loading from cache
  - Installing bower-asset/inputmask (3.3.11): Loading from cache
  - Installing cebe/markdown (1.1.2): Loading from cache
  - Installing ezyang/htmlpurifier (v4.10.0): Loading from cache
  - Installing yiisoft/yii2 (2.0.15.1): Loading from cache
  - Installing yiisoft/yii2-swiftmailer (2.0.7): Loading from cache
  - Installing phpoffice/phpexcel (1.8.1): Loading from cache
  - Installing yiisoft/yii2-redis (2.0.8): Loading from cache
  - Installing imagine/imagine (v0.7.1): Loading from cache
  - Installing fancyecommerce/fec (1.1.3.4): Loading from cache
  - Installing fancyecommerce/fec_admin (1.3.7.0): Loading from cache
  - Installing yiisoft/yii2-mongodb (2.1.7): Loading from cache
  - Installing hightman/xunsearch (1.4.12-beta1): Loading from cache
  - Installing paragonie/random_compat (v2.0.12): Loading from cache
  - Installing ramsey/uuid (3.7.3): Loading from cache
  - Installing facebook/graph-sdk (5.6.2): Loading from cache
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
facebook/graph-sdk suggests installing guzzlehttp/guzzle (Allows for implementation of the Guzzle HTTP client)
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Writing lock file
Generating autoload files

提示成功。 但是更新的文件是在 /www/web/fecshop/vendor/fancyecommerce/fecshop/ fecshop核心的根目录下生成了一个 vendor目录。 我把/www/web/fecshop/vendor/fancyecommerce/fecshop/vendor目录移到/www/web/fecshop/去替换/www/web/fecshop/vendor/ 有重复文件选覆盖。刷新网站后主页及后台全是空白的了也没提示错误。 感觉哪里姿势不对。。。 实验了很多次。每次实验都恢复之前的备份。结果还是没成功。

共收到 8 条回复
Terry#15年前 0 个赞

1.疑问1: 打开根目录,这个根目录是指网站的根目录吗?

肯定是根目录,玩过Yii2的都知道,在根目录下面执行:composer update

2.composer update 更新不成功

1.4.3.0版本是发布了的:https://packagist.org/packages/fancyecommerce/fecshop ,你没有更新成功,是不是用了composer中国镜像或者其他的问题导致的

Terry#25年前 0 个赞

文档里面说的很清楚:

myred08#35年前 0 个赞

@Terry #1楼 确实是这个问题。把镜像改成中国的了。 按这边http://www.fancyecommerce.com/2017/04/19/composer-默认地址改为中国镜像地址,以及中国镜像地址/ 的恢复了

composer update后提示

Updating dependencies (including require-dev)                                             Your requirements could not be resolved to an installable set of packages.                               

  Problem 1
    - Installation request for fancyecommerce/fecshop >=1.4.3.0 -> satisfiable by fancyecommerce/fecshop[1.4.3.0].
    - fancyecommerce/fecshop 1.4.3.0 requires hightman/xunsearch 1.4.12-beta1 -> satisfiable by hightman/xunsearch[1.4.12-beta1] but these conflict with your requirements or minimum-stability.

[root@localhost fecshop]# 

Terry#45年前 0 个赞

稍等

Terry#55年前 1 个赞

版本发布了,试试: 1.4.3.2 版本

myred08#65年前 0 个赞

@Terry #5楼 搞定了。 升级前有更新composer

composer selfupdate
Terry#75年前 0 个赞

@myred08 #6楼 OK, 1.4.3.2 版本发布了,有问题,继续提

myred08#85年前 0 个赞

@Terry #7楼 恩,就等全没问题的一天。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics