The current context is not stored anymore. Instead, it is passed around the traverser
and the visitors. For this reason, validation can occur in multiple contexts at the
same time.
The validation of values against constraints should be a first-class citizen
in the API. For this reason, validate() now takes a value and a constraint or
a list of constraints. This method should be used for the most basic use
cases.
If users want to annotate objects with constraints (this is optional,
advanced functionality), they can use the more expressive validateObject()
method now. For traversing arrays or Traversables, a new method
validateCollection() is now available in the API.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Validator][Email] - When standalone "Fatal error: Class 'validator.email' not found"
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/silexphp/Silex/issues/932
| License | MIT
| Doc PR | no
When using the validator as an standalone component a bug was introduced by overriding the `validatedBy()` method in the `Email` constraint.
This PR removes the override and implements a way for the DI to get the right validator.
Another way would be modifying the definition of validator to change the alias instead of having the FQCN in the xml
Commits
-------
e79b3a9 Change in validator.email service alias to match the validator FQCN
* 2.4:
added missing unit test
fixed too greedy replacements
fixed protocol-relative URLs
added override power to server parameters provided on request method
made parsing controllers more robust
Fixed YamlFileLoader imports path
* 2.3:
added missing unit test
fixed too greedy replacements
fixed protocol-relative URLs
added override power to server parameters provided on request method
made parsing controllers more robust
Fixed YamlFileLoader imports path
Conflicts:
src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] added missing unit test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Added a unit test to ensure that #10536 won't break BC.
Commits
-------
47d1592 added missing unit test
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed server values in BrowserKit
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9527, #9762, #9821, #9901
| License | MIT
| Doc PR | n/a
Commits
-------
65b9810 fixed too greedy replacements
d9cf28d fixed protocol-relative URLs
289da16 added override power to server parameters provided on request method
This PR was squashed before being merged into the 2.5-dev branch (closes#9818).
Discussion
----------
[TwigBundle] Add command to list twig functions, filters, globals and tests
Sample output:
```
$ app/console twig:doc date
Functions
date(date = null, timezone = null)
Filters
date(format = null, timezone = null)
date_modify(modifier)
```
JSON output also available, could be helpful for IDEs.
Possible improvement would be to read the first line of the docblock of each method/function to show a bit more info.
Feedback welcome on the command's name. Not really convinced but too late to think of something better.
Credits to @gagarine for the great idea
Commits
-------
7d61154 Add command to list twig functions, filters, globals and tests
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] made parsing controllers more robust
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10465
| License | MIT
| Doc PR | n/a
Under some circumstances (like passing an object without an __invoke method), the Controller resolver would lead to a PHP fatal. This PR fixes that, improved error messages, and refactored the unit tests.
Commits
-------
6dba229 made parsing controllers more robust