Commit Graph

16824 Commits

Author SHA1 Message Date
Fabien Potencier
3e8f33a2e1 feature #10201 [Debug] error stacking + fatal screaming + case testing (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Debug] error stacking + fatal screaming + case testing

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

Ported from https://github.com/nicolas-grekas/Patchwork/

Three enhancements for Symfony debug mode:

- detect case mismatches between loaded class name, its declared name and its source file name
- dismiss hard to debug blank pages related to non-catchable-@-silenced fatal errors (```@(new Toto) + parse error in Toto.php``` => enjoy debugging)
- work around https://bugs.php.net/42098 / https://bugs.php.net/54054 / https://bugs.php.net/60149 / https://bugs.php.net/65322 (fixed in 5.5.5)

An other thing I didn't port is scope isolation: the current `require` in autoloaders is done in their scope, so local $vars / $this (with access to private props/methods) is easily accessible from required files. Shouldn't proper separation prevent that?

Commits
-------

6de362b [Debug] error stacking+fatal screaming+case testing
2014-02-19 17:00:19 +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
838dc7e212 Merge branch '2.4'
* 2.4:
  Revert "bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)"
  Bypass sigchild detection if phpinfo is not available
2014-02-18 17:30:05 +01:00
Fabien Potencier
88118a2cf7 Merge branch '2.3' into 2.4
* 2.3:
  Revert "bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)"
  Bypass sigchild detection if phpinfo is not available

Conflicts:
	src/Symfony/Component/DomCrawler/Crawler.php
2014-02-18 17:29:54 +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
Fabien Potencier
5a5eb506e4 Merge branch '2.4'
* 2.4:
  Revert "Fix "Array was modified outside object" in ResizeFormListener."
  Added failing test
  bumped Symfony version to 2.4.3
  updated VERSION for 2.4.2
  updated CHANGELOG for 2.4.2
  bumped Symfony version to 2.3.11
  updated VERSION for 2.3.10
  update CONTRIBUTORS for 2.3.10
  updated CHANGELOG for 2.3.10
  [Console] removed problematic regex
  fixed various inconsistencies
  [DomCrawler] Added support for <area> tags to be treated as links
  Fix "Array was modified outside object" in ResizeFormListener.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2014-02-18 16:41:30 +01:00
Fabien Potencier
5ab9c3b3ca Merge branch '2.3' into 2.4
* 2.3:
  Revert "Fix "Array was modified outside object" in ResizeFormListener."
  Added failing test
  bumped Symfony version to 2.3.11
  updated VERSION for 2.3.10
  update CONTRIBUTORS for 2.3.10
  updated CHANGELOG for 2.3.10
  [Console] removed problematic regex
  [DomCrawler] Added support for <area> tags to be treated as links
  Fix "Array was modified outside object" in ResizeFormListener.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2014-02-18 16:41:06 +01:00
Jordi Boggiano
714aee9bc0 Bypass sigchild detection if phpinfo is not available 2014-02-18 14:12:33 +01:00
Stéphane PY
b949c49f26 [2.4][HttpKernel] Fix issue #10209
When the profiler has `only_exception` option activated and a subrequest
throw an exception, the parent profile cannot be found.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
2014-02-18 11:56:22 +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
Nicolas Grekas
6de362b9fb [Debug] error stacking+fatal screaming+case testing 2014-02-16 11:08:14 +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
Grégoire Pineau
19a368e068 [FramworkBundle] Added config:debug command 2014-02-13 15:16:29 +01:00
Grégoire Pineau
34f4ef5297 [FrameworkBundle][Console] Load command from DIC after command from bundles.
It's better to load a command from DIC after other one. Because it
allow easy override of default (symfony/assetic/doctrine) command.
The end user could do:

    # config.yml
    services:
        assetic.command.dump:
            class: SensioLabs\Shim\Assetic\DumpCommand
            tags:
                - { name: console.command }
2014-02-13 15:09:55 +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
82d9a76996 bumped Symfony version to 2.4.3 2014-02-12 22:00:41 +01:00
Fabien Potencier
b70633f92f updated VERSION for 2.4.2 2014-02-12 20:27:03 +01:00
Fabien Potencier
6d430f5a1d updated CHANGELOG for 2.4.2 2014-02-12 20:26:54 +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
Fabien Potencier
a68d69183d minor #10243 Various minor changes (for 2.4) (fabpot)
This PR was submitted for the 2.4-dev branch but it was merged into the 2.4 branch instead (closes #10243).

Discussion
----------

Various minor changes (for 2.4)

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

19f79c3 fixed various inconsistencies
2014-02-11 16:39:28 +01:00
Fabien Potencier
a6b1247689 fixed various inconsistencies 2014-02-11 16:39:28 +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
f828aee7f7 Merge branch '2.4'
* 2.4:
  fixed various inconsistencies
  reduced recursion when building DumperPrefixCollection
  renamed variables - making next change more readable
  removing dead code.
  [ExpressionLanguage] added some tests for the built-in constant() function
  [ExpressionLanguage] added some documentation about functions
  [DomCrawler] Fixed filterXPath() chaining
  [DomCrawler] Fixed incorrect handling of image inputs
2014-02-11 14:52:21 +01:00
Fabien Potencier
e2ac5dfc78 Merge branch '2.3' into 2.4
* 2.3:
  fixed various inconsistencies
  reduced recursion when building DumperPrefixCollection
  renamed variables - making next change more readable
  removing dead code.
  [DomCrawler] Fixed filterXPath() chaining
  [DomCrawler] Fixed incorrect handling of image inputs

Conflicts:
	src/Symfony/Component/DomCrawler/Crawler.php
	src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
	src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php
	src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php
	src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
	src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
2014-02-11 14:52:09 +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
d0386e4a5c minor #10214 [3.0][Console] Added isVerbosity* to OutputInterface (lyrixx)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[3.0][Console] Added isVerbosity* to OutputInterface

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

Now, only `Output` have theses methods. But in the `Command` class, `execute` receive an instance of `OutputInterface`. So, to avoid coding against an implementation, theses method should be added to the interface.

Commits
-------

816b295 [3.0][Console] Added isVerbosity* to OutputInterface
2014-02-10 15:30:52 +01:00
Fabien Potencier
4ab78e0561 minor #10222 [ExpressionLanguage] added some documentation about functions (fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[ExpressionLanguage] added some documentation about functions

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

This adds documentation about how to define a function in the expression language.

Commits
-------

600d481 [ExpressionLanguage] added some documentation about functions
2014-02-10 15:27:45 +01:00
Fabien Potencier
41cf1cc456 minor #10223 [ExpressionLanguage] added some tests for the built-in constant() function (fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[ExpressionLanguage] added some tests for the built-in constant() function

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

Commits
-------

d8f55f5 [ExpressionLanguage] added some tests for the built-in constant() function
2014-02-10 15:27:11 +01:00
Fabien Potencier
d8f55f5872 [ExpressionLanguage] added some tests for the built-in constant() function 2014-02-10 08:08:57 +01:00
Fabien Potencier
600d48162a [ExpressionLanguage] added some documentation about functions 2014-02-10 07:34:14 +01:00
Grégoire Pineau
816b295c75 [3.0][Console] Added isVerbosity* to OutputInterface
Now, only `Output` have theses methods. But in the `Command` class, `execute` receive an instance of `OutputInterface`. So, to avoid coding an implementation, theses method should be added to the interface.
2014-02-07 17:08:27 +01:00
Fabien Potencier
fe86efd3f2 feature #10200 [EventDispatcher] simplified code for TraceableEventDispatcher (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[EventDispatcher] simplified code for TraceableEventDispatcher

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

42e4c7b [EventDispatcher] simplified code for TraceableEventDispatcher
2014-02-06 12:23:12 +01:00
Fabien Potencier
6dfdb97f88 feature #10198 [Stopwatch] Allow getting duration of events without calling stop() (jochenvdv)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Stopwatch] Allow getting duration of events without calling stop()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | [#10175](https://github.com/symfony/symfony/issues/10175)
| License       | MIT
| Doc PR        | [#3539](https://github.com/symfony/symfony-docs/pull/3539)

Commits
-------

2efe461 Allow retrieving unstopped stopwatch events
d3d097d Include running periods in duration
2014-02-05 17:42:00 +01:00