File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,19 @@ public function getConfigTreeBuilder(): TreeBuilder
51
51
->addDefaultsIfNotSet ()
52
52
->children ()
53
53
->booleanNode ('enabled ' )
54
- ->isRequired ()
55
54
->defaultFalse ()
56
55
->end ()
57
56
->enumNode ('type ' )
58
- ->isRequired ()
59
57
->defaultValue (Constants::GEOLOCATION_TYPE_MAXMIND )
60
58
->values ([Constants::GEOLOCATION_TYPE_MAXMIND ])
61
59
->end ()
62
60
->arrayNode (Constants::GEOLOCATION_TYPE_MAXMIND )
63
61
->addDefaultsIfNotSet ()
64
62
->children ()
63
+ ->enumNode ('database_type ' )
64
+ ->defaultValue (Constants::MAXMIND_COUNTRY )
65
+ ->values ([Constants::MAXMIND_COUNTRY , Constants::MAXMIND_CITY ])
66
+ ->end ()
65
67
->scalarNode ('database_path ' )
66
68
->cannotBeEmpty ()
67
69
->end ()
Original file line number Diff line number Diff line change @@ -66,4 +66,10 @@ class Constants
66
66
67
67
/** @var string The "MaxMind" geolocation type */
68
68
public const GEOLOCATION_TYPE_MAXMIND = 'maxmind ' ;
69
+
70
+ /** @var string The Maxmind "Country" database type */
71
+ public const MAXMIND_COUNTRY = 'country ' ;
72
+
73
+ /** @var string The Maxmind "City" database type */
74
+ public const MAXMIND_CITY = 'city ' ;
69
75
}
You can’t perform that action at this time.
0 commit comments