Support for defining voters that don't implement the `VoterInterface` has been removed. See https://github.com/symfony/symfony/pull/23324.