I have saw the patch code on floor #8, my commerce version is 8.x-2.7, but it still reported this error when I do this code:

./vendor/bin/drupal gm
TypeError: Argument 3 passed to Drupal\commerce_store\Command\CreateStoreCommand::__construct() must be an instance of CommerceGuys\Intl\Country\CountryRepositoryInterface, instance of Drupal\address\Repository\CountryRepository given in /var/www/drupal/modules/contrib/commerce/modules/store/src/Command/CreateStoreCommand.php on line 85 #0 [internal function]: Drupal\commerce_store\Command\CreateStoreCommand->__construct(Object(Drupal\commerce_price\CurrencyImporter), Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\address\Repository\CountryRepository), Object(Drupal\Core\Render\MetadataBubblingUrlGenerator), Object(Egulias\EmailValidator\EmailValidator))
#1 /var/www/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(1159): ReflectionClass->newInstanceArgs(Array)
#2 /var/www/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(623): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, 'commerce_store....')
#3 /var/www/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(588): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('commerce_store....', 1)
#4 /var/www/drupal/vendor/drupal/console-core/src/Application.php(441): Symfony\Component\DependencyInjection\ContainerBuilder->get('commerce_store....')
#5 /var/www/drupal/vendor/drupal/console-core/src/Application.php(211): Drupal\Console\Core\Application->registerCommands()
#6 /var/www/drupal/vendor/drupal/console-core/src/Application.php(116): Drupal\Console\Core\Application->loadCommands()
#7 /var/www/drupal/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/drupal/vendor/symfony/console/Application.php(148): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/drupal/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()
#10 /var/www/drupal/vendor/drupal/console/bin/drupal(4): require('/var/www/drupal...')
#11 {main}
TypeError: Argument 3 passed to Drupal\commerce_store\Command\CreateStoreCommand::__construct() must be an instance of CommerceGuys\Intl\Country\CountryRepositoryInterface, instance of Drupal\address\Repository\CountryRepository given in Drupal\commerce_store\Command\CreateStoreCommand->__construct() (line 85 of /var/www/drupal/modules/contrib/commerce/modules/store/src/Command/CreateStoreCommand.php).


CommentFileSizeAuthor
#3 2975584-address-2.patch527 bytesjohn.nie

Comments

john.lee created an issue. See original summary.

john.nie’s picture

services:
  commerce_store.commerce_create_store:
    class: Drupal\commerce_store\Command\CreateStoreCommand
    arguments: ['@commerce_price.currency_importer', '@entity_type.manager', '@address.country_repository', '@url_generator', '@email.validator']
    tags:
      - { name: drupal.command }

I found it's error from this,
should not be @address.country_repository service name.
but none CommerceGuys\Intl\Country\CountryRepositoryInterface service, what can I do this?

john.nie’s picture

StatusFileSize
new527 bytes
john.nie’s picture

Status: Active » Needs review
bojanz’s picture

Category: Bug report » Support request
Status: Needs review » Fixed

The issue is already resolved in Commerce -dev. We'll tag a new Commerce release on monday.

john.nie’s picture

Status: Fixed » Needs review

That's great, there is a similar bug with it, please review this.https://www.drupal.org/project/address/issues/2975632#comment-12630613

bojanz’s picture

Status: Needs review » Fixed

You can't set "needs review" for another issue :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.