Skip to content

Commit 6f0ca95

Browse files
committed
Set rates without historicalRates must be possible
1 parent ce98b5b commit 6f0ca95

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ public function getConfigTreeBuilder()
156156
->variableNode('historicalRates')
157157
->treatFalseLike(null)
158158
->treatTrueLike(null)
159-
->isRequired()
160159
->cannotBeEmpty()
161160
->validate()
162161
->ifTrue(function($config) {

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ public function provideValidProvidersConfigs()
140140
],
141141
],
142142
]],
143+
[[
144+
'array' => [
145+
'rates' => [
146+
'EUR/USD' => 1.1,
147+
'EUR/GBP' => 1.5,
148+
],
149+
],
150+
]],
143151
];
144152
}
145153

@@ -165,7 +173,6 @@ public function provideInvalidProvidersConfigs()
165173
[['array' => null]],
166174
[['array' => []]],
167175
[['array' => ['EUR/GBP' => 1.5]]],
168-
[['array' => ['rates' => ['EUR/GBP' => 1.5]]]],
169176
[['array' => ['rates' => [['EUR/GBP' => 0]]]]],
170177
[['array' => ['rates' => [['any' => 'any']]]]],
171178
[['array' => ['rates' => [['2017-01-01' => 'any']]]]],

0 commit comments

Comments
 (0)