Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eccube/feature/fix php74 deprecated type declarations #6287

Draft
wants to merge 29 commits into
base: 4.3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4eaa48e
FormType getBlockPrefix() は、必ずstring で返却ため、戻り値の型宣言を追加
ci-wataru-kashii Sep 27, 2024
c28e611
FormType configureOptions() は、必ずvoid で返却されるため、戻り値の型宣言を追加
ci-wataru-kashii Sep 27, 2024
5a590fa
FormType buildForm() は、必ずvoid で返却されるため、戻り値の型宣言を追加
ci-wataru-kashii Sep 27, 2024
d21404f
EventSubscriberInterface を搭載したイベントリスナーの getSubscribedEvents の戻り値の型宣言を追加
ci-wataru-kashii Sep 27, 2024
7b7eb4d
EccubeExtenstion メソッドの戻り値の型宣言を追加
ci-wataru-kashii Sep 27, 2024
a9226f5
Eccube\DependencyInjection\Compiler::process() メソッドの戻り値の型宣言void
ci-wataru-kashii Sep 30, 2024
899caf2
ArrayAccess::offsetExists() , ArrayAccess::offsetGet() , ArrayAccess:…
ci-wataru-kashii Sep 30, 2024
5ee9e96
Countable::count() は、int を返却するため、型宣言を追加
ci-wataru-kashii Sep 30, 2024
8a5f371
Eccube\Doctrine\ORM\Query 型宣言の追加 Doctrine\ORM\Query\AST\Functions\Fun…
ci-wataru-kashii Sep 30, 2024
ad8b090
Eccube\Doctrine\Filter 型宣言の追加 Doctrine\ORM\Query\Filter\SQLFilter::ad…
ci-wataru-kashii Sep 30, 2024
e62d0b2
Eccube\Doctrine\ORM\Mapping\Driver 内の型宣言の追加 Doctrine\Persistence\Mapp…
ci-wataru-kashii Sep 30, 2024
861d687
Eccube\Log\Logger 内の型宣言の追加 Psr\Log\LoggerInterface::log()
ci-wataru-kashii Sep 30, 2024
ed67cba
Eccube\Service\CsvImportService 内の型宣言の追加 SeekableIterator::seek()
ci-wataru-kashii Sep 30, 2024
1144028
Eccube\Command 内の型宣言の追加 Symfony\Component\Console\Command\Command::co…
ci-wataru-kashii Sep 30, 2024
35d2246
Eccube\DependencyInjection\EccubeExtension 内の型宣言の追加 Symfony\Component…
ci-wataru-kashii Sep 30, 2024
5bb8c79
Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscr…
ci-wataru-kashii Sep 30, 2024
b3df867
Eccube\Form\DataTransformer\EntityToIdTransformer 内の型宣言の追加 Symfony\Co…
ci-wataru-kashii Sep 30, 2024
f020eb5
Eccube\Session\Session 内の型宣言の追加 Symfony\Component\HttpFoundation\Sess…
ci-wataru-kashii Sep 30, 2024
765a87d
Eccube\DataCollector 内の型宣言の追加 Symfony\Component\HttpKernel\DataCollec…
ci-wataru-kashii Sep 30, 2024
3733d6f
Eccube\Security\Voter\AuthorityVoter 内の型宣言の追加 Symfony\Component\Secur…
ci-wataru-kashii Sep 30, 2024
8edaf60
fix UpdateSchemaDoctrineCommand
ci-wataru-kashii Sep 30, 2024
9e25d6c
Eccube\Entity\Customer , Eccube\Entity\Member 内の型宣言の追加 Symfony\Compon…
ci-wataru-kashii Sep 30, 2024
97d0c24
Eccube\Form\Validator 内の型宣言の追加 Symfony\Component\Validator\Constraint…
ci-wataru-kashii Sep 30, 2024
8142c4d
Eccube\Twig\Extension 内の型宣言の追加 Twig\Extension\ExtensionInterface::get…
ci-wataru-kashii Sep 30, 2024
b9a5aaf
Eccube\Twig\Template 内の型宣言の追加 Twig\Template::getDebugInfo() , Twig\Te…
ci-wataru-kashii Sep 30, 2024
8470105
Eccube\Form 内の型宣言の追加 Symfony\Component\Form\AbstractType::buildView()…
ci-wataru-kashii Sep 30, 2024
e8ee3f0
Eccube\Entity\AbstractEntity 内の型宣言の追加 ArrayAccess::offsetGet()
ci-wataru-kashii Sep 30, 2024
373ce06
use 追加
ci-wataru-kashii Sep 30, 2024
d95b3fa
fix Error: Method Eccube\Entity\AbstractEntity::offsetGet() should re…
ci-wataru-kashii Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Eccube/Command/ComposerInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public function __construct(ComposerApiService $composerService)
$this->composerService = $composerService;
}

protected function configure()
protected function configure(): void
{
$this->addOption('dry-run');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->composerService->execInstall($input->getOption('dry-run'), $output);

return 0;
return Command::SUCCESS;
}
}
6 changes: 3 additions & 3 deletions src/Eccube/Command/ComposerRemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public function __construct(ComposerApiService $composerService)
$this->composerService = $composerService;
}

protected function configure()
protected function configure(): void
{
$this->addArgument('package', InputArgument::REQUIRED);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->composerService->execRemove($input->getArgument('package'), $output);

Expand All @@ -57,7 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} catch (\Exception $e) {
$io->error($e->getMessage());

return 1;
return Command::FAILURE;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public function __construct(
$this->pluginRepository = $pluginRepository;
}

public function initialize(InputInterface $input, OutputInterface $output)
public function initialize(InputInterface $input, OutputInterface $output): void
{
$this->io = new SymfonyStyle($input, $output);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$packageNames = [];
$unSupportedPlugins = [];
Expand All @@ -90,14 +90,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
]);
$question = new ConfirmationQuestion($message);
if (!$this->io->askQuestion($question)) {
return;
return Command::FAILURE;
}
}

if ($packageNames) {
$this->composerService->execRequire(implode(' ', $packageNames), $this->io);
}

return 0;
return Command::SUCCESS;
}
}
6 changes: 3 additions & 3 deletions src/Eccube/Command/ComposerRequireCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public function __construct(ComposerApiService $composerService)
$this->composerService = $composerService;
}

protected function configure()
protected function configure(): void
{
$this->addArgument('package', InputArgument::REQUIRED)
->addArgument('version', InputArgument::OPTIONAL)
->addOption('from', null, InputOption::VALUE_OPTIONAL, 'Path of composer repository');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$packageName = $input->getArgument('package');
if ($input->getArgument('version')) {
Expand All @@ -51,6 +51,6 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->composerService->execRequire($packageName, $output, $input->getOption('from'));

return 0;
return Command::SUCCESS;
}
}
6 changes: 3 additions & 3 deletions src/Eccube/Command/ComposerUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public function __construct(ComposerApiService $composerService)
$this->composerService = $composerService;
}

protected function configure()
protected function configure(): void
{
$this->addOption('dry-run');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->composerService->execUpdate($input->getOption('dry-run'), $output);

return 0;
return Command::SUCCESS;
}
}
10 changes: 5 additions & 5 deletions src/Eccube/Command/DeleteCartsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public function __construct(EccubeConfig $eccubeConfig, EntityManagerInterface $
$this->cartRepository = $cartRepository;
}

protected function configure()
protected function configure(): void
{
$this
->setDescription('Delete Carts from the database')
->addArgument('date', InputArgument::REQUIRED, 'Deletes carts before the specified date');
}

protected function interact(InputInterface $input, OutputInterface $output)
protected function interact(InputInterface $input, OutputInterface $output): void
{
if (null !== $input->getArgument('date')) {
return;
Expand All @@ -102,15 +102,15 @@ protected function interact(InputInterface $input, OutputInterface $output)
$input->setArgument('date', $dateStr);
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$this->io = new SymfonyStyle($input, $output);
$this->locale = $this->eccubeConfig->get('locale');
$this->timezone = new \DateTimeZone($this->eccubeConfig->get('timezone'));
$this->formatter = $this->createIntlFormatter();
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$dateStr = $input->getArgument('date');
$timestamp = $this->formatter->parse($dateStr);
Expand All @@ -120,7 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

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

return 0;
return Command::SUCCESS;
}

protected function deleteCarts(\DateTime $dateTime)
Expand Down
6 changes: 3 additions & 3 deletions src/Eccube/Command/GenerateDummyDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct(Generator $generator = null, EntityManagerInterface
$this->productRepository = $productRepository;
}

protected function configure()
protected function configure(): void
{
$this
->setDescription('Dummy data generator')
Expand All @@ -81,7 +81,7 @@ protected function configure()
);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$locale = $input->getOption('with-locale');
$notImage = $input->getOption('without-image');
Expand Down Expand Up @@ -189,6 +189,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('');
$output->writeln(sprintf('%s <info>success</info>', 'eccube:fixtures:generate'));

return 0;
return Command::SUCCESS;
}
}
6 changes: 3 additions & 3 deletions src/Eccube/Command/GenerateProxyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public function __construct(EntityProxyService $entityProxyService, EccubeConfig
$this->eccubeConfig = $eccubeConfig;
}

protected function configure()
protected function configure(): void
{
$this
->setDescription('Generate entity proxies');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$projectDir = $this->eccubeConfig->get('kernel.project_dir');
$includeDirs = [$projectDir.'/app/Customize/Entity'];
Expand All @@ -66,6 +66,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output
);

return 0;
return Command::SUCCESS;
}
}
12 changes: 6 additions & 6 deletions src/Eccube/Command/InstallerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public function updateEnvFile()
};
}

protected function configure()
protected function configure(): void
{
$this
->setDescription('Install EC-CUBE');
}

protected function interact(InputInterface $input, OutputInterface $output)
protected function interact(InputInterface $input, OutputInterface $output): void
{
$this->io->title('EC-CUBE Installer Interactive Wizard');
$this->io->text([
Expand Down Expand Up @@ -209,12 +209,12 @@ protected function interact(InputInterface $input, OutputInterface $output)
$this->envFileUpdater->updateEnvFile();
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$this->io = new SymfonyStyle($input, $output);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
// Process実行時に, APP_ENV/APP_DEBUGが子プロセスに引き継がれてしまうため,
// 生成された.envをロードして上書きする.
Expand Down Expand Up @@ -254,13 +254,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
} catch (ProcessFailedException $e) {
$this->io->error($e->getMessage());

return 1;
return Command::FAILURE;
}
}

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

return 0;
return Command::SUCCESS;
}

protected function getDatabaseName($databaseUrl)
Expand Down
7 changes: 4 additions & 3 deletions src/Eccube/Command/LoadDataFixturesEccubeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Eccube\Common\EccubeConfig;
use Eccube\Entity\Member;
use Eccube\Security\PasswordHasher\PasswordHasher;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
Expand All @@ -44,7 +45,7 @@ public function __construct(ManagerRegistry $registry, EccubeConfig $eccubeConfi
$this->passwordHasher = $passwordHasher;
}

protected function configure()
protected function configure(): void
{
$this
->setDescription('Load data fixtures to your database.')
Expand All @@ -56,7 +57,7 @@ protected function configure()
);
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$em = $this->getEntityManager(null);

Expand Down Expand Up @@ -142,6 +143,6 @@ protected function execute(InputInterface $input, OutputInterface $output)

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

return 0;
return Command::SUCCESS;
}
}
10 changes: 5 additions & 5 deletions src/Eccube/Command/PluginDisableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class PluginDisableCommand extends Command
use PluginCommandTrait;
protected static $defaultName = 'eccube:plugin:disable';

protected function configure()
protected function configure(): void
{
$this
->addOption('code', null, InputOption::VALUE_OPTIONAL, 'plugin code');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);

Expand All @@ -39,21 +39,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($code)) {
$io->error('code is required.');

return 1;
return Command::FAILURE;
}

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

return 1;
return Command::FAILURE;
}

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

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

return 0;
return Command::SUCCESS;
}
}
10 changes: 5 additions & 5 deletions src/Eccube/Command/PluginEnableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class PluginEnableCommand extends Command
use PluginCommandTrait;
protected static $defaultName = 'eccube:plugin:enable';

protected function configure()
protected function configure(): void
{
$this
->addOption('code', null, InputOption::VALUE_OPTIONAL, 'plugin code');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);

Expand All @@ -39,14 +39,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($code)) {
$io->error('code is required.');

return 1;
return Command::FAILURE;
}

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

return 1;
return Command::FAILURE;
}

if (!$plugin->isInitialized()) {
Expand All @@ -58,6 +58,6 @@ protected function execute(InputInterface $input, OutputInterface $output)

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

return 0;
return Command::SUCCESS;
}
}
Loading
Loading