Memo

メモ > 技術 > CMS: ECCube > プラグインの導入: プラグインをアップデートしたときの挙動を検証

プラグインの導入: プラグインをアップデートしたときの挙動を検証
※クレジットカード決済を「本人認証(3Dセキュア)」に対応させたときのメモ VeriTrans4G決済プラグインの場合、以下の手順でアップデートできた
# メンテナス状態に変更 echo auto_maintenance_update > ./.maintenance # プラグインを無効化 php bin/console eccube:plugin:disable --code=VeriTrans4G # EC-CUBEプラグインのダウンロードと依存ライブラリのダウンロード php bin/console eccube:composer:require ec-cube/VeriTrans4G # キャッシュ削除 php bin/console cache:clear --no-warmup # ダウンロードしたプラグインを適用(バージョン情報がDBにも反映される) php bin/console eccube:plugin:update VeriTrans4G # プラグインを有効化 php bin/console eccube:plugin:enable --code=VeriTrans4G # メンテナス解除 rm ./.maintenance # キャッシュ再生成 php bin/console cache:warmup
注文時に「クレジットカード払い」を選択すると、即座に「クレジットカード決済」フォームが表示された。画面レイアウトの調整は必要 注文完了時、完了画面の表示前にDGFTと通信しているような挙動が見られた 管理画面で、「売上確定(実売上)実行」からひととおりの操作ができた また管理画面「設定 → 店舗設定 → 支払方法設定 → クレジットカード払い」に「本人認証(3Dセキュア)」があるので、これを「利用する」に変更する ■エラー1 「管理画面 → オーナーズストア → プラグイン → プラグインを探す」に「VeriTrans4G決済プラグイン(4.0系)」があるので、「アップデート」ボタンをクリック プラグインの説明ページが表示されるので、「インストール」ボタンをクリック 1分ほど待つと以下のエラーが表示された
Changed CWD to /var/www/html Reading ./composer.json Loading config file ./composer.json Executing command (/var/www/html): git branch --no-color --no-abbrev -v <warning>Deprecation warning: require.ec-cube/CsvImportProductExt4 is invalid, it should not contain uppercase characters. Please use ec-cube/csvimportproductext4 instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/CustomerPlus4 is invalid, it should not contain uppercase characters. Please use ec-cube/customerplus4 instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/CustomerPlusAddonSearch is invalid, it should not contain uppercase characters. Please use ec-cube/customerplusaddonsearch instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/CustomerRank is invalid, it should not contain uppercase characters. Please use ec-cube/customerrank instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/ProductPlus is invalid, it should not contain uppercase characters. Please use ec-cube/productplus instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/ProductReview4 is invalid, it should not contain uppercase characters. Please use ec-cube/productreview4 instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/SalesReport4 is invalid, it should not contain uppercase characters. Please use ec-cube/salesreport4 instead. Make sure you fix this as Composer 2.0 will error.</warning> <warning>Deprecation warning: require.ec-cube/VeriTrans4G is invalid, it should not contain uppercase characters. Please use ec-cube/veritrans4g instead. Make sure you fix this as Composer 2.0 will error.</warning> In Filesystem.php line 217: [RuntimeException] Could not delete /var/www/html/app/Plugin/.composer/cache/files/jms/job-que ue-bundle/a0b969396bec75e6dbc6593be5b8e6949bbda83b.zip: The "Eccube\Service \Composer\ComposerApiService" service is private, getting it from the conta iner is deprecated since Symfony 3.2 and will fail in 4.0. You should eithe r make the service public, or stop using the container directly and use dep endency injection instead. Exception trace: at /var/www/html/vendor/composer/composer/src/Composer/Util/Filesystem.php:217 Composer\Util\Filesystem->unlink() at /var/www/html/vendor/composer/composer/src/Composer/Cache.php:207 Composer\Cache->gc() at /var/www/html/vendor/composer/composer/src/Composer/Downloader/FileDownloader.php:69 Composer\Downloader\FileDownloader->__construct() at /var/www/html/vendor/composer/composer/src/Composer/Downloader/XzDownloader.php:37 Composer\Downloader\XzDownloader->__construct() at /var/www/html/vendor/composer/composer/src/Composer/Factory.php:491 Composer\Factory->createDownloadManager() at /var/www/html/vendor/composer/composer/src/Composer/Factory.php:360 Composer\Factory->createComposer() at /var/www/html/vendor/composer/composer/src/Composer/Factory.php:576 Composer\Factory::create() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:354 Composer\Console\Application->getComposer() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:471 Composer\Console\Application->getPluginCommands() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:169 Composer\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application->run() at /var/www/html/vendor/composer/composer/src/Composer/Console/Application.php:106 Composer\Console\Application->run() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:312 Eccube\Service\Composer\ComposerApiService->runCommand() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:245 Eccube\Service\Composer\ComposerApiService->execConfig() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:363 Eccube\Service\Composer\ComposerApiService->init() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:296 Eccube\Service\Composer\ComposerApiService->runCommand() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:83 Eccube\Service\Composer\ComposerApiService->execInfo() at /var/www/html/src/Eccube/Service/Composer/ComposerApiService.php:207 Eccube\Service\Composer\ComposerApiService->foreachRequires() at /var/www/html/src/Eccube/Service/PluginService.php:798 Eccube\Service\PluginService->getPluginRequired() at /var/www/html/src/Eccube/Controller/Admin/Store/OwnerStoreController.php:232 Eccube\Controller\Admin\Store\OwnerStoreController->doConfirm() at /var/www/html/vendor/symfony/http-kernel/HttpKernel.php:151 Symfony\Component\HttpKernel\HttpKernel->handleRaw() at /var/www/html/vendor/symfony/http-kernel/HttpKernel.php:68 Symfony\Component\HttpKernel\HttpKernel->handle() at /var/www/html/vendor/symfony/http-kernel/Kernel.php:200 Symfony\Component\HttpKernel\Kernel->handle() at /var/www/html/index.php:84
管理画面からではなく、コマンドラインでアップデートを行う方が良さそう ■エラー2 コマンドラインでアップデートを行なったが、キャッシュ再生成の際に以下のエラーになった
# php bin/console cache:warmup // Warming up the cache for the dev environment with debug true PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/twig/twig/src/Node/Node.php on line 168 18:00:29 CRITICAL [php] Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) ["exception" => Symfony\Component\Debug\Exception\OutOfMemoryException { …}] ["file" => "/var/www/html/vendor/symfony/debug/ErrorHandler.php","line" => 584,"class" => "Symfony\Component\Debug\ErrorHandler","function" => "handleException","uid" => "f33d07c","user_id" => "N/A","session_id" => "N/A"] In Node.php line 168: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) cache:warmup [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 90112 bytes) in /var/www/html/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php on line 84 Segmentation fault
メモリ不足なので、bin/console の10行目に以下を追加して再実行した これなら完了できた(完了後、追加したコードは削除した)
ini_set('memory_limit', '512M');

Advertisement