- 19 Jun, 2012 9 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
- 18 Jun, 2012 7 commits
-
-
Fabien Potencier authored
Commits ------- 030713de Monolog class is configurable Discussion ---------- Monolog logger class is configurable and accessible As an alternative to #379 --------------------------------------------------------------------------- by igorw at 2012-06-18T13:43:36Z
👍 -
Fabien Potencier authored
Commits ------- c463a6e1 added some unit tests e29c91ed added an exception when a method does not exist to ease debugging 3fd92830 made controller methods (before, after, ...) extensible Discussion ---------- made controller methods (before, after, ...) extensible You can now add your own methods on controllers (like the built-in after, before, convert, ...) by defining your own Route class: class MyRoute extends Route { public function secure($roles, $app) { // do something } } and then change the "route_factory" accordingly: $this['route_factory'] = function () { return new MyRoute(); }; If you want to benefit from the new methods in a custom controller collection, pass an instance of your Route to the ControllerCollection constructor: $controllers = new ControllerCollection(new MyRoute()); or even better, use the "controllers_factory" service: $controllers = $app['controllers_factory']; The limitation is that you can only have one custom Route class in an Application. But this PR is just the first step. Thanks to PHP 5.4 and the new traits support, the next pull request (#378) uses this new refactoring to provide traits that you can add to your custom Application Route class. --------------------------------------------------------------------------- by igorw at 2012-06-18T12:13:33Z Looks good to me. One thing, what about a method_exists() in `__call` to give a better error message? --------------------------------------------------------------------------- by fabpot at 2012-06-18T17:41:34Z I've added an exception for when the method does not exist. --------------------------------------------------------------------------- by fabpot at 2012-06-18T18:03:00Z And now with some unit tests. --------------------------------------------------------------------------- by igorw at 2012-06-18T18:33:33Z
👍 -
Fabien Potencier authored
-
Fabien Potencier authored
-
Dave Marshall authored
-
Fabien Potencier authored
You can now add your own methods on controllers (like the built-in after, before, convert, ...) by defining your own Route class: class MyRoute extends Route { public function secure($roles, $app) { // do something } } and then change the route class accordingly: $this['route_class'] = 'MyRoute'; or change the "route_factory" if you need to pass some arguments to the route constructor: $this['route_factory'] = function () { return new MyRoute(); }; If you want to benefit from the new methods in a custom controller collection, pass an instance of your Route to the ControllerCollection constructor: $controllers = new ControllerCollection(new MyRoute()); or even better, use the "controllers_factory" service: $controllers = $app['controllers_factory']; The limitation is that you can only have one custom Route class in an Application. But this PR is just the first step. Thanks to PHP 5.4 and the new traits support, the next pull request will use this new refactoring to provide traits that you will be able to add to your custom Application Route class.
-
Fabien Potencier authored
-
- 17 Jun, 2012 15 commits
-
-
Fabien Potencier authored
Commits ------- e35830cf added missing php command Discussion ---------- Added missing php command --------------------------------------------------------------------------- by stof at 2012-06-17T20:34:18Z if you make the phar executable, it will work without using ``php``, thanks to the shebang. But adding the command is indeed a good idea for windows users.
-
Fabien Potencier authored
-
Fabien Potencier authored
Commits ------- 64cb149a Added a default translator.domains c0321197 [Doc] Fixed typo in translator recipes Discussion ---------- Fix translation Fixed a typo in the doc + Added a default translator.domains : If someone registers its translations via yaml, he will not provide $app['translator.domains'], so pimple will raise an exeption. I don't know if it's better to set a default $app['translator.domains'] or to checks if it set before using it.
-
Grégoire Pineau authored
If someone registers its translation via yaml, he will not provide $app['translator.domains'], so pimple will raise an exeption.
-
Grégoire Pineau authored
-
Besnik Br. authored
-
Fabien Potencier authored
-
Fabien Potencier authored
Commits ------- ebd3bbca [docs] Add config example for lighttpd Discussion ---------- [docs] Add config example for lighttpd --------------------------------------------------------------------------- by fabpot at 2012-06-15T17:11:49Z This is a very specific configuration (assets, ...). I don't see any value to add that to the Silex documentation. --------------------------------------------------------------------------- by j0k3r at 2012-06-16T11:06:48Z I can remove the assets & favicon part. I know that few people were looking for the lighttpd configuration for Silex. I put this few lines in the readme file of one my little project so I thought it would be worth it in the official documentation.
-
Fabien Potencier authored
-
Fabien Potencier authored
Commits ------- 51596d47 Fixed a bug when using http authentication on the security service provider Discussion ---------- Fixed a bug when using http authentication on the security service provider Hi Fabien, When I added HTTP authentication to my Silex application an exception was thrown. Due the exception I wasn't able to use HTTP authentication when I accessed the application through the browser. I used the following security firewall: ```php 'http-auth' => array( 'pattern' => '^.*$', 'http' => true, 'users' => array( // password is foo 'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='), ), ) ``` The following exception was thrown: ``` InvalidArgumentException: Identifier "security.entry_point.http" is not defined ``` It's a small fix and I also added some tests. All tests passed before I committed my changes. I would appreciate it when you take a look at this pull request.
-
Dennis Coorn (thuis) authored
security service provider
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
Commits ------- 1c41a6be Removed the swiftmailer autoloading from the service provider Discussion ---------- Removed the swiftmailer autoloading from the service provider It is now handled by composer directly once swiftmailer/swiftmailer#212 is merged.
-
Christophe Coevoet authored
It is now handled by composer directly.
-
- 16 Jun, 2012 7 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
- 15 Jun, 2012 2 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
-