This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed filterXPath() chaining
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | debatable (see below)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10206
| License | MIT
| Doc PR |
As @stof mentions in #10206, each node in the Crawler can belong to a different \DOMDocument. Therefore, I've made each node do its own XPath, relative to itself, and add all the results to a new Crawler. This way, all resulting nodes are still part of their original \DOMDocument and thus can reach all of their parent nodes.
No current tests break on this change. I've added a new test for this case, by checking if the number of parents is correct after obtaining a node through chaining of `filterXPath()`.
Now for BC: I can think of a number of cases where this change would give a different result. However, it's debatable/unclear if:
- the old behavior was a bug in the first place (which would validate this change), or
- the old behavior was intended (which would make this a BC breaking change)
As an example, consider the following HTML:
```html
<div name="a"><div name="b"><div name="c"></div></div></div>
```
What would happen if we run this:
```php
echo $crawler->filterXPath('//div')->filterXPath('div')->filterXPath('div')->attr('name');
```
Aside from breaking reachability of the parent nodes by chaining, with the original code it would echo 'a'.
With this patch it would echo 'c', which, to me, makes more sense.
Commits
-------
43a7716 [DomCrawler] Fixed filterXPath() chaining
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed incorrect handling of image inputs
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10204
| License | MIT
| Doc PR |
A possible approach to fix#10204, but I'm open to suggestions to fix this another way, as this might not be the most 'elegant' way.
Initially, my thoughts were to create a new DomCrawler\Field\FormField subclass, especially for image inputs. However, this does not solve the problem, because such a FormField would still exist under 1 name in the FormFieldRegistry.
Instead, I've changed it to have 2 separate FormFields instead (which both reference the same input node), with different names (.x and .y) so that both values can be set separately and will both be submitted.
Commits
-------
816cf17 [DomCrawler] Fixed incorrect handling of image inputs
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] fixed wrong reference in TraceableEventDispatcher
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9748, #9727
| License | MIT
| Doc PR | n/a
This PR fixes#9748 and #9727 by removing the `id` state. Only private method signatures have been changed, so that qualifies for a fix in 2.3.
The `getNotCalledListeners()` is a bit special as it tries to get non-called listeners. It passes `null` as the event id as if a listener has been called more than once, getting the first call is enough.
Commits
-------
acd3317 [HttpKernel] fixed wrong reference in TraceableEventDispatcher
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10188).
Discussion
----------
[TwigBundle] added missing @deprecated tag
Commits
-------
ee08582 [TwigBundle] added missing @deprecated tag
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10195).
Discussion
----------
[Debug] Fixed recursion level incrementing in FlattenException::flattenArgs().
The internal `$level` variable for tracking the recursion level is pre-incremented on the parent level of the recursion already.
This causes later array elements in an array that has more than 10 elements to get obscured by `'*DEEP NESTED ARRAY*'`, even though the elements are on the first/top level of the array.
The incremented `$level` value needs to be passed to the recursive call to `FlattenException::flattenArgs()` only.
Discovered in debugging exceptions in Drupal (which happens to use very large multi-dimensional arrays for legacy reasons).
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
1b1501b Fixed recursion level incrementing in FlattenException::flattenArgs().
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10184).
Discussion
----------
[Console] $default can be string
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
39ab7f3 [Console] $default can be string
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10177).
Discussion
----------
[Process] Fix wording for class documentation
| Q | A
| ------------- | ---
| Fixed tickets | ----
| License | MIT
"ease start" didn't make a lot of sense. This PR fixes this minor wording issue.
Commits
-------
51f5a57 Fix wording for Process class documentation
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10174).
Discussion
----------
[Console] Option can be bool too (eg. --force)
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
aa87eeb Option can be bool too (eg. --force)
This PR was squashed before being merged into the 2.3 branch (closes#10151).
Discussion
----------
[Form] Update DateTime objects only if the actual value has changed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now the Form component replaces DateTime fields with new Objects, therefore the hash is changing.
This leads to unnecessary database updated when working with doctrine. With this patch the DateTime object
of the actual entity is only replaced if the value has been changed.
Commits
-------
1f22d3a [Form] Update DateTime objects only if the actual value has changed
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10143).
Discussion
----------
[Tests] [HttpKernel] Added delta for Request comparison
| Q | A
| ------------- | ---
| Bug fix? | yes (in tests only)
| New feature? | -
| BC breaks? | -
| Deprecations? | -
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Sometimes, tests are failing because REQUEST_TIME changes between the creation of the various sub-requests.
By using delta, we allow a maximum of one second of difference.
Since this is a shady behaviour, I added minimal explanation as comments
Example: https://travis-ci.org/symfony/symfony/jobs/17668158#L511
Commits
-------
3a67309 [Tests] [HttpKernel] Added delta for Request comparison
Sometimes, tests are failing because REQUEST_TIME
changes between the creation of the various sub-requests.
By using delta, we allow maximum of second of difference.
Example: https://travis-ci.org/symfony/symfony/jobs/17668158#L511
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator][Translation] add zh_TW validator translations
add Traditional Chinese validator translations.
Commits
-------
c755e85 add zh_TW validator translations
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10141).
Discussion
----------
[Security] added Bulgarian translation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
8fceeac Added Bulgarian translation for security component
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10140).
Discussion
----------
allow the TextAreaFormField to be used with valid/invalid HTML
The TextAreaFormField previously used saveXML to get a representation of the child nodes of an textarea.
This works pretty fine on simple text is causes issues in case you have broken HTML, as saveXML
will potentially also break encoding/change the structure.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
Commits
-------
157a9de allow the TextAreaFormField to be used with valid/invalid HTML
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Remove unneeded file
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I think the file was moved here by mistake from the fixtures.
Commits
-------
caf1809 [DependencyInjection] Remove unneeded file
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] [Translations] added security.id.xlf
added translation for Bahasa Indonesia
| Q | A
| ------------- | ---
| License | MIT
Commits
-------
7edb5de Create security.id.xlf
This PR was merged into the 2.3 branch.
Discussion
----------
added lines to exceptions for the trans and transchoice tags
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10120
| License | MIT
| Doc PR | n/a
Commits
-------
ee0470d added lines to exceptions for the trans and transchoice tags
This PR was merged into the 2.3 branch.
Discussion
----------
Remove obsolete conditions
| 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
In `composer.json`, Twig version is set to 1.12 as a minimum, so all conditions about earlier Twig versions can be safely removed.
Commits
-------
c3ff76a [Twig] removed obsolete conditions on Twig versions
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
Commits
-------
23216aa [Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Minor fix in XmlFileLoader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
An instance of `\SimpleXMLElement` is passed to the `newConstraint` method instead of a string which can lead to weird type juggling issues.
Commits
-------
16b726c [Validator] Minor fix in XmlLoader
This PR was merged into the 2.3 branch.
Discussion
----------
Update validators.ro.xlf
some typo errors have been fixed
Commits
-------
d82f830 Update validators.ro.xlf