Commit fd899d80 authored by bojanz's avatar bojanz
Browse files

Issue #2866521 by bojanz: Stop overriding CountryManager

parent 722367b0
<?php
namespace Drupal\address;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
use Symfony\Component\DependencyInjection\Reference;
/**
* Overrides the country_manager service.
*/
class AddressServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container->getDefinition('country_manager');
$definition
->setClass('Drupal\address\Repository\CountryRepository')
->setArguments([new Reference('cache.default'), new Reference('language_manager')]);
}
}
......@@ -6,14 +6,13 @@ use CommerceGuys\Intl\Country\CountryRepository as ExternalCountryRepository;
use CommerceGuys\Addressing\Country\CountryRepositoryInterface as ExternalCountryRepositoryInterface;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Locale\CountryManagerInterface;
/**
* Defines the country repository.
*
* Countries are stored on disk in JSON and cached inside Drupal.
*/
class CountryRepository extends ExternalCountryRepository implements ExternalCountryRepositoryInterface, CountryManagerInterface {
class CountryRepository extends ExternalCountryRepository implements ExternalCountryRepositoryInterface {
/**
* The cache backend.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment