* 2.3:
enforce memcached version to be 2.1.0
[FrameworkBundle] improve server:run feedback
[Form] no need to add the url listener when it does not do anything
[Form] Fix#11694 - Enforce options value type check in some form types
Lithuanian security translations
[Router] Cleanup
[FrameworkBundle] Fixed ide links
Add missing argument
[TwigBundle] do not pass a template reference to twig
[TwigBundle] show correct fallback exception template in debug mode
[TwigBundle] remove unused email placeholder from error page
use meta charset in layouts without legacy http-equiv
Conflicts:
src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php
src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig
This PR was merged into the 2.3 branch.
Discussion
----------
enforce memcached version to be 2.1.0
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9797
| License | MIT
| Doc PR |
The signature of the `Memcached::get()` method changed with 2.2.0.
Therefore, tests fail in Symfony when mocking `Memcached` in the
`MemcachedSessionHandlerTest` of the HttpFoundation component (see
also php-memcached-dev/php-memcached#126 and
https://bugs.php.net/bug.php?id=66331).
Commits
-------
2ac5c86 enforce memcached version to be 2.1.0
This PR was merged into the 2.5 branch.
Discussion
----------
[PropertyAccess] Simplified code
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12275
| License | MIT
| Doc PR | -
Makes implementation of #10882 more readable.
Simplifies `camelize()` as pointed out in #12275.
Commits
-------
b712ac1 [PropertyAccess] Simplified code
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] no need to add the url listener when it does not do anything
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In line with #11696
Commits
-------
7aea1c9 [Form] no need to add the url listener when it does not do anything
This PR was merged into the 2.3 branch.
Discussion
----------
[FrameworkBundle] improve server:run feedback
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.
Commits
-------
264c37a [FrameworkBundle] improve server:run feedback
In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11696).
Discussion
----------
[Form] Fix#11694 - Enforce options value type check in some form types
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11694
| License | MIT
| Doc PR | none
`Symfony\Component\Form\Extension\Core\Type\RepeatedType` allowed passing strings as options, which caused problems as in #11694.
Commits
-------
0af6467 [Form] Fix#11694 - Enforce options value type check in some form types
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#12183).
Discussion
----------
[Router] Cleanup
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Removed unused imports, variables, arguments.
Commits
-------
5a6677d [Router] Cleanup
This PR was merged into the 2.3 branch.
Discussion
----------
Add missing argument
`->dump` has 5 arguments (the 3th argument, the indent, was not provided in the twig extension).
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | let's see
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
ac696b8 Add missing argument
This PR was merged into the 2.3 branch.
Discussion
----------
[TwigBundle] do not pass a template reference to twig
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates.
Commits
-------
7fe33e3 [TwigBundle] do not pass a template reference to twig
This PR was merged into the 2.3 branch.
Discussion
----------
[TwigBundle] show correct fallback exception template in debug mode
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In debug mode, the exception controller did not show the correct template in case the format is unknown.
It falls back to html but the logic for `exception_full` was not applied there. So it was just returning the partial html.
Commits
-------
b97acd9 [TwigBundle] show correct fallback exception template in debug mode
twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates
This PR was merged into the 2.3 branch.
Discussion
----------
use meta charset in layouts without legacy http-equiv
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`<meta charset="UTF-8" />` is now the recommended approach
Commits
-------
96e7b01 use meta charset in layouts without legacy http-equiv
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] fix type inconsistencies in RequestContext
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fixed inconsistencies in RequestContext:
- [x] port setters and getters inconsistent with constructor (string vs int)
- [x] host should be lowercased for easier case-insensitivity, see #9072
- [x] fix setQueryString with null
- [x] fix return phpdoc typehint
Commits
-------
676c4a0 [Routing] add tests for RequestContext
f61607f [Routing] fix inconsistencies in RequestContext
This PR was merged into the 2.3 branch.
Discussion
----------
[CssSelector] don't raise warnings when exception is thrown
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11947
| License | MIT
| Doc PR |
`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.
Commits
-------
38e9623 don't raise warnings when exception is thrown
`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.
[HttpFoundation] fixed the docs so that it gives some explanation about how you are vulnerable to CSRF when you enable the httpMethodeParameterOverride
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes#12151).
Discussion
----------
[Framework][DX] Set the proper validator class according to the configured api version
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | -
| License | MIT
| Doc PR | -
With this change the proper validator class will be dumped and therefore used for code completion in IDE's like PhpStorm which rely on the dumped container.
If you have 2.4 or 2.5-bc API the class will be
Symfony\Component\Validator\ValidatorInterface
If you use the 2.5 API the class will be
Symfony\Component\Validator\Validator\ValidatorInterface
I consider this also as important for the developer experience since a wrong type hint can easily cause issues since the method signatures of the validate() method have changed.
From
````php
public function validate($value, $groups = null, $traverse = false, $deep = false);
````
To
````php
public function validate($value, $constraints = null, $groups = null);
````
So if you want to validate specific groups you now have to pass them as the third argument instead of the second.
Commits
-------
eb3dd0f [Framework][DX] Set the proper validator class according to the configured api version
This PR was merged into the 2.5 branch.
Discussion
----------
[Console] clean handling of :: passed to find()
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12104
| License | MIT
| Doc PR |
Commands cannot have a double colon in their name (for example, a command can't be named `foo::bar`). However, one might try to retrieve a `foo::bar` command from the application like this:
```php
$command = $application->find('foo::bar');
```
The `findAlternatives()` method of the `Application` class fails to handle these strings when there are commands registered with a name consisting of at least three parts (e.g. a command is named `foo:bar:baz`). In this case, an empty string is passed to `strpos()` causing PHP to raise a warning.
In a "real" Symfony application, calling `php ./app/console cache::clear` now results in the following error message:
```
[InvalidArgumentException]
There are no commands defined in the "cache:" namespace.
Did you mean this?
cache
```
Commits
-------
baab4ed clean handling of :: passed to find()
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#12130).
Discussion
----------
[FrameworkBundle] minor fix
A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
cd966c6 [FrameworkBundle] minor fix
A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes#12135).
Discussion
----------
[Console] add a dot
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Added a "." at the end of an InputOption description, as the rest of the InputOption descriptions have it.
Commits
-------
fb0e685 [Console] add a dot