Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '*.php'
- 'src/**'
- '.github/workflows/behat.yml'
pull_request_target:
pull_request:
branches: [ '5.0', 'next' ]
paths:
- 'composer.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/behat_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '*.php'
- 'src/**'
- '.github/workflows/behat_ui.yml'
pull_request_target:
pull_request:
branches: [ '5.0', 'next' ]
paths:
- 'composer.json'
Expand Down
17 changes: 8 additions & 9 deletions src/CoreShop/Bundle/CoreBundle/Command/SetupStatesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
/*
* CoreShop
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - CoreShop Commercial License (CCL)
* This source file is available under the terms of the
* CoreShop Commercial License (CCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.com)
* @license https://www.coreshop.com/license GPLv3 and CCL
* @license CoreShop Commercial License (CCL)
*
*/

Expand Down Expand Up @@ -114,7 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($activateCountry && !$country->getActive()) {
$country->setActive(true);
$this->entityManager->persist($country);
$activatedCountries++;
++$activatedCountries;
$io->writeln(sprintf(' <comment>Activated country: %s</comment>', $countryCode));
}

Expand All @@ -123,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

if (!is_array($divisions) || empty($divisions)) {
$io->writeln(sprintf(' <comment>No divisions/states found for %s</comment>', $countryCode));
$countriesProcessed++;
++$countriesProcessed;

continue;
}
Expand All @@ -140,7 +139,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
]);

if ($existingState !== null) {
$skippedStates++;
++$skippedStates;
$io->writeln(sprintf(' <comment>Skipping existing state: %s (%s)</comment>', $division['name'], $isoCode), OutputInterface::VERBOSITY_VERBOSE);

continue;
Expand All @@ -160,12 +159,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$state->setActive(true);

$this->entityManager->persist($state);
$createdStates++;
++$createdStates;

$io->writeln(sprintf(' <info>Created state: %s (%s)</info>', $division['name'], $isoCode), OutputInterface::VERBOSITY_VERBOSE);
}

$countriesProcessed++;
++$countriesProcessed;
}

$this->entityManager->flush();
Expand Down
Loading
Loading