something like this: app- get function return 'Hi Cute. Composer : composer require silex/silex "2.0 alternatively, you can download the silex. It requires you to make your own architecture decisions. This would eliminate the dependency that the controllers have on the service locator, turning it into a real service container. Of course, those use cases are the main selling point, but they are by no means the limit of what is possible. I will not cover that here. Embed this map on your website.). In most cases it is used as a service locator, not a service container. Learn how to create a console command for Silex to clear the cache. Token- getUser : null; Is there room for improvement? ; data 'products' products, 'suggestions' suggestions, ; return app'view_factory' - create(request, data) - render private function getUser(Application app) token app'security'- getToken return token?To run the test suite, you need. Controllers in classes, this is how it is done: namespace IgorwShopController; use SilexApplication; use class ShopController public function indexAction(Request request, Application app). The SilexApplication class has two main responsibilities (yes, it's an SRP violation, deal with it Silex is a Service Container * based on pimple. Token) user token- getUser friends app'db'- fetchAll select.* from users u join purchases pu ON er_id where oduct_id IN (select product_id from purchases where user_id? How many services can I have before I should consider switching from silex to Symfony2?