Skip to content

Commit

Permalink
Merge pull request #5093 from nanasess/composer2.1-update
Browse files Browse the repository at this point in the history
Apply composer update
  • Loading branch information
okazy authored Jul 21, 2021
2 parents c2a3e78 + ffdfb36 commit b51348f
Show file tree
Hide file tree
Showing 28 changed files with 814 additions and 643 deletions.
1,370 changes: 739 additions & 631 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Eccube/Command/ComposerInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->composerService->execInstall($input->getOption('dry-run'), $output);

return 0;
}
}
4 changes: 3 additions & 1 deletion src/Eccube/Command/ComposerRemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
try {
/* @var Command $command */
$command = $this->getApplication()->get('cache:clear');
$command->run(new ArrayInput([
return $command->run(new ArrayInput([
'command' => 'cache:clear',
'--no-warmup' => true,
]), $io);
} catch (\Exception $e) {
$io->error($e->getMessage());

return 1;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($packageNames) {
$this->composerService->execRequire(implode(' ', $packageNames), $this->io);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/ComposerRequireCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$packageName .= ':'.$input->getArgument('version');
}
$this->composerService->execRequire($packageName, $output);

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/ComposerUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->composerService->execUpdate($input->getOption('dry-run'), $output);

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/DeleteCartsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->deleteCarts($dateTime);

$this->io->success('Delete carts successful.');

return 0;
}

protected function deleteCarts(\DateTime $dateTime)
Expand Down
2 changes: 2 additions & 0 deletions src/Eccube/Command/GenerateDummyDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$output->writeln('');
$output->writeln(sprintf('%s <info>success</info>', 'eccube:fixtures:generate'));

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/GenerateProxyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$projectDir.'/app/proxy/entity',
$output
);

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/InstallerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$this->io->success('EC-CUBE installation successful.');

return 0;
}

protected function getDatabaseName($databaseUrl)
Expand Down
2 changes: 2 additions & 0 deletions src/Eccube/Command/LoadDataFixturesEccubeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf(' <comment>></comment> <info>%s</info>', 'Finished Successful!'));

return 0;
}
}
6 changes: 4 additions & 2 deletions src/Eccube/Command/PluginDisableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($code)) {
$io->error('code is required.');

return;
return 1;
}

$plugin = $this->pluginRepository->findByCode($code);
if (is_null($plugin)) {
$io->error("Plugin `$code` is not found.");

return;
return 1;
}

$this->pluginService->disable($plugin);
$this->clearCache($io);

$io->success('Plugin Disabled.');

return 0;
}
}
6 changes: 4 additions & 2 deletions src/Eccube/Command/PluginEnableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($code)) {
$io->error('code is required.');

return;
return 1;
}

$plugin = $this->pluginRepository->findByCode($code);
if (is_null($plugin)) {
$io->error("Plugin `$code` is not found.");

return;
return 1;
}

if (!$plugin->isInitialized()) {
Expand All @@ -57,5 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->clearCache($io);

$io->success('Plugin Enabled.');

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/PluginGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->createGithubActions($pluginDir);

$this->io->success(sprintf('Plugin was successfully created: %s %s %s', $name, $code, $version));

return 0;
}

public function validateCode($code)
Expand Down
2 changes: 2 additions & 0 deletions src/Eccube/Command/PluginInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$io->error('path or code is required.');

return 1;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/PluginSchemaUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->clearCache($io);

$io->success('Schema Updated.');

return 0;
}
}
6 changes: 4 additions & 2 deletions src/Eccube/Command/PluginUninstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($code)) {
$io->error('code is required.');

return;
return 1;
}

$plugin = $this->pluginRepository->findByCode($code);
if (is_null($plugin)) {
$io->error("Plugin `$code` is not installed.");

return;
return 1;
}

$this->pluginService->uninstall($plugin, $uninstallForce);
$this->clearCache($io);

$io->success('Uninstalled.');

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Command/PluginUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->clearCache($io);

$io->success('Updated.');

return 0;
}
}
2 changes: 1 addition & 1 deletion src/Eccube/Command/UpdateSchemaDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}, $generateAllFiles, $tmpProxyOutputDir, $tmpMetaDataOutputDir);

return $result;
return (int) $result;
} finally {
$this->removeOutputDir($tmpMetaDataOutputDir);
$this->removeOutputDir($tmpProxyOutputDir);
Expand Down
5 changes: 4 additions & 1 deletion src/Eccube/Controller/AbstractShoppingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Eccube\Service\PurchaseFlow\PurchaseContext;
use Eccube\Service\PurchaseFlow\PurchaseFlow;
use Eccube\Service\PurchaseFlow\PurchaseFlowResult;
use Symfony\Component\HttpFoundation\RedirectResponse;

class AbstractShoppingController extends AbstractController
{
Expand All @@ -38,7 +39,7 @@ public function setPurchaseFlow(PurchaseFlow $shoppingPurchaseFlow)
* @param ItemHolderInterface $itemHolder
* @param bool $returnResponse レスポンスを返すかどうか. falseの場合はPurchaseFlowResultを返す.
*
* @return PurchaseFlowResult|\Symfony\Component\HttpFoundation\RedirectResponse
* @return PurchaseFlowResult|RedirectResponse|null
*/
protected function executePurchaseFlow(ItemHolderInterface $itemHolder, $returnResponse = true)
{
Expand Down Expand Up @@ -66,5 +67,7 @@ protected function executePurchaseFlow(ItemHolderInterface $itemHolder, $returnR

return $this->redirectToRoute('shopping');
}

return null;
}
}
9 changes: 8 additions & 1 deletion src/Eccube/Controller/Admin/Order/EditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
use Knp\Component\Pager\PaginatorInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\RouterInterface;
Expand Down Expand Up @@ -413,7 +414,7 @@ public function index(Request $request, $id = null, RouterInterface $router)
* @param Request $request
* @param integer $page_no
*
* @return \Symfony\Component\HttpFoundation\JsonResponse
* @return array
*/
public function searchCustomerHtml(Request $request, $page_no = null, PaginatorInterface $paginator)
{
Expand Down Expand Up @@ -497,6 +498,8 @@ public function searchCustomerHtml(Request $request, $page_no = null, PaginatorI
'pagination' => $pagination,
];
}

throw new BadRequestHttpException();
}

/**
Expand Down Expand Up @@ -560,6 +563,8 @@ public function searchCustomerById(Request $request)

return $this->json($data);
}

throw new BadRequestHttpException();
}

/**
Expand Down Expand Up @@ -685,5 +690,7 @@ public function searchOrderItemType(Request $request)
'OrderItemTypes' => $OrderItemTypes,
];
}

throw new BadRequestHttpException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,7 @@ public function moveSortNo(Request $request)

return new Response();
}

throw new BadRequestHttpException();
}
}
4 changes: 3 additions & 1 deletion src/Eccube/Controller/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function index(Request $request)
/**
* @param $Carts
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @return \Symfony\Component\HttpFoundation\RedirectResponse|null
*/
protected function execPurchaseFlow($Carts)
{
Expand Down Expand Up @@ -170,6 +170,8 @@ protected function execPurchaseFlow($Carts)
}
}
}

return null;
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/Eccube/Controller/ShoppingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ protected function executeApply(PaymentMethodInterface $paymentMethod)
*
* @param PaymentMethodInterface $paymentMethod
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
* @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response|null
*/
protected function executeCheckout(PaymentMethodInterface $paymentMethod)
{
Expand All @@ -793,5 +793,7 @@ protected function executeCheckout(PaymentMethodInterface $paymentMethod)

return $this->redirectToRoute('shopping_error');
}

return null;
}
}
4 changes: 4 additions & 0 deletions src/Eccube/Service/Payment/Method/Cash.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public function apply()
public function setFormType(FormInterface $form)
{
$this->form = $form;

return $this;
}

/**
Expand All @@ -93,5 +95,7 @@ public function verify()
public function setOrder(Order $Order)
{
$this->Order = $Order;

return $this;
}
}
2 changes: 2 additions & 0 deletions src/Eccube/Service/Payment/Method/CreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ abstract public function setFormType(FormInterface $form);
public function setOrder(Order $Order)
{
$this->Order = $Order;

return $this;
}
}
1 change: 1 addition & 0 deletions src/Eccube/Twig/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function getTemplateName()
public function getDebugInfo()
{
// Templateのキャッシュ作成時に動的に作成されるメソッド
return [];
}

protected function doDisplay(array $context, array $blocks = [])
Expand Down
6 changes: 6 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"composer/composer": {
"version": "1.5.5"
},
"composer/metadata-minifier": {
"version": "1.0.0"
},
"composer/semver": {
"version": "1.4.2"
},
Expand Down Expand Up @@ -233,6 +236,9 @@
"php": {
"version": "7.1.3"
},
"php-coveralls/php-coveralls": {
"version": "v2.4.3"
},
"php-cs-fixer/diff": {
"version": "v1.2.0"
},
Expand Down

0 comments on commit b51348f

Please sign in to comment.