1. 30 May, 2012 2 commits
    • Igor Wiedler's avatar
      f43dd5a5
    • Igor Wiedler's avatar
      Merge branch 'master' into swiftmailer-test · 1798d08f
      Igor Wiedler authored
      * master:
        made monolog logger as the default logger when the monolog bridge is installed
        added the ServiceProviderInterface::boot() method
        fixed some skipped comments
        fixed Twig provider
        removed the Symfony bridges provider as it is not needed anymore with Composer
        added the possibility to register a logger for internal services
        fixed markup in the docs
        removed translation.messages in favor of translation.domains
        Remove dependency on the ClassLoader component.
      1798d08f
  2. 27 May, 2012 2 commits
    • Fabien Potencier's avatar
      merged branch fabpot/monolog-as-logger (PR #331) · 410c1ddd
      Fabien Potencier authored
      Commits
      -------
      
      c5e7a0b3 made monolog logger as the default logger when the monolog bridge is installed
      
      Discussion
      ----------
      
      Use Monolog as the default logger when the Symfony2 Monolog bridge is installed
      
      #330 is a pre-requisite for this PR to be merged.
      410c1ddd
    • Fabien Potencier's avatar
      merged branch fabpot/boot (PR #330) · 14cbd6c7
      Fabien Potencier authored
      Commits
      -------
      
      c7536412 added the ServiceProviderInterface::boot() method
      
      Discussion
      ----------
      
      added the ServiceProviderInterface::boot() method
      
      The `register` method for the service providers should only be about configuring services and parameters. But some service providers (monolog, swiftmailer, and session) also register some event listeners which means that the `dispatcher` service is created.
      
      This makes some things impossible like replacing the `dispatcher` service (except if you make sure to override it *before* the other providers). Also, if you want to use Monolog for the logger, it won't work as there is a chicken and egg problem.
      
      So, I propose to introduce a new `boot()` method on `ServiceProviderInterface` that must be called after all the providers are registered.
      
      The `boot()` method is automatically called by the `handle()` method if not already called by the developer.
      
      TODO: update the doc
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-26T09:59:48Z
      
      We can avoid the BC break by creating a new `BootableServiceProviderInterface` but it seems overkill (especially because we are not stable yet).
      
      ---------------------------------------------------------------------------
      
      by stof at 2012-05-26T10:36:05Z
      
      👍 And I agree that adding a new interface is overkill
      
      ---------------------------------------------------------------------------
      
      by igorw at 2012-05-27T18:14:06Z
      
      I'm not so happy with the BC break and that an additional method is required, but I can't think of any better way to solve this cleanly. So I guess let's go for it.
      14cbd6c7
  3. 26 May, 2012 9 commits
  4. 25 May, 2012 10 commits
    • Jordan Alliot's avatar
      c9fb6da5
    • Ricard Clau's avatar
      remove variable · 5ed7e45f
      Ricard Clau authored
      5ed7e45f
    • Ricard Clau's avatar
      following @igorw approach · f1edad0c
      Ricard Clau authored
      f1edad0c
    • Ricard Clau's avatar
      a238971e
    • Ricard Clau's avatar
    • Fabien Potencier's avatar
      updated README · 87e0d21c
      Fabien Potencier authored
      87e0d21c
    • Ricard Clau's avatar
    • Fabien Potencier's avatar
    • Fabien Potencier's avatar
      fixed perm issue · deaa987f
      Fabien Potencier authored
      deaa987f
    • Fabien Potencier's avatar
      merged branch lyrixx/patch-twig-dump (PR #305) · 0452c314
      Fabien Potencier authored
      Commits
      -------
      
      28c1b4c1 Added Twig_Extension_Debug if app is in debug mode
      
      Discussion
      ----------
      
      Added Twig_Extension_Debug if app is in debug mode
      
      ---------------------------------------------------------------------------
      
      by stof at 2012-04-16T21:51:12Z
      
      This was done initially in the PR adding it. But it has been reverted to avoid hard-to-debug issues when you have a template containing a dump call (it would work properly in your dev environment but throw an exception in your prod environment)
      
      ---------------------------------------------------------------------------
      
      by lyrixx at 2012-05-12T14:12:09Z
      
      @stof but it's very usefull ... more over, every dev add this extension.
      
      ---------------------------------------------------------------------------
      
      by stof at 2012-05-12T23:36:27Z
      
      @lyrixx The issue is that if it will be added only in debug mode and you forget to remove a dump call from your template, it will work properly in your dev environment (where Twig will be in debug mode with the extension) whereas the compilation of the template will fail in prod (because the function will not be defined anymore)
      
      ---------------------------------------------------------------------------
      
      by lyrixx at 2012-05-13T13:21:20Z
      
      @stof Yes I understood. I did the patch... But every time, on a new projet, I copy/paste these lines to my projet. And I am not the only one. So I think we could add this feature into silex. (And why not in twig ? )
      
      ---------------------------------------------------------------------------
      
      by stof at 2012-05-13T18:08:36Z
      
      @lyrixx When I said it was done previously, I was talking about Twig itself, not about Silex.
      
      ---------------------------------------------------------------------------
      
      by lyrixx at 2012-05-13T19:32:38Z
      
      @stof ah ok ;) i did not understood that. But if this PR could be merge, it could be usefull.  We need feedback here ?!
      0452c314
  5. 24 May, 2012 11 commits
  6. 21 May, 2012 6 commits
    • Thibaut Cuvelier's avatar
      fixed typos (closes #240) · 6dcb2587
      Thibaut Cuvelier authored
      6dcb2587
    • Fabien Potencier's avatar
    • Fabien Potencier's avatar
      fixed exception handling · b3fc523b
      Fabien Potencier authored
      b3fc523b
    • Chris Ramakers's avatar
      cb5003a0
    • Fabien Potencier's avatar
      merged branch fabpot/global_route_settings (PR #326) · cbb1113f
      Fabien Potencier authored
      Commits
      -------
      
      eaf176d3 added a Route class
      e3ddad54 added the possibility for settings set on a controller collection to influence controllers register later on
      0356873a changed Controller::generateRouteName() visibility
      31652440 added a way to define settings for all routes of a collection (closes #186)
      
      Discussion
      ----------
      
      added a way to define settings for all routes of a collection (closes #186)
      
      see the ticket and docs from the patch.
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-21T13:00:13Z
      
      ok, I've changed the strategy to what I've described above. ping @igorw
      
      ---------------------------------------------------------------------------
      
      by igorw at 2012-05-21T16:09:56Z
      
      `ControllerCollection extends Controller` is weird. I see how some code can be re-used, but a controller cannot be frozen or named, so those parts don't really make sense to me.
      
      Apart from that it's a nice feature. If you can come up with a cleaner way to do it that doesn't bloat the code too much, that'd be nice.
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-21T16:30:16Z
      
      What about creating a `Route` class that extends the Symfony `Route` class? It would contain the `assert`, `value`, `requireHttp`, `requireHttps`, `convert`, and `middleware` methods. Then, `Controller` and `ControllerCollection` extend this new `Route` class.
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-21T16:33:23Z
      
      Extending the `Route` is not necessarily a good idea either. What about creating this `Route` class and compose it into both `Controller` and `ControllerCollection`?
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-21T16:33:50Z
      
      That's what my last commit does.
      
      ---------------------------------------------------------------------------
      
      by fabpot at 2012-05-21T16:36:34Z
      
      By the way, a Trait would probably have been the best solution.
      cbb1113f
    • Fabien Potencier's avatar
      added a Route class · eaf176d3
      Fabien Potencier authored
      eaf176d3