1. 01 Nov, 2013 1 commit
    • Fabien Potencier's avatar
      feature #828 Converters (fabpot) · bcb07f44
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Discussion
      ----------
      
      Converters
      
      This PR reverts #769 (which tried to fix #768) as this is a breaks BC for the most usual use case of converters (#806).
      
      The decision has been taken (#814) that a converter always run, independently of the available request attribute names or controller argument names.
      
      Because of the above, running the converters as a controller event is not needed anymore, and moving the converters earlier in the process gives more power to the developer (#825 and #826).
      
      Commits
      -------
      
      a0644877 Convert request attributes in the KernelEvents::REQUEST event instead of KernelEvents::CONTROLLER event (closes #825)
      3b207399 added a note about global  converters being applied to all controllers
      76776926 Revert "merged branch igorw/convert-only-existing-attribute (PR #769)"
      bcb07f44
  2. 31 Oct, 2013 6 commits
  3. 30 Oct, 2013 6 commits
  4. 29 Oct, 2013 1 commit
  5. 28 Oct, 2013 2 commits
  6. 26 Oct, 2013 4 commits
  7. 19 Oct, 2013 1 commit
  8. 16 Oct, 2013 4 commits
  9. 14 Oct, 2013 1 commit
  10. 13 Oct, 2013 1 commit
  11. 12 Oct, 2013 4 commits
    • Fabien Potencier's avatar
      feature #804 added a way to delay the attachment of a controller to a route (fabpot) · 2b966973
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Discussion
      ----------
      
      added a way to delay the attachment of a controller to a route
      
      There are several ideas behind this PR. It's mostly about consistency by being able to decouple the setting of a controller from the match call. The old way still works of course.
      
      It is more consistent as everything can now be done via method calls and the fact that the controller is the second argument makes things uglier, especially when the code in the controller is large.
      
      As an added bonus, it helps when indenting the code (currently, I always wonder how to indent my code as it's not obvious). Last, but not the least, being able to put the code last also makes things more readable.
      
      Current:
      
      ```
      $app->get('/foo', function ($id) {
          // ...
      })
      ->bind('home')
      ->assert('id', '\d+')
      ;
      ```
      
      Now:
      
      ```
      $app
          ->get('/foo')
          ->bind('home')
          ->assert('id', '\d+')
          ->run(function ($id) {
              // ...
          })
      ;
      ```
      
      Commits
      -------
      
      8fbb9369 added a way to delay the attachment of a controller to a route
      2b966973
    • Fabien Potencier's avatar
    • Fabien Potencier's avatar
      removed obsolete check in a test · 7134febb
      Fabien Potencier authored
      7134febb
    • Fabien Potencier's avatar
      fixed CS · d1fcf09c
      Fabien Potencier authored
      d1fcf09c
  12. 11 Oct, 2013 9 commits