Commit Graph

22103 Commits

Author SHA1 Message Date
Fabien Potencier
8d894a4bcc updated CHANGELOG for 2.7.5 2015-09-25 13:14:54 +02:00
Fabien Potencier
264f694011 Merge branch '2.3' into 2.7
* 2.3:
  bumped Symfony version to 2.3.34
  updated VERSION for 2.3.33
  update CONTRIBUTORS for 2.3.33
  updated CHANGELOG for 2.3.33
2015-09-25 13:01:10 +02:00
Fabien Potencier
87b66a1d00 bumped Symfony version to 2.3.34 2015-09-25 12:48:04 +02:00
Nicolas Grekas
4d7f95cdbc minor #15888 [Console] Fix transient HHVM test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix transient HHVM test

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

Follow up of #15848

Commits
-------

945ec0e [Console] Fix transient HHVM test
2015-09-25 11:19:55 +02:00
Fabien Potencier
3b8a8ee48e updated VERSION for 2.3.33 2015-09-25 11:08:49 +02:00
Fabien Potencier
f75b643035 update CONTRIBUTORS for 2.3.33 2015-09-25 11:08:23 +02:00
Fabien Potencier
3f2ad986b3 updated CHANGELOG for 2.3.33 2015-09-25 11:07:38 +02:00
Nicolas Grekas
945ec0e40c [Console] Fix transient HHVM test 2015-09-25 10:32:23 +02:00
Fabien Potencier
507e959e37 bug #15866 [VarDumper] Fix dump comparison on large arrays (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dump comparison on large arrays

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

Commits
-------

6a6e7f3 [VarDumper] Fix dump comparison on large arrays
2015-09-25 09:04:33 +02:00
Fabien Potencier
8eda312fc4 bug #15878 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies (lemoinem)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #15878).

Discussion
----------

[OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies

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

If an Option's normalizer (or lazy default) catches an exception thrown from one of its dependencies, the OptionResolver was left in an inconsistent state which would trigger a false positive cyclic dependency if the throwing option or any of its parent dependencies between it and the catching one are ever called again.

Commits
-------

9a188c5 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies
2015-09-25 08:59:17 +02:00
Mathieu Lemoine
9a188c5215 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies 2015-09-25 08:59:16 +02:00
Fabien Potencier
7d674c2135 fixed tests 2015-09-25 08:52:54 +02:00
Fabien Potencier
21e2218e14 minor #15881 Fixing security test locations (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixing security test locations

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

There were just missed on sha: 0601ed33c4 probably because there were on a different branch.

Cheers!

Commits
-------

16e09d3 Fixing test locations
2015-09-25 08:48:53 +02:00
Fabien Potencier
31d76ec0f7 minor #15538 [expression-language] Code Cleanup for GetAttrNode (zerustech)
This PR was merged into the 2.7 branch.

Discussion
----------

[expression-language] Code Cleanup for GetAttrNode

Use ``$this->nodes['attribute']->attributes['value']`` to
replace ``$this->nodes['attribute']->evaluate($functions, $values)``
for method call and property call.

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

166e175 [expression-language] Code Cleanup for GetAttrNode
2015-09-24 13:58:55 +02:00
Ryan Weaver
16e09d3eaa Fixing test locations 2015-09-23 21:45:13 -04:00
Pierre du Plessis
6a217dcecc Use random_bytes function if it is available for random number generation 2015-09-23 21:31:18 +02:00
Tobias Schultze
8dcf14a02e Fix syntax in a test 2015-09-23 13:13:27 +02:00
Fabien Potencier
6d9cba8ae5 minor #15867 Normalize the way we check versions (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

Normalize the way we check versions

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

Commits
-------

121eade Normalize the way we check versions
2015-09-23 11:21:02 +02:00
Romain Neutron
121eade822 Normalize the way we check versions 2015-09-23 11:17:11 +02:00
Romain Neutron
6a6e7f3947 [VarDumper] Fix dump comparison on large arrays 2015-09-22 16:41:01 +02:00
Nicolas Grekas
b6604f3e6f Merge branch '2.3' into 2.7
* 2.3:
  Finnish translation fix
  [CssSelector] Optimize regexs matching simple selectors
  Fix the phpdoc in the CssSelector TranslatorInterface
  [Console] Add clock mock to fix transient test on HHVM
  [EventDispatcher] skip one lazy loading call
  [EventDispatcher] fix memory leak in a getListeners
2015-09-22 15:49:29 +02:00
Fabien Potencier
984019382a bug #15795 [Console] Default to stderr for the console helpers (2.7+) (alcohol)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Default to stderr for the console helpers (2.7+)

Interactive input/output and informational output such as progress should go to `stderr` if available.

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

Only merge if #15794 is merged.

If someone explicitly wants to use `stdout`, they can simply pass `$output->getStream()` instead of `$output` in most use-cases.

Commits
-------

90c2a96 Default to stderr for console helpers (only merge if #15794 gets merged)
2015-09-22 14:21:01 +02:00
Fabien Potencier
b2f7753daf bug #15821 [EventDispatcher] fix memory leak in getListeners (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] fix memory leak in getListeners

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

Commits
-------

a7b7f54 [EventDispatcher] skip one lazy loading call
ec59953 [EventDispatcher] fix memory leak in a getListeners
2015-09-22 13:41:56 +02:00
Fabien Potencier
d9d5dbf5d9 bug #15859 [Config] Fix enum default value in Yaml dumper (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix enum default value in Yaml dumper

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

The default value is not correctly included when dumping an EnumNode in Yaml. This is now fixed

Commits
-------

d135d82 [Config] Fix enum default value in Yaml dumper
2015-09-21 18:36:22 +02:00
maxime.steinhausser
0e24fc5820 [Yaml] Fix improper comments removal inside strings 2015-09-21 17:13:05 +02:00
Romain Neutron
d135d8282d [Config] Fix enum default value in Yaml dumper 2015-09-21 17:02:29 +02:00
Fabien Potencier
bd415c6985 minor #15843 Finnish translation fix (Kasperki)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15843).

Discussion
----------

Finnish translation fix

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

Fix for finnish translation typo
https://github.com/symfony/symfony/issues/15790

Commits
-------

84fbfb0 Finnish translation fix
2015-09-21 08:03:52 +02:00
Kasperki
84fbfb0131 Finnish translation fix 2015-09-21 08:03:51 +02:00
Fabien Potencier
3da8af8890 minor #15852 [CssSelector] Optimize regexs matching simple selectors (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] Optimize regexs matching simple selectors

| 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

These shortcut parsers are applied first when converting a CSS selector to XPath, to be faster for simple selectors (tag matching, class matching with an optional tag, id matching with an optional tag).
None of the regexes defined here could have more chances to match more element when backtracking identifiers. So the backtracking is only slowing down the regex engine when the regex does not match (i.e. for any more complex selector for instance, or even for simple selectors without namespace of without tag name). Making quantifiers possessive solves this issue.

I also turned some capturing groups (around the namespace and the namespace delimiter) into non-capturing groups as we don't care about them in the output (they are just here to be optional).

Commits
-------

d5abe0b [CssSelector] Optimize regexs matching simple selectors
2015-09-21 08:00:16 +02:00
Fabien Potencier
451bdc0bf0 minor #15848 [Console] Add clock mock to fix transient test on HHVM (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Add clock mock to fix transient test on HHVM

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

This should fix the most frequent transient test on HHVM (ProgressBarTest::testAnsiColorsAndEmojis)

Commits
-------

549f43b [Console] Add clock mock to fix transient test on HHVM
2015-09-21 07:58:06 +02:00
Fabien Potencier
e47d3f1e7b minor #15851 Fix the phpdoc in the CssSelector TranslatorInterface (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix the phpdoc in the CssSelector TranslatorInterface

| 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

The phpdoc of the interface does not match the behavior of the implementation. And the return type documented by the interface is impossible to return because the interface asks to apply a string prefix, and the only way is to cast the ``XPathExpr`` used internally to a string (which is what the implementation does).

This interface is an internal interface anyway.

Commits
-------

93ffa61 Fix the phpdoc in the CssSelector TranslatorInterface
2015-09-21 07:55:21 +02:00
Christophe Coevoet
d5abe0b114 [CssSelector] Optimize regexs matching simple selectors 2015-09-21 02:13:44 +02:00
Christophe Coevoet
93ffa61e42 Fix the phpdoc in the CssSelector TranslatorInterface 2015-09-21 01:46:31 +02:00
Tobias Schultze
0ad587aec3 minor #15847 [DomCrawler] Optimize the regex used to find namespace prefixes (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] Optimize the regex used to find namespace prefixes

| 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

I ran Blackfire on the [Mink BrowserKitDriver](https://github.com/minkphp/MinkBrowserKitDriver) testsuite (which is a realistic usage of the Mink API btw, as the driver testsuite is basically a functional test of a fixtures website, where failures are considered to be caused by the driver misbehaving).
I discovered that 17% of the time was spent in ``preg_match_all`` to look for prefixes in the XPath namespace prefixes (Mink does not use any namespace prefix in its Xpath queries).

This optimizes the regex to use a possessive quantifier. This avoids useless backtracking when matching (due to the way the regex is written, backtracking cannot allow finding more matches here). See https://blackfire.io/profiles/compare/21aaebf3-e38f-456a-8fc9-cf7d9e2a35eb/graph for the improvement.
The optimization is applied in the 2.7 branch, because this regex does not exist in 2.3: the registration of namespaces was added in 2.4

Commits
-------

02818e4 [DomCrawler] Optimize the regex used to find namespace prefixes
2015-09-21 00:21:34 +02:00
Nicolas Grekas
549f43b03a [Console] Add clock mock to fix transient test on HHVM 2015-09-20 23:33:09 +02:00
Christophe Coevoet
02818e4c92 [DomCrawler] Optimize the regex used to find namespace prefixes 2015-09-20 23:13:58 +02:00
Nicolas Grekas
f64cf23811 Merge branch '2.3' into 2.7
* 2.3:
  [Console] Fix whitespaces in fixture

Conflicts:
	src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt
	src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt
2015-09-19 22:42:33 +02:00
Nicolas Grekas
da29357d49 [Console] Fix whitespaces in fixture 2015-09-19 22:40:41 +02:00
Nicolas Grekas
1ba6cfee48 Merge branch '2.3' into 2.7
* 2.3:
  [travis] Remove PHP 7 from allowed failures
  [Finder] Optimize the hot-path
  Update Process.php

Conflicts:
	composer.json
	src/Symfony/Bridge/Doctrine/composer.json
	src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php
2015-09-19 21:59:23 +02:00
Fabien Potencier
72f3fe1470 minor #15836 [Form] fixed something: Remove whitespaces between <input> and <label> (ThomasLandauer)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #15836).

Discussion
----------

[Form] fixed something: Remove whitespaces between <input> and <label>

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

Reason: With the whitespaces, there would be a "gap" between `<input>` and `<label>` which is clickable, but doesn't activate the `<input>`.

It's easy to *add* some margin with CSS, whereas it's impossible to *remove* whitespaces with CSS.

Commits
-------

1b97c17 Remove whitespaces between <input> and <label>
2015-09-18 20:31:45 +02:00
Thomas Landauer
1b97c17c30 Remove whitespaces between <input> and <label>
Reason: With the whitespaces, there would be a "gap" between <input> and <label> which is clickable, but doesn't activate the <input>.

It's easy to *add* some margin with CSS, whereas it's impossible to *remove* whitespaces with CSS.
2015-09-18 20:31:45 +02:00
Tobias Schultze
c4bb79a794 minor #15817 [Process] Stopped Autoruns when shelling on windows (rquadling)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Stopped Autoruns when shelling on windows

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

Stop autoruns when shelling on Windows.

Original PR was on https://github.com/symfony/Process/pull/9#issuecomment-140721398.

Commits
-------

bca6771 Update Process.php
2015-09-18 15:09:04 +02:00
Tobias Schultze
b783e40422 minor #15831 [travis] Remove PHP 7 from allowed failures (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Remove PHP 7 from allowed failures

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

Looking at the latests PRs, PHP 7 does not segfault anymore with our test suite.

Commits
-------

ba8366e [travis] Remove PHP 7 from allowed failures
2015-09-18 15:05:57 +02:00
Nicolas Grekas
ba8366e208 [travis] Remove PHP 7 from allowed failures 2015-09-18 14:36:19 +02:00
Fabien Potencier
4e7644c597 bug #15826 [Finder] Optimize the hot-path (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] Optimize the hot-path

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

A significant part of the perf gain in #15802 was related to filters not being applied recursively...
#15824 fixing this, performance dropped again.

This PR optimizes the hot path by replacing a regexp test by a simple `isset` when possible.
Blackfire diff after #15824 is the following:
https://blackfire.io/profiles/compare/9e489018-998d-4acb-92a0-46011828e83b/graph

`preg_match` is not called anymore, and  `Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current()` is also cut by two.

When this `isset` optimization is disabled and replaced by a concatenation of all the regexps patterns in a single bigger one, the gain is still significant but lower:
https://blackfire.io/profiles/compare/db86b80e-b63e-4fc9-9ff3-9ed32baeb948/graph

This makes me think that an other and last round of optimization is possible by merging all regexps in one in MultiplePcreFilterIterator filters. If someone wants to work on this, please do it :)

Commits
-------

f156de6 [Finder] Optimize the hot-path
2015-09-18 12:01:26 +02:00
Nicolas Grekas
f156de6b71 [Finder] Optimize the hot-path 2015-09-18 11:35:50 +02:00
Nicolas Grekas
666f523984 Merge branch '2.3' into 2.7
* 2.3:
  [Finder] Fix recursive filter iterator
  Improve the structure of the Finder testsuite

Conflicts:
	src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php
	src/Symfony/Component/Finder/Tests/FinderTest.php
	src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php
2015-09-18 09:19:55 +02:00
Nicolas Grekas
89d75af805 bug #15804 [VarDumper] Fix HtmlDumper constructor calling CliDumper's (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix HtmlDumper constructor calling CliDumper's

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/var-dumper/pull/2#issuecomment-140338205
| License       | MIT
| Doc PR        | -

Commits
-------

4c7bb9c [VarDumper] Fix HtmlDumper constructor calling CliDumper's
2015-09-17 14:16:46 +02:00
Nicolas Grekas
4a9676b5a2 minor #15824 [Finder] Fix recursive filter iterator (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] Fix recursive filter iterator

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

#15802 was broken because the filters where not propagated to children iterators. This fixes the issue and adds a test case for this situation. The RecursiveIterator implementation is moved from FilterIterator to ExcludeDirectoryFilterIterator. Doing so on other filters is possible but would be a new feature that is not required for fixing the performance issue we had previously.

Commits
-------

cf3019b [Finder] Fix recursive filter iterator
2015-09-17 14:15:24 +02:00
Nicolas Grekas
cf3019bc5a [Finder] Fix recursive filter iterator 2015-09-17 10:48:13 +02:00