fabpot/Silex — pull request #483 by gigablah (2012-09-11 11:46:51+00:00)
Title: Add custom firewall types to the end of the positions array

I noticed that while the ability to define new authentication mechanisms was added in e408ca41ae8d922c33c88c5804c52c4cde42d31b, it seems to have regressed in 9022e420f97bd51f175993abbe4e38e9534fcd9c, due to the usage of a $positions array to fix the order of auth listeners. This means that custom auth listeners are never registered in the $listeners array.

To fix this, I added a bit of code to add custom firewall types to the end of the $positions array. I'm not sure if the order matters (like whether it should be placed before the "anonymous" listener) but this works for me so far.