This is not the right way to check for Doctrine proxies (you can have lots of false positive with your stripos detection).

- You should be using ``Doctrine\Common\Util\ClassUtils::getRealClass($class)`` to resolve proxies (available since Common 2.2, so it is usable in all Symfony 2.1+ projects)
- Your voter should support all child classes of Post according to the rules of OOP, not only the exact match on the class