Skip to content

Add CLI command for setting up states/regions for additional countries#2959

Merged
dpfaffenbauer merged 3 commits into4.1from
copilot/add-cli-command-for-markets
Jan 29, 2026
Merged

Add CLI command for setting up states/regions for additional countries#2959
dpfaffenbauer merged 3 commits into4.1from
copilot/add-cli-command-for-markets

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Only Austria (AT) and its states are created during installation. Additional countries/states require manual maintenance, creating high effort and error-prone configuration in multi-market setups.

Changes

  • New command coreshop:setup:states: Creates states/regions for specified countries using existing Rinvex country data
    • Accepts comma-separated ISO codes
    • Skips existing states to prevent duplicates
    • Optional --activate-country flag to activate inactive countries
  • Service registration in commands.yml
  • Documentation added to States section

Usage

# Single country
php bin/console coreshop:setup:states DE

# Multiple countries with activation
php bin/console coreshop:setup:states DE,US,FR --activate-country

The implementation follows the same patterns used in CountryFixture.php for consistency.

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing Migrations / Commands for Additional Markets</issue_title>
<issue_description>Problem Statement
The creation of additional markets and their corresponding states/regions is not automated.

Description

  • During installation, only AT (Austria) and Austrian states are created by default.
  • Additional countries or states must be maintained manually.
  • There is no migration or CLI command available to initialize further markets.

Impact

  • High manual effort in multi-market setups.
  • Error-prone manual configuration.

Mitigation

  • Provide a CLI command (e.g. coreshop:setup:states).
  • Alternatively, provide configurable migrations for countries/states.
  • Alternatively, allow markets to be defined declaratively (e.g. YAML/config) and created automatically.

@raphael-kat @papillo-solutions</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 29, 2026 11:47
Co-authored-by: dpfaffenbauer <5981845+dpfaffenbauer@users.noreply.github.com>
Co-authored-by: dpfaffenbauer <5981845+dpfaffenbauer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLI command for initializing additional markets Add CLI command for setting up states/regions for additional countries Jan 29, 2026
Copilot AI requested a review from dpfaffenbauer January 29, 2026 11:49
@sonarqubecloud
Copy link

@dpfaffenbauer dpfaffenbauer marked this pull request as ready for review January 29, 2026 19:31
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@dpfaffenbauer dpfaffenbauer merged commit 0ba0672 into 4.1 Jan 29, 2026
92 of 93 checks passed
@dpfaffenbauer dpfaffenbauer deleted the copilot/add-cli-command-for-markets branch January 29, 2026 19:55
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants