sensio/SensioFrameworkExtraBundle — pull request #183 by borisguery (2012-12-27 16:01:46+00:00)
Title: DoctrineParamConverter should allow 0 as valid identifier

Use case:

* I've a route like `/items/{item}` where item is an unique number.

* If I try to fetch the item identified by a `0` it throws

`\LogicException('Unable to guess how to get a Doctrine instance from the request information.');`

This is because in the `find()` method it "validates" the identifier as being not false but without strict type check resulting in `0` being evaluated to `false`, which is, strictly speaking, wrong.

[DoctrineParamConverter.php::find()](https://github.com/sensio/SensioFrameworkExtraBundle/blob/946f74bd4aa78b311c08b14f8a934ec30f20defd/Request/ParamConverter/DoctrineParamConverter.php#L71)

I wrote a test case which fails when using a 0 as an identifier and a fix using a strict type check to get ride of this.