untuk update yii2 yang pertama saya lakukan adalah berusaha mengupdate composer terlebih dahulu.
php composer.phar self-updateternyata gagal dan rollback ke versi lama,
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebugtanpa mempedulikan error tersebut saya berusaha melakukan update yii2 ke versi terbaru, siapa tahu bisa.
Updating to version 1.1.3.
Downloading: 100%
Use composer self-update --rollback to return to version 1.0.0
php composer.phar updateternyata gagal juga dan keluar error seperti ini
The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("1.0.0") that does not match your Composer installation ("1.1.0"). You may need to run composer update with the "--no-plugins" option.
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository
::whatProvides() should be compatible with Composer\Repository\ComposerRepo
sitory::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypass
Filters = false)
dari kata-kata error tersebut yaitu : The "yiisoft/yii2-composer" plugin was skipped because it requires a Plugin API version ("1.0.0") that does not match your Composer installation ("1.1.0"). You may need to run composer update with the "--no-plugins" option.
sepertinya dapat disimpulkan bahwa sebenarnya yang bikin error adalah composer yang tidak ter-update, tapi kok di update juga ga bisa? bingung.
dari saran tersebut, kayaknya kita harus menambahkan opsi --no-plugins
php composer.phar update yiisoft/yii2-composer --no-pluginsatau bisa juga dengan script ini, sama aja.
php composer.phar self-update --no-pluginsternyata success.
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebugupdate composer telah berhasil, saatnya update yii2-nya.
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing yiisoft/yii2-composer (2.0.3)
- Installing yiisoft/yii2-composer (2.0.4)
Downloading: 100%
Writing lock file
Generating autoload files
php composer.phar updateternyata masih error juga, tapi tampaknya pesan errornya sudah berubah.
[ReflectionException]ternyata sekarang asset pluginnya tidak ditemukan, entah mungkin terhapus atau tidak ter-update. kemudian saya berusaha menambahkan asset plugin kembali seperti ini :
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository
::whatProvides() should be compatible with Composer\Repository\ComposerRepo
sitory::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypass
Filters = false)
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"yah error juga
Changed current directory to C:/Users/Admin/AppData/Roaming/Composer
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository
::whatProvides() should be compatible with Composer\Repository\ComposerRepo
sitory::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypass
Filters = false)
kemudian saya coba dengan mengupdate nya dengan tambahan opsi --no-plugins
php composer.phar global update fxp/composer-asset-plugin --no-plugins
ternyata success,
Changed current directory to C:/Users/Admin/AppData/Roaming/Composer
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing fxp/composer-asset-plugin (v1.1.1)
- Installing fxp/composer-asset-plugin (v1.1.4)
Downloading: 100%
Writing lock file
Generating autoload files
kemudian saya coba lagi update yii2
php composer.phar updatedan kali ini berhasil update ke versi terbaru dengan menggunakan composer.
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing bower-asset/fontawesome (v4.5.0)
- Removing swiftmailer/swiftmailer (v5.4.1)
- Installing swiftmailer/swiftmailer (v5.4.2)
Downloading: 100%
................................................
Writing lock file
Generating autoload files
nice
ReplyDelete