Commit Graph

15582 Commits

Author SHA1 Message Date
Pascal Borreli b9d13f2b65 Adding PHP 5.6 to travis-ci tests 2014-02-19 22:46:50 +01:00
Fabien Potencier 26732d7468 bug #10255 [FrameworkBundle] Fixed wrong redirect url if path contains some query parameters (pulzarraider)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fixed wrong redirect url if path contains some query parameters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

a25d1e1 Fixed wrong redirect url if path contains some query parameters
2014-02-19 22:33:06 +01:00
Fabien Potencier bbe716cc35 minor #10281 Update BCryptPasswordEncoder.php (Szymciosek)
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
2014-02-19 22:27:56 +01:00
szymek 04a506ee7d Update BCryptPasswordEncoder.php 2014-02-19 22:27:55 +01:00
Fabien Potencier 0788896e32 minor #10289 [Validator] Removed PHP <5.3.3 specific code which is not officially supported (pylebecq)
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.
2014-02-18 17:39:47 +01:00
Pierre-Yves LEBECQ f10c9748e3 [Validator] Removed PHP <5.3.3 specific code which is not officially supported. 2014-02-18 17:30:53 +01:00
Fabien Potencier 8f379217b8 Revert "bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)"
This reverts commit c11c5888f3, reversing
changes made to e453c4589d.
2014-02-18 17:26:04 +01:00
Fabien Potencier 2637e5555c bug #10285 Bypass sigchild detection if phpinfo is not available (Seldaek)
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 fixes composer/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
2014-02-18 17:13:33 +01:00
Jordi Boggiano 714aee9bc0 Bypass sigchild detection if phpinfo is not available 2014-02-18 14:12:33 +01:00
Fabien Potencier c4ffe02100 bug #10269 [Form] Revert "Fix "Array was modified outside object" in ResizeFormListener." (norzechowicz)
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
2014-02-17 20:52:05 +01:00
Norbert Orzechowicz f62e30db30 Revert "Fix "Array was modified outside object" in ResizeFormListener." 2014-02-15 12:03:01 +01:00
Norbert Orzechowicz 462b7af9b1 Added failing test 2014-02-15 12:00:54 +01:00
Andrej Hudec a25d1e1c0f Fixed wrong redirect url if path contains some query parameters 2014-02-13 06:42:11 +01:00
Fabien Potencier 8fef4f0398 bumped Symfony version to 2.3.11 2014-02-12 20:09:40 +01:00
Fabien Potencier e4b9ff28b7 updated VERSION for 2.3.10 2014-02-12 09:18:23 +01:00
Fabien Potencier a1b099df8f update CONTRIBUTORS for 2.3.10 2014-02-12 09:17:42 +01:00
Fabien Potencier e4d1d048e1 updated CHANGELOG for 2.3.10 2014-02-12 09:15:48 +01:00
Fabien Potencier 6fc06e72b8 bug #10231 [Console] removed problematic regex (fabpot)
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
2014-02-12 09:04:19 +01:00
Fabien Potencier 80bc41e38d [Console] removed problematic regex 2014-02-12 08:53:27 +01:00
Fabien Potencier 8cd285cd2c bug #10245 [DomCrawler] Added support for <area> tags to be treated as links (shamess)
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
2014-02-12 07:33:07 +01:00
Shane Preece 23acd26d4a [DomCrawler] Added support for <area> tags to be treated as links 2014-02-11 14:35:22 +00:00
Fabien Potencier 57a4942812 bug #10232 [Form] Fix "Array was modified outside object" in ResizeFormListener. (Chekote)
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.
2014-02-11 15:26:59 +01:00
Chekote e62c0b5a2d 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.
2014-02-11 15:26:59 +01:00
Fabien Potencier a1813cb57a minor #10234 Various minor changes (fabpot)
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
2014-02-11 11:41:52 +01:00
Fabien Potencier eb3f6c6efb fixed various inconsistencies 2014-02-11 11:29:24 +01:00
Fabien Potencier f964cc8474 bug #10215 [Routing] reduced recursion in dumper (arnaud-lb)
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
2014-02-10 15:33:09 +01:00
Arnaud Le Blanc 979d5c0229 reduced recursion when building DumperPrefixCollection 2014-02-10 15:33:09 +01:00
Arnaud Le Blanc e0cf2440e9 renamed variables - making next change more readable 2014-02-10 15:33:09 +01:00
Fabien Potencier 5fbcf88b9e minor #10219 [EventDispatcher] removing dead code. (inalgnu)
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes #10219).

Discussion
----------

[EventDispatcher] removing dead code.

| 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
-------

e28395f [EventDispatcher] removing dead code.
2014-02-10 15:31:47 +01:00
inalgnu fdecc69e98 removing dead code. 2014-02-10 15:31:47 +01:00
Fabien Potencier c11c5888f3 bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)
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
2014-02-05 17:38:09 +01:00
Robbert Klarenbeek 43a771614c [DomCrawler] Fixed filterXPath() chaining 2014-02-05 17:30:33 +01:00
Fabien Potencier e453c4589d bug #10205 [DomCrawler] Fixed incorrect handling of image inputs (robbertkl)
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
2014-02-05 14:01:06 +01:00
Robbert Klarenbeek 816cf179ee [DomCrawler] Fixed incorrect handling of image inputs 2014-02-04 21:33:58 +01:00
Fabien Potencier 6a4d765c43 bug #10191 [HttpKernel] fixed wrong reference in TraceableEventDispatcher (fabpot)
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
2014-02-04 08:14:12 +01:00
Fabien Potencier 5e12d749eb minor #10188 [TwigBundle] added missing @deprecated tag (fabpot)
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
2014-02-04 08:13:30 +01:00
Fabien Potencier fefd4df4a5 added missing @deprecated tag 2014-02-04 08:13:29 +01:00
Fabien Potencier 7a1190874f bug #10195 [Debug] Fixed recursion level incrementing in FlattenException::flattenArgs(). (sun)
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().
2014-02-04 08:06:39 +01:00
sun de32b8e3b9 Fixed recursion level incrementing in FlattenException::flattenArgs(). 2014-02-04 08:06:39 +01:00
Fabien Potencier acd3317de8 [HttpKernel] fixed wrong reference in TraceableEventDispatcher 2014-02-03 18:13:40 +01:00
Fabien Potencier d22a1eea70 minor #10184 [Console] $default can be string (Jmoati)
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
2014-02-03 07:37:36 +01:00
Jacques Moati 7e389fe955 $default can be string 2014-02-03 07:37:35 +01:00
Fabien Potencier 6e5576b9e1 minor #10177 [Process] Fix wording for class documentation (lol768)
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
2014-02-02 16:17:32 +01:00
lol768 905f2a091b Fix wording for Process class documentation 2014-02-02 16:17:32 +01:00
Fabien Potencier 7d07d24bfd minor #10174 [Console] Option can be bool too (eg. --force) (Jmoati)
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)
2014-02-01 19:09:00 +01:00
Jacques Moati 418429275d Option can be bool too (eg. --force) 2014-02-01 19:08:59 +01:00
Fabien Potencier e973fa45f5 bug #10151 [Form] Update DateTime objects only if the actual value has changed (peterrehm)
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
2014-01-29 07:46:08 +01:00
Peter Rehm 1f22d3a564 [Form] Update DateTime objects only if the actual value has changed 2014-01-29 07:46:08 +01:00
Fabien Potencier c476d13b57 Revert "bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco)"
This reverts commit 61625b466d, reversing
changes made to 3558588891.
2014-01-28 16:54:04 +01:00
Fabien Potencier 625a4b9650 [HttpFoundation] fixed typo 2014-01-28 16:07:56 +01:00