minor #17780 [TwigBridge] Symfony 3.1 forward compatibility (xabbuh)
This PR was merged into the 2.3 branch.
Discussion
----------
[TwigBridge] Symfony 3.1 forward compatibility
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17743#discussion_r52718344
| License | MIT
| Doc PR |
Commits
-------
2991639
[TwigBridge] Symfony 3.1 forward compatibility
This commit is contained in:
commit
a966a8819d
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Bridge\Twig\Extension;
|
namespace Symfony\Bridge\Twig\Extension;
|
||||||
|
|
||||||
use Symfony\Component\Yaml\Dumper as YamlDumper;
|
use Symfony\Component\Yaml\Dumper as YamlDumper;
|
||||||
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides integration of the Yaml component with Twig.
|
* 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')) {
|
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);
|
return $dumper->dump($input, $inline, 0, false, $dumpObjects);
|
||||||
|
Reference in New Issue
Block a user