Giter Site home page Giter Site logo

eccube-update-plugin's Introduction

EC-CUBE アップデートプラグイン

EC-CUBE 4.2.x のマイナーバージョンアップを行うプラグインです。

事前準備

スクリプトは macOS での実行を想定しています。 gcp コマンドが利用できない場合は事前にインストールをお願いします。

brew install coreutils

アップデートプラグイン作成手順

1. ソースコード内のバージョン表記を置換

# VERSIONの情報を更新する
vi bin/replace_version.sh

NEXT_VERSIONには、アップデート後のバージョンを指定します。 例えば、4.2.2の場合は422と記載します。

NEXT_VERSION=422

OVERRIDEの部分は、前回更新したものが何から何への更新だったのかを記載します。 例えば、4.2.0から4.2.1への更新だった場合は以下のような記載になります

OVERRIDE_CURRENT_FROM=420
OVERRIDE_CURRENT_TO=421
OVERRIDE_CURRENT_FROM_STR=4.2.0
OVERRIDE_CURRENT_TO_STR=4.2.1
  • スクリプト実行
bin/replace_version.sh

2. 更新ファイルを作成

# FROM, TOを更新して保存
vi bin/update_file_hash.sh

ソースコードの取得元となるそれぞれのFrom/Toのバージョンを記載します。

FROM=4.2.1
TO=4.2.2
  • 補足 上記のFROM/TOの変数は以下のように、ソースコードの取得の際に使用します。 もし、テスト用にPreReleaseのバージョンなどで試したい場合は、変数の値を適切なものに書き換えてください。 (例えば、4.2.2-20230616 のように)
curl -L https://github.com/EC-CUBE/ec-cube/releases/download/${FROM}/eccube-${FROM}.tar.gz | tar xz --strip-components 1
curl -L https://github.com/EC-CUBE/ec-cube/releases/download/${TO}/eccube-${TO}.tar.gz | tar xz --strip-components 1

3. スクリプト実行

# 実行します(実行権限があるかを念のためご確認ください)
bin/update_file_hash.sh

4. アップデートで特別な対応が必要な場合はスクリプトを修正

アップデート時にファイルを別で作成したり削除する、コマンドを叩く必要がある、などの場合はその処理を以下のファイルに追加してください。

vi Controller/Admin/ConfigController.php

5. リリースノートを修正

アップデートプラグインを実際に使用するタイミングで、プラグインの画面に記載しておく内容があれば記載するようにします。 例えば脆弱性の対応がアップデートの内容に含まれるような場合、その注意点を記載したりします。

vi Resource/template/admin/config.twig

eccube-update-plugin's People

Contributors

chihiro-adachi avatar hiro-t59 avatar kanako-kina avatar matsuoshi avatar nanasess avatar okazy avatar ryo-endo avatar sai-gillingham avatar shinya avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eccube-update-plugin's Issues

4.0.2→4.0.3がMySQLでエラーになる

元Issue) EC-CUBE/ec-cube#4463

概要(Overview)

EccubeUpdater402to403を使用するとmysqlでエラーになる

dtb_order_item のtax_adjustは4.03で追加されたカラムが追加されず存在しないというエラーになります。

暫定回避策)
php bin/console eccube:schema:update --force --dump-sql
というコマンドを実行すればカラムが追加されると思います。

期待する内容(Expect) or 要望 (Requirement)

Updatepluginで正しくtax_adjustが追加される

再現手順(Procedure)

環境 (environment)

  • EC-CUBE: 4.0.x
  • PHP: 7.x.x
  • DB:
    • PostgreSQL x.x.x
    • MySQL x.x.x

関連情報 (Ref)

https://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=23352&forum=10&post_id=96327#forumpost96327

テンプレートにfavicon.icoがない状態でアップデートするとエラーになる

概要(Overview)

テンプレートにfavicon.icoがない状態でプラグイン(EccubeUpdater401to402)を実行するとエラーが発生した。

error

期待する内容(Expect) or 要望 (Requirement)

ファイルがなくても、エラーが発生ないようにして欲しい。
ちなみに、EccubeUpdater400to401ではエラーは発生しなかった。

環境 (environment)

  • EC-CUBE: 4.0.1
  • PHP: 7.1.20
  • DB: 5.7.25

EC-CUBEアップデートプラグイン(4.0.4〜4.0.5)でインストールができない

管理画面のプラグイン一覧よりインストール
クリックするとインストールが完了となります。

プラグイン一覧へ戻るとインストールボタンが有効のままとなり
バージョンも4.04のままとなります。
キャッシュクリア等を行っても変化はありませんでした。

何が原因でアップデートが行われないのでしょうか
対応方法をご存じの方がいらっしゃいましたらご教授いただけますでしょうか

下記にインストール完了と出ているダイアログの詳細の内容を添付いたします

**************** EccubeUpdater404to405 ****************
Deprecation warning: require.ec-cube/EccubeUpdater404to405 is invalid, it should not contain uppercase characters. Please use ec-cube/eccubeupdater404to405 instead. Make sure you fix this as Composer 2.0 will error.
[13.3MiB/1.35s] Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
[206.8MiB/2.68s] Using version ^1.0 for ec-cube/EccubeUpdater404to405
[206.8MiB/2.69s] ./composer.json has been updated
[207.1MiB/2.85s] Deprecation warning: require.ec-cube/EccubeUpdater404to405 is invalid, it should not contain uppercase characters. Please use ec-cube/eccubeupdater404to405 instead. Make sure you fix this as Composer 2.0 will error.
[210.9MiB/3.26s] Dependency "ec-cube/plugin-installer" is also a root requirement, but is not explicitly whitelisted. Ignoring.
[210.7MiB/3.26s] Loading composer repositories with package information
[212.1MiB/4.59s] Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
[212.2MiB/4.65s] Updating dependencies (including require-dev)
[678.6MiB/62.01s] Nothing to install or update
[675.8MiB/62.15s] Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
[675.8MiB/62.15s] Package easycorp/easy-log-handler is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
[675.8MiB/62.15s] Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package sensio/generator-bundle is abandoned, you should avoid using it. Use symfony/maker-bundle instead.
[675.8MiB/62.15s] Package setasign/fpdi-tcpdf is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package symfony/inflector is abandoned, you should avoid using it. Use use EnglishInflector from the String component instead instead.
[675.8MiB/62.15s] Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
[675.8MiB/62.15s] Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
[675.8MiB/62.15s] Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
[676.6MiB/62.18s] Generating optimized autoload files
[679.4MiB/77.93s] Warning: Ambiguous class resolution, "Eccube\Entity\Customer" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Customer.php" and "/home/gunmadesco/www/shop/src/Eccube/Entity/Customer.php", the first will be used.
[679.4MiB/77.93s] Warning: Ambiguous class resolution, "Eccube\Entity\Product" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Product.php" and "/home/gunmadesco/www/shop/src/Eccube/Entity/Product.php", the first will be used.
[679.4MiB/77.93s] Warning: Ambiguous class resolution, "Eccube\Entity\ProductClass" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/ProductClass.php" and "/home/gunmadesco/www/shop/src/Eccube/Entity/ProductClass.php", the first will be used.

アップデートプラグインの試験についてのメモ

テスト環境

EC-CUBE:パッケージ版を利用。gitからのcloneは利用しない。
DB:PostgreSQL、MySQLの2種で確認。SQLiteは実施不要。
Webサーバ:任意で可。PHPビルトインサーバでも問題ない。

テスト内容

  • プラグインのインストール・アンインストール・有効・無効
  • アップデートを実行し正常終了することを確認する
  • システム情報からバージョン番号を確認する
  • 会員・商品・受注の機能をフロント・管理画面ともに操作し、エラー等発生しないことを確認する
  • プラグインのインストール・アンインストールが正常に行えることを確認する
  • 新規追加された機能を操作し、エラー等発生しないことを確認する

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.