symfony/symfony-docs — pull request #2942 by nixilla (2013-08-28 10:10:34+00:00)
Title: Changed $task to $tag

getTags() returns collection of Tag objects therefore you want to add $tag not $task