- 25 Feb, 2018 17 commits
-
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.2.x-dev branch (closes #1399). Discussion ---------- Added argument description to twig asset() method I have added a description of the arguments for the asset() method. I didn't find them obvious when I first used the AssetServiceProvider, although it makes sense in hindsight. The description would have saved me some time getting the paths right Commits ------- 2f5d870f Added argument description to twig asset() method
-
DaveC49 authored
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Update guard_authentication.rst I am still working on it to get authentication working in my project so my suggestion might be false, but I believe a ```use``` is missing in the header of this example. Commits ------- 50da4b33 Update guard_authentication.rst
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.2.x-dev branch (closes #1570). Discussion ---------- Update security.rst - security context sharing I'd like to update the security.rst as I found the lack of information about the security context sharing between multiple firewalls. I know a lot of people are having problems not knowing this, so it would be nice to mention it. Please, check the correctness and approve it if you find it useful. Thanks. Commits ------- 2b81227d Update security.rst - security context sharing
-
Dawid Zbiński authored
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Docs: Add documentation how to use RoutingServiceProvider Silex is now on 2.0 and there is zero documentation about [URL Generator](https://silex.symfony.com/doc/1.3/providers/url_generator.html) which became part of RoutingServiceProvider Commits ------- 85ce3f09 Docs: Add documentation how to use RoutingServiceProvider
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Add a description of global.flashes global.flashes is available from symfony 3.3, I added it. https://symfony.com/blog/new-in-symfony-3-3-improved-flash-messages Commits ------- dbae0030 Add a description of global.flashes
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- update session_storage.rst remove extra spaces Commits ------- 1279b3ce update session_storage.rst
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.2.x-dev branch (closes #1599). Discussion ---------- Fix CS Commits ------- c5ec5245 switched to short array notation 08d04b40 fixed CS
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.2.x-dev branch (closes #1598). Discussion ---------- Removed tests for obsolete Symfony versions, remove HHVM support This PR does the following: * dropped support for non-supported Symfony versions * dropped support for HHVM * removed the "dev" minimum stability in `composer.json` * changed tests to run on stable versions of Symfony (instead of dev) * optimized PHPUnit cache * added tests for Symfony 3.4 * fixed risky tests Commits ------- b447ec3b fixed risky tests 43e4cf29 tweaked tests to run on stable versions 7c7d81f0 removed support for HHVM 678d0489 removed tests for obsolete Symfony versions
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
- 24 Feb, 2018 2 commits
-
-
Fabien Potencier authored
This PR was squashed before being merged into the 2.2.x-dev branch (closes #1595). Discussion ---------- Tweak warning message to point to #1593, asking for help Commits ------- 75585384 Tweak warning message to point to #1593, asking for help
-
Gunnar Beushausen authored
-
- 23 Feb, 2018 1 commit
-
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Updated for RouterListener from symfony/http-kernel v3.4+ #1591 Commits ------- 45c44271 #1591
-
- 17 Feb, 2018 1 commit
-
-
Eridan Domoratskiy authored
Updated for RouterListener from symfony/http-kernel v3.4+
-
- 12 Jan, 2018 5 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
- 10 Jan, 2018 1 commit
-
-
Fabien Potencier authored
-
- 14 Dec, 2017 10 commits
-
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Namespaces for Twig paths Hello, Recently, I had to use Symfony project's pieces of code in a Silex project, extending parent templates through submodules. These submodules, on which I had no control, used namespaced templates in their Twig files, such as: ```twig {% import "@FooModule/macros.html.twig" as macros %} ``` ____ ### Problem Silex cannot resolve namespaces by default, since you have to register paths as following: ```php $app->register(new TwigServiceProvider(), array( 'twig.path' => [ '../app/Resources/views', '../common/foo-module/Resources/views' ] )); ``` ### Temporary solution What I had to do in order to get it working in the project was to "hack" the `\Twig_Loader_Filesystem` class (*PHP 7+*): ```php $paths = [ '../app/Resources/views', 'FooModule' => '../common/foo-module/Resources/views', ]; $app->register(new TwigServiceProvider()); $app['twig.loader.filesystem'] = (function() use (&$paths): \Twig_Loader_Filesystem { $fileSystem = new \Twig_Loader_Filesystem(); foreach ($paths as $namespace => $path) { if (is_string($namespace)) { $fileSystem->addPath($path, $namespace); } else { $fileSystem->addPath($path); } } return $fileSystem; })(); ``` This works fine. Other solutions crossed my minds, but this was one of the best alternatives I figured in order to use Twig namespaces in Silex. ### Code modification Though this solution works, it may seem a bit dirty to have to do this in the project's code and not having the `TwigServiceProvider` providing this possibility. So I added this little piece of algorithm directly at the `\Twig_Loader_Filesystem` instanciation, which now looks like this as you will see in changes: ```php $app['twig.loader.filesystem'] = function ($app) { if (!is_array($app['twig.path'])) { $app['twig.path'] = array($app['twig.path']); } $fileSystem = new \Twig_Loader_Filesystem(); foreach ($app['twig.path'] as $namespace => $path) { if (is_string($namespace)) { $fileSystem->addPath($path, $namespace); } else { $fileSystem->addPath($path); } } return $fileSystem; }; ``` So you can simply register your `TwigServiceProvider` as following: ```php $app->register(new TwigServiceProvider(), [ 'twig.path' => [ '../app/Resources/views', 'FooModule' => '../common/foo-module/Resources/views', ] ]); ``` ___ English not being my native language, I hope I was clear enough. I stay around to answer any question about this potential contribution. (: A Commits ------- d1f29680 [change] Namespaces for Twig paths
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Refactoring tests I've refactored some tests, using: - `assertCount` instead of `count` function; - `assertFalse` instead of strict comparison with `false` keyword; - `assertArrayHasKey` instead of `isset` function. Commits ------- b163e443 Refactoring tests
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Test against PHP 7.2 Commits ------- 9853996c Test against PHP 7.2
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- Swiftmailer SSL stream_context_options cannot be set #1582 : Adding stream_context_options to the $app['swiftmailer.options'] Commits ------- d622daa3 Swiftmailer SSL stream_context_options cannot be set #1582 : Adding stream_context_options to the $app['swiftmailer.options']
-
Daniel Madureira authored
-
leClaude authored
Adding stream_context_options to the $app['swiftmailer.options']
-
- 10 Dec, 2017 1 commit
-
-
Gabriel Caruso authored
-
- 27 Nov, 2017 1 commit
-
-
Adrien authored
-
- 23 Nov, 2017 1 commit
-
-
Fabien Potencier authored
This PR was merged into the 2.2.x-dev branch. Discussion ---------- A minor typo Hi, I found a minor typo in this particular file. Kindly please check it and merge the pull request if you find it valid. Thanks! Commits ------- 8fd2b2bf Update organizing_controllers.rst
-