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).
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2975584-address-2.patch | 527 bytes | john.nie |
Comments
Comment #2
john.nie commentedI 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?
Comment #3
john.nie commentedComment #4
john.nie commentedComment #5
bojanz commentedThe issue is already resolved in Commerce -dev. We'll tag a new Commerce release on monday.
Comment #6
john.nie commentedComment #7
john.nie commentedThat's great, there is a similar bug with it, please review this.https://www.drupal.org/project/address/issues/2975632#comment-12630613
Comment #8
bojanz commentedYou can't set "needs review" for another issue :)