* 2.5:
[DependencyInjection] fix @return anno created by PhpDumper
Fixed the phpdoc of the VoterInterface
[DoctrineBridge] Fix empty parameter logging in the dbal logger
[Validator] remove duplicate interface implementations
[Validator] fix return doc of ClassMetadata::getCascadingStrategy
Fixed#11675 ValueToDuplicatesTransformer accept "0" value
check for the correct field type
fix handling of nullable XML attributes
[DomCrawler] fix the axes handling in a bc way
* 2.4:
[DependencyInjection] fix @return anno created by PhpDumper
Fixed the phpdoc of the VoterInterface
[DoctrineBridge] Fix empty parameter logging in the dbal logger
Fixed#11675 ValueToDuplicatesTransformer accept "0" value
check for the correct field type
fix handling of nullable XML attributes
[DomCrawler] fix the axes handling in a bc way
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
* 2.3:
[DependencyInjection] fix @return anno created by PhpDumper
Fixed the phpdoc of the VoterInterface
[DoctrineBridge] Fix empty parameter logging in the dbal logger
Fixed#11675 ValueToDuplicatesTransformer accept "0" value
check for the correct field type
fix handling of nullable XML attributes
[DomCrawler] fix the axes handling in a bc way
Conflicts:
src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11756).
Discussion
----------
[DependencyInjection] fix @return anno created by PhpDumper
| Q | A
| ------------- | ---
| Fixed tickets | ---
| License | MIT
If a generated container is inside namespace, generated @return annos are not valid.
Commits
-------
39c4cc3 [DependencyInjection] fix @return anno created by PhpDumper
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed the phpdoc of the VoterInterface
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
``null`` is an accepted value for voters (it is passed when you are not voting on a specific object, for instance for roles.
Commits
-------
b591404 Fixed the phpdoc of the VoterInterface
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Validator] Added date support to comparison constraints and Range
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #3640, #7766, #9164, #9390, #8300
| License | MIT
| Doc PR | symfony/symfony-docs#4143
This commit adds frequently requested functionality to compare dates. Since the `DateTime` constructor is very flexible, you can do many fancy things now such as:
```php
/**
* Only accept requests that start in at least an hour.
* @Assert\GreaterThanOrEqual("+1 hours")
*/
private $date;
/**
* Same as before.
* @Assert\Range(min = "+1 hours")
*/
private $date;
/**
* Only accept dates in the current year.
* @Assert\Range(min = "first day of January", max = "first day of January next year")
*/
private $date;
/**
* Timezones are supported.
* @Assert\Range(min = "first day of January UTC", max = "first day of January next year UTC")
*/
private $date;
```
Commits
-------
60a5863 [Validator] Added date support to comparison constraints and Range
This PR was squashed before being merged into the 2.3 branch (closes#11711).
Discussion
----------
[DoctrineBridge] Fix empty parameter logging in the dbal logger
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11710
| License | MIT
| Doc PR | -
Commits
-------
ef23f02 [DoctrineBridge] Fix empty parameter logging in the dbal logger
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] check for the correct field type
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11689
| License | MIT
| Doc PR |
HTML allow to define different form fields with the same name. Imagine the following form:
```html
<html>
<body>
<form action="/">
<input type="hidden" name="option" value="default">
<input type="radio" name="option" value="A">
<input type="radio" name="option" value="B">
<input type="hidden" name="settings[1]" value="0">
<input type="checkbox" name="settings[1]" value="1" id="setting-1">
<button>klickme</button>
</form>
</body>
</html>
```
Since the `FormFieldRegistry` can only handle one field per name, the hidden field option is registered first before the radio field with the same name is evaluated. Thus, the `FormFieldRegistry` returns an `InputFormField` instance on which the `addChoices()` method can not be called.
Commits
-------
169b397 check for the correct field type
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] fix handling of nullable XML attributes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As @Tobion pointed out in #11394, ``true`` and ``1`` are valid values in boolean XML attributes. The XmlFileLoader didn't handle ``1`` values properly.
Commits
-------
7b4d4b6 fix handling of nullable XML attributes
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Validator] Added ConstraintViolation::getConstraint()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5050
| License | MIT
| Doc PR | -
This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.
Related to #7276, #7273 and #9691.
Commits
-------
ce1d209 [Validator] Added ConstraintViolation::getConstraint()
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] fix the axes handling in a bc way
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11503
| License | MIT
| Doc PR |
The previous fix in #11548 for handling XPath axes was not backward compatible. In previous Symfony versions the Crawler handled nodes by holding a "fake root node". This must be taken into account when evaluating (relativizing) XPath expressions.
Commits
-------
d26040f [DomCrawler] fix the axes handling in a bc way
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11676).
Discussion
----------
[Form] Fixed#11675 ValueToDuplicatesTransformer accept "0" value
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | #11675
| License | MIT
Commits
-------
31d48abFixed#11675 ValueToDuplicatesTransformer accept "0" value
* 2.5:
[Validator] Fixed missing use statements
[Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
[FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
return empty metadata collection if none do exist
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11695).
Discussion
----------
[Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I just ran the tests with ICU 52.1 installed and noticed that a few of them failed. This PR fixes these tests.
Commits
-------
5440ed5 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] return empty metadata collection if none do exist
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | [The reference to the documentation PR if any]
Backport of #11614 for Symfony 2.3 and 2.4.
Commits
-------
f5bc18d return empty metadata collection if none do exist
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Validator] Fixed Constraint class to not destroy custom groups upon serialization
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11638
| License | MIT
| Doc PR | -
Commits
-------
d405f43 [Validator] Fixed Constraint class to not destroy custom groups upon serialization
HTML allow to define different form fields with the same name.
Imagine the following form:
<html>
<body>
<form action="/">
<input type="hidden" name="option" value="default">
<input type="radio" name="option" value="A">
<input type="radio" name="option" value="B">
<input type="hidden" name="settings[1]" value="0">
<input type="checkbox" name="settings[1]" value="1" id="setting-1">
<button>klickme</button>
</form>
</body>
</html>
Since the `FormFieldRegistry` can only handle one field per name, the
hidden field option is registered first before the radio field with
the same name is evaluated. Thus, the `FormFieldRegistry` returns an
`InputFormField` instance on which the `addChoices()` method can not
be called.
This PR was merged into the 2.5 branch.
Discussion
----------
[FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11580
| License | MIT
| Doc PR | -
Commits
-------
a74b758 [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
This PR was merged into the 2.6-dev branch.
Discussion
----------
[HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11508
| License | MIT
| Doc PR | no
This PR applies #11510 to master instead of 2.3
Should be merged on master:
- [x] after https://github.com/symfony/symfony/pull/11667 is merged to 2.3
- [x] and after 2.3 is merged back to master
Commits
-------
beca900 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
* 2.5:
add missing options
[Form] Fixed ValidatorExtension to work with the 2.5 Validation API
revert #11510, moved to 2.6
[WebProfilerBundle] Fixed double height of canvas