Skip to content

Commit

Permalink
change configuration root node name
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jan 24, 2017
1 parent 2d4f4c0 commit 8a0d691
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function registerBundles()
Default configuration:

```yml
gps_lab_geo_ip2:
gpslab_geoip:
# Path to download GeoIP database.
# It's a default value. You can change it.
cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb'
Expand Down
4 changes: 2 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Configuration implements ConfigurationInterface
*
* Example config:
*
* gps_lab_geo_ip2:
* gpslab_geoip:
* cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb'
* url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz'
*
Expand All @@ -28,7 +28,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
return (new TreeBuilder())
->root('gps_lab_geo_ip2')
->root('gpslab_geoip')
->children()
->scalarNode('cache')
->cannotBeEmpty()
Expand Down
8 changes: 8 additions & 0 deletions src/DependencyInjection/GpsLabGeoIP2Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ public function load(array $configs, ContainerBuilder $container)
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}

/**
* @return string
*/
public function getAlias()
{
return 'gpslab_geoip';
}
}

0 comments on commit 8a0d691

Please sign in to comment.