1. 04 Jan, 2013 1 commit
  2. 03 Jan, 2013 5 commits
    • Fabien Potencier's avatar
      merged branch igorw/app-parent-constructor (PR #572) · 6c442081
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Commits
      -------
      
      44ba6e72 Call parent constructor in app, to initialize pimple
      
      Discussion
      ----------
      
      Call parent constructor in app, to initialize pimple
      6c442081
    • Igor Wiedler's avatar
      44ba6e72
    • Fabien Potencier's avatar
    • Fabien Potencier's avatar
      merged branch marijn/feature/constructor-parameters (PR #556) · 6f9cca8b
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Commits
      -------
      
      6543379c Allow constructor arguments.
      
      Discussion
      ----------
      
      Allow constructor arguments.
      
      Unfortunately my phpunit installation is horribly broken so I can't run the tests right now...
      
      ---------------------------------------------------------------------------
      
      by igorw at 2012-11-27T00:21:38Z
      
      👍
      
      ---------------------------------------------------------------------------
      
      by igorw at 2012-11-27T00:21:49Z
      
      Docs?
      
      ---------------------------------------------------------------------------
      
      by igorw at 2012-11-27T00:24:24Z
      
      The parent constructor should probably be called at the end, that allows parameters to override the default services. And you should add a test case for that too.
      
      ---------------------------------------------------------------------------
      
      by GromNaN at 2012-11-27T07:54:31Z
      
      @igorw The parent constructor replaces everything, so it cannot be called at the end.
      https://github.com/fabpot/Pimple/blob/master/lib/Pimple.php#L46
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2013-01-03T08:10:28Z
      
      What about just calling `array_replace($this->values, $values)` at the end of the constructor instead?
      
      ---------------------------------------------------------------------------
      
      by igorw at 2013-01-03T08:35:02Z
      
      Sounds good to me.
      6f9cca8b
    • Fabien Potencier's avatar
      merged branch igorw/error-handler-cookbook (PR #563) · ed53b169
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Commits
      -------
      
      d272d710 [docs] Add cookbook recipe for the ErrorHandler
      
      Discussion
      ----------
      
      [docs] Add cookbook recipe for the ErrorHandler
      
      ---------------------------------------------------------------------------
      
      by igorw at 2013-01-03T00:46:52Z
      
      bump.
      
      ---------------------------------------------------------------------------
      
      by davedevelopment at 2013-01-03T01:02:13Z
      
      👍  looks good
      ed53b169
  3. 02 Jan, 2013 4 commits
  4. 30 Dec, 2012 2 commits
  5. 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
  6. 14 Dec, 2012 2 commits
  7. 12 Dec, 2012 3 commits
  8. 11 Dec, 2012 2 commits
  9. 02 Dec, 2012 2 commits
  10. 30 Nov, 2012 3 commits
  11. 27 Nov, 2012 3 commits
  12. 26 Nov, 2012 7 commits
  13. 18 Nov, 2012 1 commit
  14. 17 Nov, 2012 1 commit
  15. 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