forked from EC-CUBE/ec-cube
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from 13watanabe/add-maintenance-mode__
(WIP)Add maintenance mode
- Loading branch information
Showing
165 changed files
with
3,210 additions
and
2,244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ composer.phar | |
.idea | ||
*.php~ | ||
.env | ||
.maintenance | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
services: | ||
easycorp.easylog.handler: | ||
class: EasyCorp\EasyLog\EasyLogHandler | ||
public: false | ||
arguments: | ||
- '%kernel.logs_dir%/%kernel.environment%/site.log' | ||
|
||
# 開発時はエラーページを表示しない | ||
Eccube\EventListener\ExceptionListener: | ||
autoconfigure: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html> | ||
<?php /* | ||
This file is part of EC-CUBE | ||
Copyright(c) LOCKON CO.,LTD. All Rights Reserved. | ||
http://www.lockon.co.jp/ | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
*/ ?> | ||
<html lang="<?php echo $locale; ?>"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title>ただいまメンテナンス中です。</title> | ||
<link rel="icon" href="<?php echo $baseUrl; ?>/html/template/<?php echo $templateCode; ?>/assets/img/common/favicon.ico"> | ||
<link rel="stylesheet" href="<?php echo $baseUrl; ?>/html/template/<?php echo $templateCode; ?>/assets/css/style.css"> | ||
</head> | ||
<body> | ||
<div class="ec-layoutRole"> | ||
<div class="ec-404Role"> | ||
<div class="ec-off4Grid"> | ||
<div class="ec-off4Grid__cell"> | ||
<div style="font-size:100px;text-align:center;"> | ||
<div class="ec-404Role__icon ec-icon"> | ||
<img src="<?php echo $baseUrl; ?>/html/template/<?php echo $templateCode; ?>/assets/icon/exclamation-pale.svg" alt=""> | ||
</div> | ||
</div> | ||
<p class="ec-404Role__title ec-reportHeading">ただいまメンテナンス中です。</p> | ||
<p class="ec-404Role__description ec-reportDescription">大変お手数ですが、しばらくしてから再度アクセスをお願いします。</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
102 changes: 102 additions & 0 deletions
102
src/Eccube/Command/ComposerRequireAlreadyInstalledPluginsCommand.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) LOCKON CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.lockon.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Eccube\Command; | ||
|
||
use Doctrine\Common\Collections\Criteria; | ||
use Eccube\Common\Constant; | ||
use Eccube\Repository\PluginRepository; | ||
use Eccube\Service\Composer\ComposerApiService; | ||
use Eccube\Service\PluginApiService; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Question\ConfirmationQuestion; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
|
||
|
||
class ComposerRequireAlreadyInstalledPluginsCommand extends Command | ||
{ | ||
protected static $defaultName = 'eccube:composer:require-already-installed'; | ||
|
||
/** | ||
* @var ComposerApiService | ||
*/ | ||
private $composerService; | ||
|
||
/** | ||
* @var PluginApiService | ||
*/ | ||
private $pluginApiService; | ||
|
||
/** | ||
* @var PluginRepository | ||
*/ | ||
private $pluginRepository; | ||
|
||
/** | ||
* @var SymfonyStyle | ||
*/ | ||
private $io; | ||
|
||
public function __construct( | ||
ComposerApiService $composerService, | ||
PluginRepository $pluginRepository, | ||
PluginApiService $pluginApiService | ||
) { | ||
parent::__construct(); | ||
$this->composerService = $composerService; | ||
$this->pluginApiService = $pluginApiService; | ||
$this->pluginRepository = $pluginRepository; | ||
} | ||
|
||
public function initialize(InputInterface $input, OutputInterface $output) | ||
{ | ||
$this->io = new SymfonyStyle($input, $output); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$packageNames = []; | ||
$unSupportedPlugins = []; | ||
|
||
$criteria = Criteria::create() | ||
->where(Criteria::expr()->neq('source', 0)) | ||
->orderBy(['code' => 'ASC']); | ||
$Plugins = $this->pluginRepository->matching($criteria); | ||
|
||
foreach ($Plugins as $Plugin) { | ||
$packageNames[] = 'ec-cube/'.$Plugin->getCode().':'.$Plugin->getVersion(); | ||
$data = $this->pluginApiService->getPlugin($Plugin->getCode()); | ||
if (isset($data['version_check']) && !$data['version_check']) { | ||
$unSupportedPlugins[] = $Plugin; | ||
} | ||
} | ||
|
||
foreach ($unSupportedPlugins as $Plugin) { | ||
$message = trans('command.composer_require_already_installed.not_supported_plugin', [ | ||
'%name%' => $Plugin->getName(), | ||
'%plugin_version%' => $Plugin->getVersion(), | ||
'%eccube_version%' => Constant::VERSION | ||
]); | ||
$question = new ConfirmationQuestion($message); | ||
if (!$this->io->askQuestion($question)) { | ||
return; | ||
} | ||
} | ||
|
||
if ($packageNames) { | ||
$this->composerService->execRequire(implode(' ', $packageNames), $this->io); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.