- 13 Nov, 2012 1 commit
-
-
ChrisRiddell authored
-
- 09 Nov, 2012 4 commits
-
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 969ae6d2 Link to web servers chapter from usage Discussion ---------- Link to web servers chapter from usage
-
Fabien Potencier authored
This PR was squashed before being merged into the master branch (closes #536). Commits ------- a9552481 Minor session documentation change. Discussion ---------- Minor session documentation change. Thanks to igorw in #silex-php, we were able to get our redis sessions working in Silex. At his request, I'm updating the docs to indicate what he came up with. --------------------------------------------------------------------------- by igorw at 2012-11-08T18:26:20Z Looks good, but please wrap the long line at 80 chars. --------------------------------------------------------------------------- by igorw at 2012-11-08T19:04:07Z
👍 -
lukestokes authored
-
Igor Wiedler authored
-
- 08 Nov, 2012 6 commits
-
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 7d07da09 Update { => Native}FileSessionHandler in session doc Discussion ---------- Update { => Native}FileSessionHandler in session doc --------------------------------------------------------------------------- by indeyets at 2012-11-08T16:48:47Z by the way, is non-native option still available somewhere? --------------------------------------------------------------------------- by igorw at 2012-11-08T17:02:07Z Yes. If you set the `session.test` parameter to true, it will use a `MockFileSessionStorage` instead. See also [the SessionServiceProvider docs](silex.sensiolabs.org/doc/providers/session.html).
-
Igor Wiedler authored
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- d00ff5b1 Suggest removing the minimum-stability flag Discussion ---------- Suggest removing the minimum-stability flag Silex can be installed with stable versions of the Symfony2 components. Users should not be encouraged to set the minimum-stability flag to dev. https://groups.google.com/forum/?fromgroups=#!topic/silex-php/vPwMs7CMMT0 --------------------------------------------------------------------------- by igorw at 2012-11-07T23:50:52Z I agree, it should also be adjusted in the usage doc (which is currently broken because it has neither `minimum-stability` nor `@dev`). In fact this is already what is used in the skeletons.
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 4a0d746a Update doc/providers/security.rst Discussion ---------- Update doc/providers/security.rst typo is -> if
-
Eyveer authored
typo is -> if
-
Jérôme Tamarelle authored
Silex can be installed with stable versions of the components.
-
- 06 Nov, 2012 18 commits
-
-
Fabien Potencier authored
Revert "fixed a fatal error when the security provider is created without any firewalls (which of course does not make sense but anyways, refs #473)" This reverts commit 2b28989b.
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 236ef89b Set SCRIPT_FILENAME after including params Discussion ---------- Set SCRIPT_FILENAME after including params I think that some versions or distributions of nginx set SCRIPT_FILENAME in the fastcgi_params file (certainly ubuntu/debian), overriding anything previously set. --------------------------------------------------------------------------- by igorw at 2012-11-06T14:21:18Z Confirmed, ubuntu sets it: fastcgi_param SCRIPT_FILENAME $request_filename;
-
Dave Marshall authored
I think that some versions or distributions of nginx set SCRIPT_FILENAME in the fastcgi_params file (certainly ubuntu/debian), overriding anything previously set.
-
Fabien Potencier authored
This PR was squashed before being merged into the master branch (closes #528). Commits ------- 454d49e5 Cookbook recipe on sub-requests, closes #506, #507 Discussion ---------- Cookbook recipe on sub-requests, closes #506, #507 --------------------------------------------------------------------------- by ChrisRiddell at 2012-11-04T23:28:09Z This is very useful, maybe an example of the "Lack of container scopes" could be good as it got confusing. --------------------------------------------------------------------------- by igorw at 2012-11-05T00:09:54Z @ChrisRiddell Good point, I'll add an example to illustrate it. Cheers! --------------------------------------------------------------------------- by igorw at 2012-11-06T13:06:49Z I have made the requested changes.
-
Igor Wiedler authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- c4975cc4 Create Application::on() method to add an event listener Discussion ---------- Add method Application::on($eventName, $callback, $priority) Simplify PR #435 This method is a shortcut to add a listener to the event dispatcher. ``` php <?php use Symfony\Component\Security\Http\SecurityEvents; $app->on(SecurityEvents::SWITCH_USER, function ($event) { // ... }); ``` --------------------------------------------------------------------------- by fabpot at 2012-10-24T20:34:12Z Can you add some useful examples in the documentation before I merge this PR? Thanks. --------------------------------------------------------------------------- by GromNaN at 2012-10-24T21:57:48Z Which part of the documentation would be the most relevant ? I can write a cookbook on how to send an email when someone login to the application.
-
Fabien Potencier authored
* mvrhov/nginx: improved nginx config. It's secure by default now. Conflicts: doc/web_servers.rst
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
forced the security to be setup properly when accessed outside of the handling of a request (refs #473)
-
Fabien Potencier authored
fixed a fatal error when the security provider is created without any firewalls (which of course does not make sense but anyways, refs #473)
-
Fabien Potencier authored
This PR was squashed before being merged into the master branch (closes #529). Commits ------- c65e7568 Add note to twig docs that the baseUrl must be prepended Discussion ---------- Add note to twig docs that the baseUrl must be prepended --------------------------------------------------------------------------- by igorw at 2012-11-05T17:52:25Z Refs #524. --------------------------------------------------------------------------- by igorw at 2012-11-05T19:48:48Z Changed `path` to `url` in the example.
-
Igor Wiedler authored
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 95a6d3db [Doc][Translation] Set local_fallback to en by default 0f7b16ca [Translation] Set local_fallback to en by default Discussion ---------- [Translation] Set local_fallback to en by default --------------------------------------------------------------------------- by lyrixx at 2012-09-24T17:01:23Z Tests are ok. --------------------------------------------------------------------------- by stof at 2012-09-24T19:01:06Z This is wrong IMO. What about users who don't want to use a fallback locale ? --------------------------------------------------------------------------- by lyrixx at 2012-09-24T19:36:53Z @stof cf : https://github.com/symfony/symfony/blob/0187a1ac9497428d934f50233f43538163117c01/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php#L354
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 72506950 Added use statement for HttpExceptionInterface Discussion ---------- Added use statement for HttpExceptionInterface The Exception Wrapper recent refactoring added a reference to HttpExceptionInterface but not a use statement for it. This can cause the instance of check in there to fail causing you to always get a 500 error code.
-
D-Rock authored
-
- 05 Nov, 2012 8 commits
-
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- 02a39976 moved the modularity section of the docs to its own section cbc769ce fixed CS d669a7d5 made a small refactoring for better consistency deb42381 refactored the exception wrapper to make the code easier to understand e54627f6 moved exception wrapper to its own class 5fefc7dd fixed PHP 5.4 warning when a response is an array, dispatch the view event when an error does not return a Response a57f50d3 udpated docs 8772cbca moved the before middleware to always be run after the app middlewares 63e24c54 added the application as a third argument to the after middleware (to be consistent with the before one) 09a61047 moved the converter and string to response listeners to proper classes f51a1f24 moved the middleware events to a proper event listener class 3108bfa1 moved the locale management to its own event listener ca79d330 moved all subscribers registration into the dispatcher closure creation 056fc32f refactored Silex events (refs #503, refs #504, refs #452) 52a2fdaf removed the wrapping of the event for the exception event Discussion ---------- [WIP] Events refactoring This PR tries to address the issues reported on the `before()` method and more generally, the issues we have with the way we manage events in Silex. Silex has special events (defined in SilexEvents), and they map with Symfony events. For instance, the `BEFORE` event maps to the `REQUEST` one from Symfony. The main difference is that the priority you set for a `BEFORE` event can only configure the priority compared to other `BEFORE` events; all the events for the `BEFORE` event are dispatched from a single priority on the `REQUEST` event. This behavior removes a lot of flexibility for no reasons. And the same goes for the other Silex events. So, this PR does is to remove the specific Silex events and replace them with regular Symfony ones. This gives you more flexibility. For instance, it means that now, you can use the `before()` method to do something before the routing (priority `Application::EARLY_EVENT`) or after it (`Application::LATE_EVENT`). And if you really need to do something after the routing and before the security, that's also possible. The biggest benefit is that with the `before()`, `after()`, `error()`, and `finish()' methods, you can pretty much change all the default Symfony behaviors. So, adding a listener directly to the dispatcher should be now pretty rare. This PR is not finished yet as the documentation is not updated (but with the added flexibility, it's going to be much easier to document exactly what you can do and how in a consistent manner), but I want to gather feedback on the philosophy first. --------------------------------------------------------------------------- by fabpot at 2012-11-03T07:56:18Z I forgot to mention that this breaks BC, but only for edge cases (and this will be documented of course). --------------------------------------------------------------------------- by yguedidi at 2012-11-03T20:00:35Z +1 --------------------------------------------------------------------------- by igorw at 2012-11-04T04:34:56Z I am generally
👍 for this change. --------------------------------------------------------------------------- by fabpot at 2012-11-04T07:55:04Z I've added two commits that fix two other issues: * ca79d330: all subscribers are now registered during the creation of the dispatcher (the exception handler is not a special case anymore) * 3108bfa1: to avoid any problem with the local management, it is now handled in a proper listener that extends the Symfony one. --------------------------------------------------------------------------- by fabpot at 2012-11-04T08:20:36Z Another commit (f51a1f24) that moves the middleware management to an event listener (one less ugly hack). --------------------------------------------------------------------------- by fabpot at 2012-11-04T08:24:19Z At this point, I want your feedback again about another possible move I'm not sure about. Now that this PR introduces two event listener classes (`LocaleListener` and `MiddlewareListener`), what about creating two additional ones: one for the controller arguments converter and another one for the StringToResponse handling. Moving them to proper listeners makes things more consistent (and everything would be registered in the dispatcher creation closure) and more customisable (not sure you ever need to modify the default behavior though). What do you think? --------------------------------------------------------------------------- by fabpot at 2012-11-04T08:45:07Z I've just pushed a commit that implements my previous proposal (09a61047). --------------------------------------------------------------------------- by igorw at 2012-11-04T15:14:53Z👍 moving all of the subscribers out of the application class helps a lot to clean things up. * `before` and `after` should be more consistent with the `HttpKernelInterface::MASTER_REQUEST` check. * `error` is still a bit of a mess, if possible I'd move that to a separate class as well. --------------------------------------------------------------------------- by fabpot at 2012-11-04T15:40:41Z @igorw: The code in the error method has been moved to its own class (see 77a1878). What do you mean about the consistency of the master request check? --------------------------------------------------------------------------- by igorw at 2012-11-04T15:51:29Z Error refactoring looks good. The master request check should be return-early in both cases. -
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
fixed PHP 5.4 warning when a response is an array, dispatch the view event when an error does not return a Response
-
Fabien Potencier authored
Replaced the term filter by middleware (so now, we have application middlewares and route middlewares). Middleware documentation has been moved to its own chapter. This is not optimal yet as middleware are needed for some part of the usage chapter (which comes first).
-
- 04 Nov, 2012 3 commits
-
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- ff7bac34 Make SecurityServiceProvider::addFakeRoute less confusing Discussion ---------- Make SecurityServiceProvider::addFakeRoute less confusing
-
Fabien Potencier authored
This PR was merged into the master branch. Commits ------- dc8abdd8 Add note about defining the login route, closes #447 Discussion ---------- Add note about defining the login route, closes #447
-
Igor Wiedler authored
-