[TwigBridge] Symfony 3.1 forward compatibility
This commit is contained in:
parent
55b71ebd93
commit
29916394f8
|
@ -12,6 +12,7 @@
|
|||
namespace Symfony\Bridge\Twig\Extension;
|
||||
|
||||
use Symfony\Component\Yaml\Dumper as YamlDumper;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
/**
|
||||
* Provides integration of the Yaml component with Twig.
|
||||
|
@ -40,7 +41,7 @@ class YamlExtension extends \Twig_Extension
|
|||
}
|
||||
|
||||
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) {
|
||||
$dumpObjects = (int) $dumpObjects;
|
||||
return $dumper->dump($input, $inline, 0, is_bool($dumpObjects) ? Yaml::DUMP_OBJECT : 0);
|
||||
}
|
||||
|
||||
return $dumper->dump($input, $inline, 0, false, $dumpObjects);
|
||||
|
|
Reference in New Issue