public function addVoter(VoterInterface $voter)
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 2.3 and will be removed in 3.0. Pass voters in the constructor instead.', __METHOD__), E_USER_DEPRECATED);

        if ($this->voters instanceof \Traversable) {
            $this->voters = iterator_to_array($this->voters);
        }

        $this->voters[] = $voter;
    }