symfony/symfony — pull request #11976 by alexpott (2014-09-21 19:33:28+00:00)
Title: [Yaml] Ensure whole number floats have their data type is persisted.

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | no

See http://yaml.org/spec/1.1/#id858936 specifically the spec about specific data types.

Sample code that exposes the issue:
```php
$yaml = new \Symfony\Component\Yaml\Yaml();

$expected = array('float' => (float) 1);
$test = $yaml->parse($yaml->dump($expected));

if ($expected === $test) {
print "match!\n";
}
else {
var_dump($test);
}
```

This will output
```
array(1) {
'float' =>
int(1)
}
```