diff --git a/config/currencies.php b/config/currencies.php index 9d7a703..c880fd5 100644 --- a/config/currencies.php +++ b/config/currencies.php @@ -27,7 +27,7 @@ ->args([abstract_arg('currencies')]) ->set(CurrencyList::class) - ->args([param('.money_currencies')]) + ->args([param('money_currencies')]) ->tag(CurrenciesPass::TAG) ->set(ISOCurrencies::class) diff --git a/config/exchangers.php b/config/exchangers.php index a75a8a8..1ce5c42 100644 --- a/config/exchangers.php +++ b/config/exchangers.php @@ -29,7 +29,7 @@ ]) ->set(FixedExchange::class) - ->args([param('.money_exchange_fixed')]) + ->args([param('money_exchange_fixed')]) ->set(IndirectExchange::class) ->args([ diff --git a/config/formatters.php b/config/formatters.php index 1d0ae6c..7a1abaf 100644 --- a/config/formatters.php +++ b/config/formatters.php @@ -29,9 +29,9 @@ ->set(IntlNumberFormatterFactory::class) ->args([ service('request_stack')->nullOnInvalid(), - param('.money_formatter_number_locale'), - param('.money_formatter_number_style'), - param('.money_formatter_number_pattern'), + param('money_formatter_number_locale'), + param('money_formatter_number_style'), + param('money_formatter_number_pattern'), ]) ->set('money.intl.number_formatter', \NumberFormatter::class) @@ -60,7 +60,7 @@ ->set(BitcoinMoneyFormatter::class) ->args([ - param('.money_formatter_fraction_digits'), + param('money_formatter_fraction_digits'), service(Currencies::class), ]) ->tag(FormattersPass::TAG, ['code' => BitcoinCurrencies::CODE]) diff --git a/config/parsers.php b/config/parsers.php index da7e4f1..ffc4d8b 100644 --- a/config/parsers.php +++ b/config/parsers.php @@ -45,7 +45,7 @@ ->tag('money.parser') ->set(BitcoinMoneyParser::class) - ->args([param('.money_formatter_fraction_digits')]) + ->args([param('money_formatter_fraction_digits')]) ->tag('money.parser') ->alias(MoneyParser::class, AggregateMoneyParser::class) diff --git a/src/DependencyInjection/MoneyExtension.php b/src/DependencyInjection/MoneyExtension.php index 24cfdc0..edd15a6 100644 --- a/src/DependencyInjection/MoneyExtension.php +++ b/src/DependencyInjection/MoneyExtension.php @@ -37,12 +37,12 @@ public function load(array $configs, ContainerBuilder $container): void { $config = $this->processConfiguration($this->getConfiguration([], $container), $configs); - $container->setParameter('.money_currencies', $config['currencies']); - $container->setParameter('.money_formatter_fraction_digits', $config['formatters']['bitcoin']['fraction_digits']); - $container->setParameter('.money_formatter_number_locale', $config['formatters']['intl']['number_locale']); - $container->setParameter('.money_formatter_number_style', $config['formatters']['intl']['number_style']); - $container->setParameter('.money_formatter_number_pattern', $config['formatters']['intl']['number_pattern']); - $container->setParameter('.money_exchange_fixed', $config['exchanges']['fixed']); + $container->setParameter('money_currencies', $config['currencies']); + $container->setParameter('money_formatter_fraction_digits', $config['formatters']['bitcoin']['fraction_digits']); + $container->setParameter('money_formatter_number_locale', $config['formatters']['intl']['number_locale']); + $container->setParameter('money_formatter_number_style', $config['formatters']['intl']['number_style']); + $container->setParameter('money_formatter_number_pattern', $config['formatters']['intl']['number_pattern']); + $container->setParameter('money_exchange_fixed', $config['exchanges']['fixed']); $container->registerForAutoconfiguration(Currencies::class) ->addTag(CurrenciesPass::TAG); diff --git a/tests/DependencyInjection/MoneyExtensionTest.php b/tests/DependencyInjection/MoneyExtensionTest.php index 9800e53..2b0a142 100644 --- a/tests/DependencyInjection/MoneyExtensionTest.php +++ b/tests/DependencyInjection/MoneyExtensionTest.php @@ -52,8 +52,8 @@ public function testCurrencyServices(): void ->addTag('money.currencies'); }); - self::assertTrue($container->hasParameter('.money_currencies')); - self::assertSame(['FOO' => 3], $container->getParameter('.money_currencies')); + self::assertTrue($container->hasParameter('money_currencies')); + self::assertSame(['FOO' => 3], $container->getParameter('money_currencies')); $currencies = $container->get(AggregateCurrencies::class);