Skip to content

Commit

Permalink
名前空間名
Browse files Browse the repository at this point in the history
ルーティング名
コマンド名
ダウンロードパッケージ名
の更新は不要のため、元の状態に戻す。
  • Loading branch information
sai-gillingham committed Sep 15, 2022
1 parent 3db5fe5 commit 87ef152
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Command/DumpAutoloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\EccubeUpdater411to412p1\Command;
namespace Plugin\EccubeUpdater411to412\Command;

use Eccube\Service\Composer\ComposerApiService;
use Symfony\Component\Console\Command\Command;
Expand All @@ -22,7 +22,7 @@

class DumpAutoloadCommand extends Command
{
protected static $defaultName = 'eccube:update411to412p1:dump-autoload';
protected static $defaultName = 'eccube:update411to412:dump-autoload';

/**
* @var ContainerInterface
Expand Down
4 changes: 2 additions & 2 deletions Command/PluginAlreadyInstalledCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\EccubeUpdater411to412p1\Command;
namespace Plugin\EccubeUpdater411to412\Command;

use Doctrine\ORM\NonUniqueResultException;
use Doctrine\ORM\NoResultException;
Expand All @@ -28,7 +28,7 @@

class PluginAlreadyInstalledCommand extends Command
{
protected static $defaultName = 'eccube:update411to412p1:plugin-already-installed';
protected static $defaultName = 'eccube:update411to412:plugin-already-installed';

/**
* @var ContainerInterface
Expand Down
4 changes: 2 additions & 2 deletions Command/UpdatePreInstallPluginsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\EccubeUpdater411to412p1\Command;
namespace Plugin\EccubeUpdater411to412\Command;

use Eccube\Repository\BaseInfoRepository;
use Eccube\Repository\PluginRepository;
Expand All @@ -24,7 +24,7 @@

class UpdatePreInstallPluginsCommand extends Command
{
protected static $defaultName = 'eccube:update411to412p1:update-pre-install-plugins';
protected static $defaultName = 'eccube:update411to412:update-pre-install-plugins';

/**
* @var ContainerInterface
Expand Down
4 changes: 2 additions & 2 deletions Common/Constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* file that was distributed with this source code.
*/

namespace Plugin\EccubeUpdater411to412p1\Common;
namespace Plugin\EccubeUpdater411to412\Common;

class Constant
{
const FROM_VERSION = '4.1.1';
const TO_VERSION = '4.1.2-p1';
const PLUGIN_CODE = 'EccubeUpdater411to412p1';
const PLUGIN_CODE = 'EccubeUpdater411to412';
}
40 changes: 21 additions & 19 deletions Controller/Admin/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\EccubeUpdater411to412p1\Controller\Admin;
namespace Plugin\EccubeUpdater411to412\Controller\Admin;

use Doctrine\ORM\NonUniqueResultException;
use Doctrine\ORM\NoResultException;
Expand All @@ -25,7 +25,7 @@
use Eccube\Service\PluginApiService;
use Eccube\Service\SystemService;
use Eccube\Util\CacheUtil;
use Plugin\EccubeUpdater411to412p1\Common\Constant as UpdaterConstant;
use Plugin\EccubeUpdater411to412\Common\Constant as UpdaterConstant;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
Expand Down Expand Up @@ -107,12 +107,14 @@ public function __construct(
}

/**
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/config", name="eccube_updater411to412p1_admin_config")
* @Template("@EccubeUpdater411to412p1/admin/config.twig")
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/config", name="eccube_updater411to412_admin_config")
* @Template("@EccubeUpdater411to412/admin/config.twig")
*/
public function index(Request $request)
{
$this->supported = version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION, '=');
$this->supported = version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION, '=') ||
version_compare(Constant::VERSION, '4.1.2', '=');
;
if (!$this->supported) {
$message = sprintf('このプラグインは%s〜%sへのアップデートプラグインです。', UpdaterConstant::FROM_VERSION,
UpdaterConstant::TO_VERSION);
Expand Down Expand Up @@ -156,8 +158,8 @@ public function index(Request $request)
/**
* プラグインのEC-CUBE対応バージョンのチェックを行う.
*
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/check_plugin_version", name="eccube_updater411to412p1_admin_check_plugin_version")
* @Template("@EccubeUpdater411to412p1/admin/check_plugin_vesrion.twig")
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/check_plugin_version", name="eccube_updater411to412_admin_check_plugin_version")
* @Template("@EccubeUpdater411to412/admin/check_plugin_vesrion.twig")
*/
public function checkPluginVersion(Request $request)
{
Expand Down Expand Up @@ -185,8 +187,8 @@ public function checkPluginVersion(Request $request)
/**
* ファイルの書き込み権限チェックを行う.
*
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/check_permission", name="eccube_updater411to412p1_admin_check_permission", methods={"POST"})
* @Template("@EccubeUpdater411to412p1/admin/check_permission.twig")
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/check_permission", name="eccube_updater411to412_admin_check_permission", methods={"POST"})
* @Template("@EccubeUpdater411to412/admin/check_permission.twig")
*/
public function checkPermission(Request $request, Filesystem $fs)
{
Expand Down Expand Up @@ -238,8 +240,8 @@ public function checkPermission(Request $request, Filesystem $fs)
/**
* 更新ファイルの競合を確認する.
*
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/check_source", name="eccube_updater411to412p1_admin_check_source", methods={"POST"})
* @Template("@EccubeUpdater411to412p1/admin/check_source.twig")
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/check_source", name="eccube_updater411to412_admin_check_source", methods={"POST"})
* @Template("@EccubeUpdater411to412/admin/check_source.twig")
*/
public function checkSource(Request $request)
{
Expand Down Expand Up @@ -295,7 +297,7 @@ public function checkSource(Request $request)
/**
* ファイルを上書きする.
*
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/update_files", name="eccube_updater411to412p1_admin_update_files", methods={"POST"})
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/update_files", name="eccube_updater411to412_admin_update_files", methods={"POST"})
*/
public function updateFiles(Request $request, CacheUtil $cacheUtil)
{
Expand All @@ -305,7 +307,7 @@ public function updateFiles(Request $request, CacheUtil $cacheUtil)

$this->systemService->switchMaintenance(true);
$phpPath = $this->getPhpPath();
$completeUrl = $this->generateUrl('eccube_updater411to412p1_admin_complete', [], UrlGeneratorInterface::ABSOLUTE_URL);
$completeUrl = $this->generateUrl('eccube_updater411to412_admin_complete', [], UrlGeneratorInterface::ABSOLUTE_URL);

$this->clearComposerCache();
$this->clearProxies();
Expand All @@ -326,13 +328,13 @@ public function updateFiles(Request $request, CacheUtil $cacheUtil)
$commands = [
'cache:clear --no-warmup',
'cache:warmup --no-optional-warmers',
'eccube:update411to412p1:plugin-already-installed',
'eccube:update411to412:plugin-already-installed',
'eccube:generate:proxies',
'doctrine:schema:update --dump-sql -f',
'doctrine:migrations:migrate --no-interaction',
'cache:clear --no-warmup',
'cache:warmup --no-optional-warmers',
'eccube:update411to412p1:dump-autoload',
'eccube:update411to412:dump-autoload',
];

log_info('Start update commands');
Expand Down Expand Up @@ -372,8 +374,8 @@ public function updateFiles(Request $request, CacheUtil $cacheUtil)
/**
* 完了画面を表示.
*
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412p1/complete", name="eccube_updater411to412p1_admin_complete")
* @Template("@EccubeUpdater411to412p1/admin/complete.twig")
* @Route("/%eccube_admin_route%/eccube_updater_411_to_412/complete", name="eccube_updater411to412_admin_complete")
* @Template("@EccubeUpdater411to412/admin/complete.twig")
*/
public function complete(CacheUtil $cacheUtil)
{
Expand Down Expand Up @@ -460,13 +462,13 @@ private function forceClearCaches()
* phpの実行パスを返す
*
* 実行パスはPhpExecutableFinderで自動探索を行います。
* PluginDir/Resource/config/services.yamlでeccube_update_plugin_411_412p1_php_pathを定義した場合、こちらが優先されます。
* PluginDir/Resource/config/services.yamlでeccube_update_plugin_411_412_php_pathを定義した場合、こちらが優先されます。
*
* @return false|string
*/
private function getPhpPath()
{
$phpPath = $this->eccubeConfig->get('eccube_update_plugin_411_412p1_php_path');
$phpPath = $this->eccubeConfig->get('eccube_update_plugin_411_412_php_path');
if ($phpPath && @is_executable($phpPath)) {
return $phpPath;
}
Expand Down
2 changes: 1 addition & 1 deletion Resource/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
parameters:
eccube_update_plugin_411_412p1_php_path: ~
eccube_update_plugin_411_412_php_path: ~
4 changes: 2 additions & 2 deletions Resource/template/admin/check_permission.twig
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
<div class="text-center">
{% if is_ok %}
<a class="btn btn-ec-conversion"
href="{{ url('eccube_updater411to412p1_admin_check_source') }}" {{ csrf_token_for_anchor() }}
href="{{ url('eccube_updater411to412_admin_check_source') }}" {{ csrf_token_for_anchor() }}
data-method="post" data-confirm="false">
ファイルの更新確認へ
</a>
{% else %}
<a class="btn btn-ec-conversion"
href="{{ url('eccube_updater411to412p1_admin_check_permission') }}" {{ csrf_token_for_anchor() }}
href="{{ url('eccube_updater411to412_admin_check_permission') }}" {{ csrf_token_for_anchor() }}
data-method="post" data-confirm="false">
更新
</a>
Expand Down
8 changes: 4 additions & 4 deletions Resource/template/admin/check_plugin_vesrion.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<div class="card rounded border-0 mb-4">
{% if is_ok %}
<div class="card-header">
<span>インストール済のプラグインはEC-CUBE{{ constant('Plugin\\EccubeUpdater411to412p1\\Common\\Constant::TO_VERSION') }}に対応しています</span>
<span>インストール済のプラグインはEC-CUBE{{ constant('Plugin\\EccubeUpdater411to412\\Common\\Constant::TO_VERSION') }}に対応しています</span>
</div>
{% else %}
<div class="card-header">
<span>以下の{{ unSupportedPlugins|length }}プラグインはEC-CUBE{{ constant('Plugin\\EccubeUpdater411to412p1\\Common\\Constant::TO_VERSION') }}に対応していません。プラグインが動作しない可能性があります。</span>
<span>以下の{{ unSupportedPlugins|length }}プラグインはEC-CUBE{{ constant('Plugin\\EccubeUpdater411to412\\Common\\Constant::TO_VERSION') }}に対応していません。プラグインが動作しない可能性があります。</span>
</div>
<div class="card-body">
<div class="row">
Expand All @@ -42,9 +42,9 @@
<div class="card-body">
<div class="text-center">
<a class="btn btn-ec-regular"
href="{{ path('eccube_updater411to412p1_admin_config') }}">中止</a>
href="{{ path('eccube_updater411to412_admin_config') }}">中止</a>
<a class="btn btn-ec-conversion"
href="{{ url('eccube_updater411to412p1_admin_check_permission') }}" {{ csrf_token_for_anchor() }}
href="{{ url('eccube_updater411to412_admin_check_permission') }}" {{ csrf_token_for_anchor() }}
data-method="post" data-confirm="false">
書き込み権限の確認へ
</a>
Expand Down
4 changes: 2 additions & 2 deletions Resource/template/admin/check_source.twig
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<div class="card-body">
<div class="text-center">
<a class="btn btn-ec-regular"
href="{{ path('eccube_updater411to412p1_admin_config') }}">中止</a>
href="{{ path('eccube_updater411to412_admin_config') }}">中止</a>
<button type="button" class="btn btn-ec-conversion" data-toggle="modal"
data-target="#copy_files">最新バージョンで上書き
</button>
Expand All @@ -87,7 +87,7 @@
<button class="btn btn-ec-sub" type="button" data-dismiss="modal">キャンセル
</button>
<a class="btn btn-ec-delete"
href="{{ url('eccube_updater411to412p1_admin_update_files') }}" {{ csrf_token_for_anchor() }}
href="{{ url('eccube_updater411to412_admin_update_files') }}" {{ csrf_token_for_anchor() }}
data-method="post" data-confirm="false">
最新バージョンで上書き
</a>
Expand Down
4 changes: 2 additions & 2 deletions Resource/template/admin/config.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>
<div class="row">
<div class="col mb-2">
phpの実行パスを確認してください。<br>表示されない場合や変更したい場合は、app/Plugin/EccubeUpdater411to412p1/Resource/config/services.yamlで実行パスを設定してください。
phpの実行パスを確認してください。<br>表示されない場合や変更したい場合は、app/Plugin/EccubeUpdater411to412/Resource/config/services.yamlで実行パスを設定してください。
</div>
</div>
</div>
Expand All @@ -62,7 +62,7 @@
<div class="card-body">
<div class="text-center">
<a class="btn btn-ec-conversion"
href="{{ url('eccube_updater411to412p1_admin_check_plugin_version') }}" {{ csrf_token_for_anchor() }}
href="{{ url('eccube_updater411to412_admin_check_plugin_version') }}" {{ csrf_token_for_anchor() }}
data-method="post" data-confirm="false">
プラグインの対応状況の確認へ
</a>
Expand Down
2 changes: 1 addition & 1 deletion Resource/template/admin/update_data.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="c-contentsArea__cols">
<div class="c-contentsArea__primaryCol">
<div class="c-primaryCol">
<form id="form" method="post" action="{{ url('eccube_updater411to412p1_admin_update_data') }}">
<form id="form" method="post" action="{{ url('eccube_updater411to412_admin_update_data') }}">
{{ form_widget(form._token) }}
<div class="card rounded border-0 mb-4">
<div class="card-header">
Expand Down
2 changes: 1 addition & 1 deletion bin/replace_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PARTIAL_NEXT_VERSION=p1
OVERRIDE_CURRENT_FROM=411
OVERRIDE_CURRENT_TO=412
OVERRIDE_CURRENT_FROM_STR=4.1.1
OVERRIDE_CURRENT_TO_STR=4.1.2
OVERRIDE_CURRENT_TO_STR=4.1.2ss

NEXT_FROM=$((NEXT_VERSION - 1))
NEXT_TO=$NEXT_VERSION
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ec-cube/eccubeupdater411to412p1",
"version": "1.0.0",
"name": "ec-cube/eccubeupdater411to412",
"version": "1.0.1",
"description": "EC-CUBEアップデートプラグイン",
"type": "eccube-plugin",
"require": {
"ec-cube/plugin-installer": "~0.0.6 || ^2.0"
},
"extra": {
"code": "EccubeUpdater411to412p1"
"code": "EccubeUpdater411to412"
}
}

0 comments on commit 87ef152

Please sign in to comment.