Hi,
I have found a weird behavior in the Doctrine Admin Generator when I use filters in the right sidebar. Consider I have a ShopProduct? model that stores information for my products. A product has a "stock" column to store the current stock. This field is an integer, whose domain is [0 to infinite].
In the generated admin, if I set 30 in the stock filter field, the list is correctly filtered with products whose stock is 30. But, if I try to filter on products, which have a stock at 0, no criteria is added to the query. So the complete products list is displayed.
The problem comes from the sfFormFilterDoctrine class at line 248 in the addNumberQuery() method. In the "elseif" statement, the final condition ( != $valuestext? ) returns a FALSE as the value 0 is considered like an empty string or a FALSE. So, to fix that bug, this statement should be removed or an extra equal symbol must be added : !== $valuestext?.
I have added a patch with my ticket.
Hugo.