This PR was squashed before being merged into the 2.3 branch (closes#10305).
Discussion
----------
[Process] minor fixes
| Q | A
| ------------- | ---
| Fixed tickets | [n/a]
| License | MIT
The "same" PR as #10220, but on "2.3" branch
Commits
-------
f03e5dc [Process] minor fixes
This PR was merged into the 2.3 branch.
Discussion
----------
[YAML] Improve performance of getNextEmbedBlock
| 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
By removing unnecessary preg_match and function calls - isCurrentLineEmpty() contains a call to isCurrentLineBlank() - therefore this function is called twice every time this condition is hit. The preg_match appears to legacy handling of blank lines.
This improves the performance of the Drupal 8 installer.
![image](https://f.cloud.github.com/assets/769634/2241426/69effb0c-9cd1-11e3-9145-e4fabd2ec870.png)
Commits
-------
995a033 Improve performance of getNextEmbedBlock by removing unnecessary preg_match and function calls.
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10312).
Discussion
----------
[Yaml] Optimise Inline::evaluateScalar() for parsing strings.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The Drupal 8 installer does a lot of YAML parsing. With the patch attached it is significantly quicker.
![image](https://f.cloud.github.com/assets/769634/2237906/630c3308-9bcf-11e3-8038-35cbbeedd7e6.png)
https://drupal.org/node/1851234
Commits
-------
10c898d Avoid unnecessary line indentation calculation.
c65a647 Optimise Inline::evaluateScalar() for parsing strings.
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10146).
Discussion
----------
[WebProfilerBundle] fixed parsing Mongo DSN and added Test for it
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10105
| License | MIT
| Doc PR |
Commits
-------
5cd274b [WebProfilerBundle] fixed parsing Mongo DSN and added Test for it
This PR was merged into the 2.3 branch.
Discussion
----------
[Finder] () is also a valid delimiter
The `Regex` class should also accept `()` as delimiters, as they are valid PREG delimiters: http://3v4l.org/D8v54
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
b7519c7 () is also a valid delimiter
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10248).
Discussion
----------
Adding PHP 5.6 to travis-ci tests
| 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
PHP 5.6.0alpha1 is available on travis-ci
tests are green
Commits
-------
7083a30 Adding PHP 5.6 to travis-ci tests
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10281).
Discussion
----------
Update BCryptPasswordEncoder.php
Commits
-------
4c81fb3 Update BCryptPasswordEncoder.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Removed PHP <5.3.3 specific code which is not officially supported
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There is some code in the validator component which handles a PHP bug for versions strictly inferiors to 5.3.3. Since these versions are not supported (the requirements say 5.3.3 minimum) I thought we could remove it.
Regards.
Commits
-------
f10c974 [Validator] Removed PHP <5.3.3 specific code which is not officially supported.
This PR was merged into the 2.3 branch.
Discussion
----------
Bypass sigchild detection if phpinfo is not available
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | composer/composer#2711
| License | MIT
| Doc PR | none
This fixescomposer/composer#2711, i.e. anyone disabling phpinfo for security (by obscurity, but whatever) reasons can not use the Process class anymore.
Commits
-------
714aee9 Bypass sigchild detection if phpinfo is not available
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Revert "Fix "Array was modified outside object" in ResizeFormListener."
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10256, #10263
| License | MIT
| Doc PR |
Unseting key on iterator is not an solution because in php "Array assignment always involves value copying. " So if \IteratorAggregate implementation create new iterator from array (just like [Doctrine ArrayCollection](https://github.com/doctrine/common/blob/2.3/lib/Doctrine/Common/Collections/ArrayCollection.php#L362) does) such operation will not affect original data.
I'm just not sure if it's good to use Doctirn ArrayCollection in this test case or maybe its better to create own implementation of such Collection as a fixture.
Commits
-------
f62e30d Revert "Fix "Array was modified outside object" in ResizeFormListener."
462b7af Added failing test
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] removed problematic regex
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9462
| License | MIT
| Doc PR | n/a
This PR is a quick implementation of a replacement fora problematic regex.
Commits
-------
80bc41e [Console] removed problematic regex
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Added support for <area> tags to be treated as links
The [HTML area tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area) behaves exactly like the `a` tag in that they're both clickable, and if it has a `href` follows a link. The Link class works the same with both tags.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
23acd26 [DomCrawler] Added support for <area> tags to be treated as links
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes#10232).
Discussion
----------
[Form] Fix "Array was modified outside object" in ResizeFormListener.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the Iterator and data to be out of sync. When the data is an instance of IteratorAggregate, the loop should use the iterator directly and not rely on foreach.
The onSubmit method has been updated accordingly.
Commits
-------
4116b6e Fix "Array was modified outside object" in ResizeFormListener.
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the Iterator and data to be out of sync. When the data is an instance of IteratorAggregate, the loop should use the iterator directly and not rely on foreach.
The onSubmit method has been updated accordingly.
This PR was merged into the 2.3 branch.
Discussion
----------
Various minor changes
| 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
Commits
-------
eb3f6c6 fixed various inconsistencies
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10215).
Discussion
----------
[Routing] reduced recursion in dumper
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | sensiolabs/SensioFrameworkExtraBundle/issues/275
| License | MIT
This reduces recursion in the route dumper, avoiding issues with xdebug's recursion limit.
Commits
-------
fa6eebc reduced recursion when building DumperPrefixCollection
9278b27 renamed variables - making next change more readable
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