Commit Graph

17625 Commits

Author SHA1 Message Date
Fabien Potencier
7a142fd17b minor #15665 Fix phpdoc block of NativeSessionStorage class (Diego Campoy)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15665).

Discussion
----------

Fix phpdoc block of NativeSessionStorage class

Commits
-------

f181ea8 Fix phpdoc block of NativeSessionStorage class
2015-09-26 10:28:37 +02:00
Diego Campoy
f181ea89e3 Fix phpdoc block of NativeSessionStorage class 2015-09-26 10:28:37 +02:00
Fabien Potencier
ddf79da4f9 bug #15682 [Form] Added exception when setAutoInitialize() is called when locked (jaytaph)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #15682).

Discussion
----------

[Form] Added exception when setAutoInitialize() is called when locked

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

It seems that this method was missing a "locked" check, since it changes state and a locked instance should be immutable. However, because `setAutoInitialize()` is useful during the building of a form, it doesn't really matter a lot whether or not it is changed. But for consistency, it would be nicer if this method too was checked.

Commits
-------

c269d6f Added exception when setAutoInitialize is called when locked
2015-09-26 10:25:01 +02:00
Joshua Thijssen
c269d6feda Added exception when setAutoInitialize is called when locked 2015-09-26 10:25:00 +02:00
Fabien Potencier
16ba4579a7 bug #15846 [FrameworkBundle] Advanced search templates of bundles (yethee)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15846).

Discussion
----------

[FrameworkBundle] Advanced search templates of bundles

| 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

It uses two different locations to search templates of bundle by `TemplateFinder`, as described in the documentation.

Useful for TwigBundle, in cases when uses the custom templates for error pages.

Commits
-------

3ba1460 [FrameworkBundle] Advanced search templates of bundles
2015-09-26 10:02:47 +02:00
yethee
3ba14604a7 [FrameworkBundle] Advanced search templates of bundles
It uses two different locations to search templates of bundle,
as described in the documentation.
2015-09-26 10:02:46 +02:00
Fabien Potencier
25dccf1bb5 minor #15875 Use random_bytes function if it is available for random number generation (pierredup)
This PR was merged into the 2.3 branch.

Discussion
----------

Use random_bytes function if it is available for random number generation

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

This is an attempt to use the random_bytes function when generating secure random numbers. This function is included in PHP 7 or through the "paragonie/random_compat" library.

This PR only adds support to use the function if it is available. Changes that can be added is to add a hard dependency on the paragonie/random_compat library, so all current functionality can be deprecated.

Commits
-------

6a217dc Use random_bytes function if it is available for random number generation
2015-09-26 09:44:41 +02:00
Fabien Potencier
058bad4c28 bug #15895 [Security] Allow user providers to be defined in many files (lyrixx)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Allow user providers to be defined in many files

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

Commits
-------

9165191 [Security] Allow user providers to be defined in many files
2015-09-26 09:28:39 +02:00
Grégoire Pineau
9165191816 [Security] Allow user providers to be defined in many files 2015-09-25 15:16:17 +02:00
Fabien Potencier
87b66a1d00 bumped Symfony version to 2.3.34 2015-09-25 12:48:04 +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
Pierre du Plessis
6a217dcecc Use random_bytes function if it is available for random number generation 2015-09-23 21:31:18 +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
maxime.steinhausser
0e24fc5820 [Yaml] Fix improper comments removal inside strings 2015-09-21 17:13:05 +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
Nicolas Grekas
549f43b03a [Console] Add clock mock to fix transient test on HHVM 2015-09-20 23:33:09 +02:00
Nicolas Grekas
da29357d49 [Console] Fix whitespaces in fixture 2015-09-19 22:40:41 +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
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
Tobias Schultze
a7b7f5479e [EventDispatcher] skip one lazy loading call 2015-09-17 03:42:05 +02:00
Tobias Schultze
ec59953f4c [EventDispatcher] fix memory leak in a getListeners 2015-09-17 03:14:14 +02:00
Richard Quadling
bca67712d0 Update Process.php
Stop autoruns when shelling on Windows.

Original PR was on https://github.com/symfony/Process/pull/9#issuecomment-140721398.
2015-09-16 14:19:29 +01:00
Fabien Potencier
4f9a411389 minor #15808 Improve the structure of the Finder testsuite (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Improve the structure of the Finder testsuite

| 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

Testing against different adapters is now handled by multiple subclasses of a common test case rather than using data providers. This allows tests to be marked as skipped for unsupported adapters instead of making them disappear from the testsuite.
This will also make it much easier to mark tests for the find-based adapters as legacy ones when deprecating them.
This correspond to changes done by @nicolas-grekas in https://github.com/symfony/symfony/pull/15805, backported to 2.3 and with the data providers removed (his PR was keeping data providers for the adapter but making it return a single adapter all the time, hence the much bigger diff in my PR).
All tests in AbstractFinderTest are just moved from the FinderTest (they are all the tests running against multiple adapters). FinderTest itself runs the PhpAdapter (as this is the logic we want to keep in the finder in 3.0). I also tried to have a PhpFinderTest and keeping FinderTest only with the extra tests, but this would make things harder to merge branches between 2.8 and 3.0 in the future (once we remove other adapter tests) as we could simply keep the AbstractFinderTest in 3.0 for now to ease merging PRs adding new tests for bug fixes.

Commits
-------

20f2d03 Improve the structure of the Finder testsuite
2015-09-16 11:14:30 +02:00
Jakub Zalas
4982b02bdd [Console] Add the command name to input arguments if it's missing 2015-09-16 09:04:45 +01:00
Christophe Coevoet
20f2d03d2e Improve the structure of the Finder testsuite
Testing against different adapters is now handled by multiple subclasses
of a common test case rather than using data providers. This allows
tests to be marked as skipped for unsupported adapters instead of making
them disappear from the testsuite.
2015-09-16 09:54:32 +02:00
Fabien Potencier
150bcc9f64 bug #15802 [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories (nicolas-grekas)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15802).

Discussion
----------

[Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories

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

By implementing RecursiveIterator in FilterIterator, we can make it able to skip children of excluded branches of recursive inner iterators.
We use it immediately for our main target: skip over children of excluded directories in the Finder.
This is a significant performance boost when iterating over big directories, thus the "bugfix" status.

Commits
-------

8c691bd [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories
2015-09-15 13:35:07 +02:00
Nicolas Grekas
8c691bd01f [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories 2015-09-15 13:35:06 +02:00
Fabien Potencier
306d88a1e3 bug #15803 [Finder] Exclude files based on path before applying the sorting (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] Exclude files based on path before applying the sorting

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

Sorting can be slow, so it is best to applied it after all filtering rules are applied instead of using a bigger list and filtering again after that.

This impacts only people using both the sorting and the name filtering (with ``->names()`` or ``notNames()``)

Commits
-------

e5bf0ab Exclude files based on path before applying the sorting
2015-09-15 11:46:38 +02:00
Christophe Coevoet
e5bf0ab877 Exclude files based on path before applying the sorting
Sorting can be slow, so it is best to applied it after all filtering
rules are applied instead of using a bigger list and filtering again
after that.
2015-09-15 11:15:55 +02:00
Fabien Potencier
47b17ebef4 minor #15791 [Console] fix phpdoc of DialogHelper (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] fix phpdoc of DialogHelper

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

Commits
-------

fd22d8f [Console] fix phpdoc of DialogHelper
2015-09-15 09:14:43 +02:00
Fabien Potencier
68353a6305 fixed composer.json 2015-09-14 17:18:35 +02:00
Tobias Schultze
fd22d8fa03 [Console] fix phpdoc of DialogHelper 2015-09-14 17:16:40 +02:00
Fabien Potencier
6d3f124854 bug #13794 [DomCrawler] Invalid uri created from forms if base tag present (danez)
This PR was squashed before being merged into the 2.3 branch (closes #13794).

Discussion
----------

[DomCrawler] Invalid uri created from forms if base tag present

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

Since #13145 was merged the provided testcase does not work anymore and creates an invalid link

This affects the latest versions of 2.3, 2.5, 2.6 and 2.7

Right now this PR only includes the failing test, as I could no easy find a fix. If someone immediately knows whats the problem, give me a hint please.

Commits
-------

dc57a7a [DomCrawler] Invalid uri created from forms if base tag present
2015-09-14 16:00:14 +02:00
Daniel Tschinder
dc57a7a5a7 [DomCrawler] Invalid uri created from forms if base tag present 2015-09-14 16:00:12 +02:00
Fabien Potencier
3cf95ee08a minor #15789 [Console] update param type phpdoc for StreamOutput (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] update param type phpdoc for StreamOutput

Makes it consistent with `getStream()`

| 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

Commits
-------

c036352 [Console] update param type phpdoc for StreamOutput
2015-09-14 15:17:39 +02:00
Fabien Potencier
d87db39aa1 bug #15637 Use ObjectManager interface instead of EntityManager (gnat42)
This PR was merged into the 2.3 branch.

Discussion
----------

Use ObjectManager interface instead of EntityManager

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

If you use the EntityManager Decorator pattern that doctrine provides
then simply specifying a query_builder closure where your decorated
em is used fails as it isn't an instance of Doctrine\ORM\EntityManager.
Testing against the ObjectManager interface fixes the issue.

Commits
-------

1f3ea0f Use ObjectManager interface instead of EntityManager
2015-09-14 15:16:06 +02:00
Tobias Schultze
c0363524a9 [Console] update param type phpdoc for StreamOutput 2015-09-14 14:22:54 +02:00