1. 02 Jan, 2013 3 commits
  2. 30 Dec, 2012 2 commits
  3. 18 Dec, 2012 2 commits
    • Fabien Potencier's avatar
      merged branch romainneutron/Sessions (PR #565) · bd523d59
      Fabien Potencier authored
      This PR was squashed before being merged into the master branch (closes #565).
      
      Commits
      -------
      
      55dce6b5 Test session service provider with routes that does not use session
      
      Discussion
      ----------
      
      Test session service provider with routes that does not use session
      
      Hello,
      
      Since symfony/Symfony@098b593591, a bug occurs with `SessionServiceProvider` :
      
      When using `HttpKernel\Client`, setting `$app['session.test'] = true;` and querying the application multiple routes in a single unit test, a `RuntimeException` is thrown by `Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage`.
      
      For instance :
      
      ```php
      use Silex\WebTestCase;
      use Silex\Application;
      use Silex\Provider\SessionServiceProvider;
      
      class unitTest extends WebTestCase
      {
          public function testUn()
          {
              $client = $this->createClient();
              $client->request('GET', '/');
              $client->request('GET', '/');
          }
      
          public function createApplication()
          {
              $app = new Application();
      
              $app->register(new SessionServiceProvider(), array(
                  'session.test' => true
              ));
      
              $app['debug'] = true;
              $app['exception_handler']->disable();
      
              $app->get('/', function(Application $app) {
                  return 'BOOM';
              });
      
              return $app;
          }
      }
      ```
      results in
      ```
      1) unitTest::testUn
      RuntimeException: Trying to save a session that was not started yet or was already closed
      
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php:101
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:184
      /Users/romain/Documents/workspace/testSess/vendor/silex/silex/src/Silex/Provider/SessionServiceProvider.php:107
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:164
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:53
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:169
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:73
      /Users/romain/Documents/workspace/testSess/vendor/silex/silex/src/Silex/Application.php:469
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php:61
      /Users/romain/Documents/workspace/testSess/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php:264
      /Users/romain/Documents/workspace/testSess/bingo.php:13
      ```
      
      Of course, this test currently passes as the bug happens with latest `2.1.x-dev` source whereas `composer.json` settings ask to install latest stable tag.
      
      This PR adds a test that fails with latest symfony 2.1.x.
      
      ---------------------------------------------------------------------------
      
      by romainneutron at 2012-12-17T22:19:24Z
      
      It seems the fix I've added is good enough, so, finally this PR brings a solution to the problem :)
      bd523d59
    • Romain Neutron's avatar
  4. 14 Dec, 2012 2 commits
  5. 12 Dec, 2012 2 commits
  6. 11 Dec, 2012 2 commits
  7. 02 Dec, 2012 2 commits
  8. 30 Nov, 2012 3 commits
  9. 27 Nov, 2012 2 commits
  10. 26 Nov, 2012 7 commits
  11. 18 Nov, 2012 1 commit
  12. 17 Nov, 2012 1 commit
  13. 13 Nov, 2012 2 commits
    • Fabien Potencier's avatar
      merged branch ChrisRiddell/session-patch1 (PR #539) · 7e5e1f88
      Fabien Potencier authored
      This PR was squashed before being merged into the master branch (closes #539).
      
      Commits
      -------
      
      7df7761c Example for DoctrineServiceProvider in session cookbook
      
      Discussion
      ----------
      
      Example for DoctrineServiceProvider in session cookbook
      
      Adds an example for using the DoctrineServiceProvider with PdoSessionHandler.
      
      ---------------------------------------------------------------------------
      
      by GromNaN at 2012-11-09T12:27:02Z
      
      You should add section titles as the cookbook gives 2 ways to do the same thing.
      
      ---------------------------------------------------------------------------
      
      by ChrisRiddell at 2012-11-09T12:35:50Z
      
      @GromNaN Sorry still new to this what do you mean by section titles?
      
      ---------------------------------------------------------------------------
      
      by GromNaN at 2012-11-09T12:43:52Z
      
      The page contains 2 titles named "Example".
      * 1st: name it "With a dedicated PDO service"
      * 2nd: name it "Using the DoctrineServiceProvider" & move the text you added after the 2nd title.
      
      ---------------------------------------------------------------------------
      
      by GromNaN at 2012-11-09T15:03:24Z
      
      👍
      7e5e1f88
    • ChrisRiddell's avatar
      7df7761c
  14. 09 Nov, 2012 6 commits
  15. 08 Nov, 2012 3 commits
    • Fabien Potencier's avatar
      merged branch igorw/handler-session-doc (PR #535) · 11309518
      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).
      11309518
    • Igor Wiedler's avatar
      7d07da09
    • Fabien Potencier's avatar
      merged branch GromNaN/patch-8 (PR #532) · 80c1205e
      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.
      80c1205e