symfony/symfony — Issue #2585: [Validator] Silented array to string casting now produce a notice in php 5.4
Author: pborreli
Created: 2011-11-08 22:01:25+00:00
State: open

In PHP5.4 (trunk) since php/php-src@f9059433e0e7728641d7039744c03dfdb73b10aa casting an array will now generate a notice.

```
jenkins@server:~$ php54 -r "(string) array(0 => 'Test');"
jenkins@server:~$ php53 -r "(string) array(0 => 'Test');"
jenkins@server:~$ php54-latest -r "(string) array(0 => 'Test');"
PHP Notice: Array to string conversion in Command line code on line 1
```

This test will break : https://github.com/symfony/symfony/blob/master/tests/Symfony/Tests/Component/Validator/Constraints/AssertTypeValidatorTest.php#L106

Don't know how we should handle this, fix the casting ? skip the test if php5.4 ? what do you guys think ?