1. 03 May, 2013 9 commits
  2. 02 May, 2013 1 commit
  3. 01 May, 2013 2 commits
  4. 30 Apr, 2013 2 commits
  5. 27 Apr, 2013 1 commit
  6. 26 Apr, 2013 4 commits
  7. 24 Apr, 2013 1 commit
    • Fabien Potencier's avatar
      merged branch alexkappa/master (PR #628) · 8bf675f5
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Discussion
      ----------
      
      Ported ConstraintValidatorFactory.php to Silex
      
      Included a modified version of `ConstraintValidatorFactory` to Silex for use with custom constraints.
      
      Since Silex comes with `ValidatorServiceProvider` built in, I guess it makes sense to include this, in case users might want dependencies with their custom validators.
      
      Usage would be:
      
      ```php
      // Custom.php
      public function validatedBy()
      {
          return 'my.validator.custom';
      }
      
      // index.php
      $app['validator.custom'] = $app->share(function ($app) {
          return new CustomValidator();
      });
      $app->register(new ValidatorServiceProvider(), array(
          'validator.validator_service_ids' => array(
              'my.validator.custom' => 'validator.custom'
          )
      ));
      ```
      
      Commits
      -------
      
      c4466a18 Changed constructor type hint to Pimple
      fd72c6ab Incorporated changes suggested by @Igorow. Separating $this->validators (instances) and $this->serviceNames.
      fa15389b Separating validator service names and instances
      0c3234d2 Minor refactoring
      83266af9 Changed mapping of 'validator.validator_service_ids' to use ternary operator
      278c5e01 Backward compatibility for UserPasswordValidator
      40734452 Changed deprecated namespaces
      4d8956f3 Added custom constraint and validator to properly test the ConstraintValidatorFactory.
      b45b4fb2 SecurityServiceProvider now registers a UserPasswordValidator if ValidatorServiceProvider is registered.
      70c1e365 Registering a ValidatorServiceProvider can take a validator.validator_service_ids parameter which is now an associative array of aliases as keys and service names as values so that ConstraintValidatorFactory can lazy load the validators.
      77af56be Removed Symfony\Component\Validator\ConstraintValidatorFactory altogether from ValidatorServiceProvider. Custom validators are now lazy loaded. removed obsolete test.
      423138aa - Type hint in Silex\ConstraintValidatorFactory constructor for container - Modifed Silex\Provider\ValidatorServiceProvider to accept an optional   'validator.validator_service_ids' parameter wich allows users to register   custom validators. - Added test to verify that if users registered ValidatorServiceProvider   using optional 'validator.validator_service_ids' parameter then the new   Silex\ConstraintValidatorFactory will be used instead of the one provided   in  Symfony.
      eaf0af2a Ported ConstraintValidatorFactory.php to Silex/Pimple
      8bf675f5
  8. 23 Apr, 2013 2 commits
  9. 22 Apr, 2013 1 commit
  10. 12 Apr, 2013 1 commit
  11. 11 Apr, 2013 2 commits
  12. 10 Apr, 2013 5 commits
  13. 08 Apr, 2013 2 commits
  14. 03 Apr, 2013 1 commit
  15. 02 Apr, 2013 1 commit
  16. 01 Apr, 2013 5 commits
    • Fabien Potencier's avatar
      fixed tests on Symfony <2.2 · 803f809c
      Fabien Potencier authored
      803f809c
    • Fabien Potencier's avatar
      merged branch davedevelopment/multiple-logger-cookbook (PR #646) · c0d762f5
      Fabien Potencier authored
      This PR was merged into the master branch.
      
      Discussion
      ----------
      
      Multiple Monolog Loggers Cookbook
      
      First Draft, comments appreciated. I tried to make it more of a cookbook than just the example in #567
      
      Commits
      -------
      
      3247b740 Clarify the described convention
      71312015 Use statements
      08669b72 Typos
      2153e86d Multiple Monolog Loggers Cookbook
      c0d762f5
    • Fabien Potencier's avatar
    • Fabien Potencier's avatar
      merged branch tiraeth/host (PR #648) · 0c3b670b
      Fabien Potencier authored
      This PR was squashed before being merged into the master branch (closes #648).
      
      Discussion
      ----------
      
      Added support for URL host from Routing Component
      
      Hi everyone,
      
      Firstly, I wanted to thank you all for Silex. It's fabulous.
      
      I needed URL host support in Silex to manage different subdomains of my small application and came up with an idea of introducing `->host($host)` chained method to `Silex\Route` class. This way users can apply host resolution to controllers in Silex.
      
      This PR includes above functionality + one unit test to check if everything works as expected.
      
      URL host support is of course available in Routing Component from version `>=2.2`, but Silex relies on 2.2 anyway.
      
      Example:
      ```php
      <?php
      
      // ...
      
      $app->match('/', function() {
          // app-specific action
      })->host('example.com');
      
      $app->match('/', function ($user) {
          // user-specific action
      })->host('{user}.example.com');
      
      // ...
      ```
      
      I am open for comments.
      
      Commits
      -------
      
      f0124c7f Added support for URL host from Routing Component
      0c3b670b
    • Marcin Chwedziak's avatar
      f0124c7f