Skip to content

Commit

Permalink
Merge pull request #233 from SvetlinStaev/master
Browse files Browse the repository at this point in the history
Added compatibility to Symfony 4.2+
  • Loading branch information
acasademont authored May 5, 2019
2 parents 281abc4 + a2bf551 commit f9f653d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ final class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$tb = new TreeBuilder();
$tb = new TreeBuilder('jms_i18n_routing');

$tb
->root('jms_i18n_routing')
->fixXmlConfig('host')
if (method_exists($tb, 'getRootNode')) {
$root = $tb->getRootNode();
} else {
$root = $tb->root('jms_i18n_routing');
}

$root
->fixXmlConfig('host')
->validate()
->always()
->then(function($v) {
Expand Down

0 comments on commit f9f653d

Please sign in to comment.