- 18 May, 2016 1 commit
-
-
Fabien Potencier authored
-
- 17 May, 2016 3 commits
-
-
Fabien Potencier authored
This PR was merged into the 2.0.x-dev branch. Discussion ---------- Adding a flag to disable the Monolog error handler The monolog error handler can now be disabled by setting the value of the new `monolog.use_error_handler` parameter to false (since it was added in a53ce590 it was always enabled). The error handler is disabled by default when the application `debug` parameter is set to true, to ensure it won't silence exceptions and/or errors. Without the flag, an uncaught exception thrown during boot on `master` will just result in a white page, even when using `debug` and `error_reporting` (because the error handler calls `exit` after logging exceptions). Commits ------- 8ecd0f01 Adding the monolog.use_error_handler parameter to configure whether the monolog ErrorHandler should be registered.
-
Fabien Potencier authored
This PR was merged into the 2.0.x-dev branch. Discussion ---------- Fixed var name in organizing controllers Updated the var name in the organizing controllers documenation in order be consistent with the variable naming throughout the code sample. Signed-off-by:
RJ Garcia <rj@bighead.net> Commits ------- f4a80afb Fixed var name in organizing controllers
-
Fabien Potencier authored
-
- 16 May, 2016 23 commits
-
-
RJ Garcia authored
Updated the var name in the organizing controllers documenation in order be consistent with the variable naming throughout the code sample. Signed-off-by:
RJ Garcia <rj@bighead.net>
-
Fabien Potencier authored
-
Fabien Potencier authored
* 1.3: reorganized TOC
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
* 1.3: fixed docs titles
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
* 1.3: fixed typo
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
* 1.3: fixed docs
-
Fabien Potencier authored
-
Fabien Potencier authored
* 1.3: fixed doc
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Pascal Luna authored
Adding the monolog.use_error_handler parameter to configure whether the monolog ErrorHandler should be registered. The error handler is now disabled by default when the application debug parameter is set to true, to ensure it won't silence exceptions and/or errors.
-
Fabien Potencier authored
This PR was merged into the 2.0.x-dev branch. Discussion ---------- Allowing callables for mount - Added the ability to pass callables into the controller collection mount method. - Updated documentation to show usage of new callables in mount and recursive mounting. - Added appropriate tests This addresses #1262 and #1290 Signed-off-by:
RJ Garcia <rj@bighead.net> Commits ------- 847b7eeb Allowing callables for mount
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.0.x-dev branch (closes #1330). Discussion ---------- Add the possibility to register forms as services This allows you to register your form types / form types extensions / form types guessers as Silex services: ```php $app['your.type.service'] = function ($app) { return new YourServiceFormType(); }; $app->extend('form.types', function ($types) use ($app) { $types[] = 'your.type.service'; return $types; })); ... $builder = $app['form.factory']->createBuilder('your.type.service'); ``` This is particularly useful for users of Symfony 3.x, now that `FormFactory::createBuilder()` and friends don't allow you to pass an instance of `FormTypeInterface` anymore, preventing you from loading form types that require constructor arguments lazily (without the patch you have to add objects to the `form.types` / `form.type.extensions` / `form.type.guessers` parameters which means every single form of your application will have to get instantiated whenever you use the form component). The patch contains a new `SilexFormExtension` extension class that handles the dereferencing of services names / lazy loading, new tests, and documentation fixes. Other quick notes: * No type checking is performed by the extension, but that's consistent with the way the `FormServiceProvider` works without the patch. Nevertheless, I believe this should be enhanced and will be ready to work on this after the merge if you reckon that would be a good idea. * I had to change the `DummyFormType` declaration in the tests. You used a class with a `getName()` method with Symfony < 2.8 and one without the method with 2.8+. Now the problem is that the `FormRegistry` from 2.8.x still uses the `getName()` method to store form types, which means it is still needed in some cases. Thus for my tests to pass I had to make sure the class with `getName()` was used with any 2.x version while the one without it was only used with 3.x Commits ------- cfcfa143 Add the possibility to register forms as services
-
skalpa authored
-
- 10 May, 2016 2 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was merged into the 2.0.x-dev branch. Discussion ---------- mailer delivery address add supports for swiftmailer.delivery_addresses & swiftmailer.delivery_whitelist Commits ------- b5f30010 mailer delivery address
-
- 08 May, 2016 2 commits
-
-
Mathieu Rochette authored
add supports for swiftmailer.delivery_addresses & swiftmailer.delivery_whitelist
-
RJ Garcia authored
- Added the ability to pass callables into the controller collection mount method. - Added a controllersFactory parameter into the controller collection which is a callable that is used to create a new controller for the mount method. - Updated documentation to show usage of new callables in mount and recursive mounting. - Added appropriate tests Signed-off-by:
RJ Garcia <rj@bighead.net>
-
- 05 May, 2016 9 commits
-
-
Fabien Potencier authored
* 1.3: added a mention of the web profiler Don't rewrite requests for existing directories to index.php
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was submitted for the master branch but it was merged into the 1.3 branch instead (closes #1307). Discussion ---------- Don't rewrite requests for existing directories to index.php Commits ------- 5ce29424 Don't rewrite requests for existing directories to index.php
-
arrgson authored
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.0.x-dev branch (closes #1309). Discussion ---------- add a namedForm() method in FormTrait I do prefer using the namedForm builder. Just add the `$this['form.factory']->createNamedBuilder(...)` in `Silex\Application\FormTrait`: ```php /** * Creates and returns a named form builder instance. * * @param string $name * @param mixed $data The initial data for the form * @param array $options Options for the form * @param string|FormTypeInterface $type Type of the form * * @return \Symfony\Component\Form\FormBuilder */ public function namedForm($name, $data = null, array $options = array(), $type = null) { if (null === $type) { // BC with Symfony < 2.8 $type = class_exists('Symfony\Component\Form\Extension\Core\Type\RangeType') ? 'Symfony\Component\Form\Extension\Core\Type\FormType' : 'form'; } return $this['form.factory']->createNamedBuilder($name, $type, $data, $options); } ``` Commits ------- c8e61fc2 add a namedForm() method in FormTrait
-
quazardous authored
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was merged into the 2.0.x-dev branch. Discussion ---------- Added support for callables in CallbackResolver Added the ability for the callback resolver to support any callable instead of just the object and method callable type. An alternate implementation to this would be to update the CallbackResolver to use an interface, then keep the old CallbackResolver as is and just add a new implementation that you can change if you'd like. I'd probably prefer to do the interface, but depends on what people think. This fixes #1327 Signed-off-by:
RJ Garcia <rj@bighead.net> Commits ------- 65afac9f Added support for callables in CallbackResolver
-