I have a symfony voter in a bundle that lives in the vendor folder. it works as expected:
class PlaylistVoter extends Voter
{
public function __construct()
{}
protected function supports($attribute, $subject)
{}
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
{
if(<someclause>) {
return true;
}
return false;
}
}
I am now configuring another voter, but this is in the symfony core (/src/mybundle). It is pretty much the same as the previous one, only the content of the voteOnAttribute method changes.
Using breakpoints, I can see the voteOnAttribute method in the voter in vendor gets called as expected, but the one in the voter in the core never gets called.
using debug:container, I can see they are both correctly configured. Also I can see the constructor gets called, but voteOnAttribute gets not.
thanks for any suggestion.