Closed fredr closed 12 years ago
or is it me doing something crazy here?
It doesn't work for me either, whether I use the latest "phar" version (Silex version 535c1cb 2011-10-09 11:28:30 +0200
) or the Git master branch up-to-date files...
However, it really seems to be the correct use of ControllerProviderInterface
?
Its most likely because you have defined a route for "get /" before you mounted "/test". Just move the mounting code to the beginning of index.php. This is how I've done it and it works for me.
That said, what you're describing does seem to be a sort of buggish behavior.
I tried what you explained, and it still doesn't work for me. Strange... :-/
Me too, what version of silex are you using @mgatto ? Does my code differ in any other way from yours?
I think @fredr and I got the same problem :
Yes indeed, this is probably the same bug ! :-)
This bug has been fixed by @igorw in ef75e13b62 ; it can be closed.
Then I'll close it! Thanks!
When adding a ControllerCollection, and mounting that to let's say /test and the adding a path to "/" in that ControllerCollection, I get
NotFoundHttpException: No route found for "GET /test/"
when trying to access www.addresstomy.app/test/But when I add a path, lets say /yes to my ControllerCollection, accessing www.addresstomy.app/test/yes will work
I've put together a little test below, it's been tested on f400c25 and 535c1cb, accessing /test works fine in f400c25, but not in 535c1cb
If I remove the "/" route that is defined in index.php (www.addresstomy.app/) below, /test/ will work in the new version of silex as well.
Working version Silex version f400c25 2011-09-22 11:05:30 +0200
Non working version Silex version 535c1cb 2011-10-09 11:28:30 +0200
This is my example app
index.php
TestControllerProvider.php