Commit Graph

17991 Commits

Author SHA1 Message Date
Matthieu Napoli
1b170d7a85 Improve the phpdoc of SplFileInfo methods 2016-01-19 13:10:23 +01:00
Tobias Schultze
b7024483e3 minor #17414 Remove useless duplicated tests (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

Remove useless duplicated tests

Although there isn't much speed difference, it makes no sense to run the same test twice.

| Q | A
| --- | ---
| License | MIT
| Fixed tickets | -

Commits
-------

deab127 Remove useless duplicated tests
2016-01-18 11:18:06 +01:00
Wouter J
deab127663 Remove useless duplicated tests 2016-01-18 10:52:44 +01:00
Fabien Potencier
80086ad54b minor #17399 [FrameworkBundle] Optimize framework extension tests (paradajozsef)
This PR was squashed before being merged into the 2.3 branch (closes #17399).

Discussion
----------

[FrameworkBundle] Optimize framework extension tests

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

```XmlFrameworkExtensionTest```, ```YamlFrameworkExtensionTest``` and ```PhpFrameworkExtensionTest``` are slow tests. The reason is that the [parent test](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php#L308) creates the container in every test case. With different parameters, but the same is created several times. (actually with 'full' parameter it is created 12 times in 2.3) If we cache the different containers during test, we avoid to creating the same container multiple times.

As I experienced it can be merged without a conflict into 2.3 and 2.7, but 2.8 and 3.0 conflicts.

I have these result on my local setup. Not that big optimalization, but a few second can matter too imo. :)

**2.3 before**

```go
Time: 8.79 seconds, Memory: 55.75Mb
OK (449 tests, 586 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

**2.3 after**

```go
Time: 5.85 seconds, Memory: 58.25Mb
OK (449 tests, 586 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**2.7 before**

```go
Time: 17.17 seconds, Memory: 81.50Mb
OK, but incomplete, skipped, or risky tests!
Tests: 753, Assertions: 1098, Skipped: 3.
Legacy deprecation notices (45)
OK src/Symfony/Bundle/FrameworkBundle
```
**2.7 after**

```go
Time: 12.65 seconds, Memory: 88.00Mb
OK, but incomplete, skipped, or risky tests!
Tests: 753, Assertions: 1098, Skipped: 3.
Legacy deprecation notices (41)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**2.8 before**

```go
Time: 18.94 seconds, Memory: 88.00Mb
OK, but incomplete, skipped, or risky tests!
Tests: 787, Assertions: 1159, Skipped: 3.
Legacy deprecation notices (89)
OK src/Symfony/Bundle/FrameworkBundle
```

**2.8 after**

```go
Time: 12.69 seconds, Memory: 94.50Mb
OK, but incomplete, skipped, or risky tests!
Tests: 787, Assertions: 1159, Skipped: 3.
Legacy deprecation notices (85)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**3.0 before**

```go
Time: 16.48 seconds, Memory: 73.75Mb
OK (741 tests, 1043 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

**3.0 after**

```go
Time: 11.49 seconds, Memory: 76.75Mb
OK (741 tests, 1043 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

Commits
-------

f6a078b [FrameworkBundle] Optimize framework extension tests
2016-01-17 17:17:04 +01:00
Paráda József
f6a078b96c [FrameworkBundle] Optimize framework extension tests 2016-01-17 17:17:03 +01:00
Fabien Potencier
5c034adc5d minor #17400 Use is_subclass_of instead of Reflection when possible (Ener-Getick)
This PR was merged into the 2.3 branch.

Discussion
----------

Use is_subclass_of instead of Reflection when possible

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

For performance reason, I replaced a reflection instantiation by ``is_subclass_of``

Commits
-------

51e3652 Use is_subclass_of instead of Reflection when possible
2016-01-16 19:09:48 +01:00
Ener-Getick
51e3652aeb Use is_subclass_of instead of Reflection when possible 2016-01-16 14:42:15 +01:00
Fabien Potencier
7d72f93e90 bug #17373 [SecurityBundle] fix SecureRandom service constructor args (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] fix SecureRandom service constructor args

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

Commits
-------

50d55f6 [SecurityBundle] fix SecureRandom service constructor args
2016-01-16 05:53:05 +01:00
Fabien Potencier
9d189137e3 minor #17364 [Bridge] [Doctrine] Normalize params only when used. [2.3] (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[Bridge] [Doctrine] Normalize params only when used. [2.3]

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

If no logger is set the params are not used so those don't have to be normalized.

Commits
-------

6852a46 Normalize params only when used.
2016-01-15 17:58:40 +01:00
Fabien Potencier
ac3111fe8a bug #17377 Fix performance (PHP5) and memory (PHP7) issues when using token_get_all (nicolas-grekas, peteward)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix performance (PHP5) and memory (PHP7) issues when using token_get_all

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

Although it's not the case anymore on PHP 7, on PHP 5, `is_array` checks are much slower than `isset` checks.

Also from @peteward in #17384:
>  New PHP7 memory manager will not release small buckets to OS automatically in cases exposed by `token_get_all()`. This function call addition specifically for PHP7 will reclaim this memory to keep the footprint down of long processe

> See above ticket and suggested actions by PHP internals team for long-running tasks (https://bugs.php.net/70098) - I think `cache:clear/warmup` on a heavy app justifies this.

> We're running on cloud-based hosting platforms under memory limitations (Platform.sh). When memory is exceeded we're into swap and the cache clearing process goes from seconds to minutes for the initial deployment, which really slows our development workflow and also causes holding page delays.

Commits
-------

e555aad Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
d1f72d8 Fix perf and mem issue when using token_get_all
2016-01-15 17:52:13 +01:00
Fabien Potencier
54442313ae bug #17389 [Routing] Fixed correct class name in thrown exception (fixes #17388) (robinvdvleuten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Fixed correct class name in thrown exception (fixes #17388)

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

This fixes the thrown exception. Instead of the complete file contents, the class name is used in the exception message.

Commits
-------

c847feb Fixed correct class name in thrown exception
2016-01-15 17:48:36 +01:00
Robin van der Vleuten
c847feb5f3 Fixed correct class name in thrown exception 2016-01-15 15:32:28 +01:00
Tobias Schultze
e489bba61d minor #17383 Removed a duplicated test in CardSchemeValidatorTest (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Removed a duplicated test in CardSchemeValidatorTest

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

I was looking into making `CardSchemeValidatorTest` faster. I couldn't make it, but I found a duplicated test.

Commits
-------

1974131 Removed a duplicated test in CardSchemeValidatorTest
2016-01-15 13:30:58 +01:00
Peter Ward
e555aade12 Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically 2016-01-15 10:01:44 +01:00
Javier Eguiluz
197413168c Removed a duplicated test in CardSchemeValidatorTest 2016-01-15 09:07:14 +01:00
Tobias Schultze
eaef88c565 bug #17358 [ClassLoader] Use symfony/polyfill-apcu (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Use symfony/polyfill-apcu

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

Fixes APC usage on PHP 7 or when APCu bc-layer is disabled

Commits
-------

623595f [ClassLoader] Use symfony/polyfill-apcu
2016-01-14 19:12:34 +01:00
Nicolas Grekas
623595f0d6 [ClassLoader] Use symfony/polyfill-apcu 2016-01-14 18:42:51 +01:00
Fabien Potencier
36df0a7d9b bug #17370 [HttpFoundation][Cookie] Cookie DateTimeInterface fix (wildewouter)
This PR was squashed before being merged into the 2.3 branch (closes #17370).

Discussion
----------

[HttpFoundation][Cookie] Cookie DateTimeInterface fix

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

I came across an issue with expiration times on cookies. They were not working with DateTimeImmutable but only the DateTime implementation itself. I refactored this to work with the DateTimeInterface.

Commits
-------

f1f9754 [HttpFoundation][Cookie] Cookie DateTimeInterface fix
2016-01-14 17:21:11 +01:00
Wouter de Wild
f1f9754bcb [HttpFoundation][Cookie] Cookie DateTimeInterface fix 2016-01-14 17:21:08 +01:00
Nicolas Grekas
d1f72d8ef4 Fix perf and mem issue when using token_get_all 2016-01-14 14:27:10 +01:00
Tobias Schultze
50d55f6855 [SecurityBundle] fix SecureRandom service constructor args 2016-01-14 14:17:14 +01:00
Possum
6852a46423 Normalize params only when used. 2016-01-14 11:04:11 +01:00
Fabien Potencier
bbbb0796f4 bumped Symfony version to 2.3.38 2016-01-14 10:59:28 +01:00
Fabien Potencier
8fe60fae1d Merge pull request #17362 from fabpot/release-2.3.37
released v2.3.37
2016-01-14 10:15:03 +01:00
Fabien Potencier
2f98f158c9 updated VERSION for 2.3.37 2016-01-14 10:14:51 +01:00
Fabien Potencier
656a1939a1 update CONTRIBUTORS for 2.3.37 2016-01-14 10:14:40 +01:00
Fabien Potencier
1cd8aa1605 updated CHANGELOG for 2.3.37 2016-01-14 10:14:30 +01:00
Fabien Potencier
54d7f2dfb9 security #17359 do not ship with a custom rng implementation (xabbuh, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

do not ship with a custom rng implementation

Commits
-------

b91441c removed obsolete tests, fixed composer.json
fcd3160 do not ship with a custom rng implementation
2016-01-14 09:59:32 +01:00
Fabien Potencier
b91441c6cc removed obsolete tests, fixed composer.json 2016-01-14 09:49:27 +01:00
Christian Flothmann
fcd3160a0f do not ship with a custom rng implementation 2016-01-14 09:34:47 +01:00
Fabien Potencier
5781bbce01 bug #17326 [Console] Display console application name even when no version set (polc)
This PR was squashed before being merged into the 2.3 branch (closes #17326).

Discussion
----------

[Console] Display console application name even when no version set

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

When displaying help of an Application with a name but no version, it show "Console Tool" instead of the application name.

Commits
-------

61e810e [Console] Display console application name even when no version set
2016-01-14 08:51:59 +01:00
Paul LE CORRE
61e810e769 [Console] Display console application name even when no version set 2016-01-14 08:51:57 +01:00
Fabien Potencier
c8c94772b5 minor #17354 [2.3] Remove empty statements. (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Remove empty statements.

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

Test run for new fixer to see if it would be suitable for SF.
For ref.: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1671

Commits
-------

4491c97 Remove empty statements.
2016-01-14 08:48:21 +01:00
Possum
4491c970b3 Remove empty statements. 2016-01-13 18:07:01 +01:00
Nicolas Grekas
26af0ae56b minor #17348 [Yaml] Fix tests on PHP 7.0.2 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Fix tests on PHP 7.0.2

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

Related to https://bugs.php.net/66179 that has been fixed in 7.0.2

Commits
-------

902f6dd [Yaml] Fix tests on PHP 7.0.2
2016-01-13 10:03:05 +01:00
Nicolas Grekas
902f6ddb93 [Yaml] Fix tests on PHP 7.0.2 2016-01-13 09:54:41 +01:00
Fabien Potencier
7a02f4e43e minor #17346 [2.3] Workaround https://bugs.php.net/63206 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Workaround https://bugs.php.net/63206

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

This bug has almost no chance to be hit in this code but still, cleaning any potential issue is worth.

Commits
-------

c5479dd [2.3] Workaround https://bugs.php.net/63206
2016-01-13 08:40:10 +01:00
Nicolas Grekas
c5479dde8c [2.3] Workaround https://bugs.php.net/63206 2016-01-13 08:28:48 +01:00
Tobias Schultze
36eb8188ca minor #17344 [Event Dispatcher] Add closing parenthesis (omerida)
This PR was merged into the 2.3 branch.

Discussion
----------

[Event Dispatcher] Add closing parenthesis

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

Commits
-------

5cdccc4 Add closing parenthesis
2016-01-13 00:06:22 +01:00
omerida
5cdccc4350 Add closing parenthesis 2016-01-12 14:46:23 -05:00
Fabien Potencier
406e260c49 minor #17338 [Documentation] Typo fix (quentint)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17338).

Discussion
----------

[Documentation] Typo fix

Commits
-------

12fd48c Typo fix
2016-01-12 18:16:47 +01:00
Quentin
12fd48c192 Typo fix 2016-01-12 18:16:37 +01:00
Tobias Schultze
85d5ed29d7 bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] Remove normalizer cache in Serializer class

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

The serializer cache the normalizer/denormalizer to use based only on the class and format. But the supportsNormalization and supportDenormalization methods can decide based on the data passed leading to hard to find bugs when the serializer used a cached normalizer it shouldn't use.

Commits
-------

8566dc1 Remove normalizer cache in Serializer class
2016-01-12 13:31:34 +01:00
Fabien Potencier
f1cce4e139 minor #17282 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #17282).

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended):
    - several code constructs simplification
    - decoupling statements from foreach
    - extra colons/parenthesis removal (code style)
    - correct string functions usage (micro-optimization)
    - variable functions usage (php 5 compatible)

Commits
-------

81f8181 [2.3] Static Code Analysis for Components
2016-01-12 12:31:36 +01:00
Vladimir Reznichenko
81f81812a5 [2.3] Static Code Analysis for Components 2016-01-12 12:31:34 +01:00
Fabien Potencier
a02bd4b753 bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix paths with % in it (like urlencoded)

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

Commits
-------

de7b4d7 Fix #17306 Paths with % in it are note allowed (like urlencoded)
2016-01-11 11:07:30 +01:00
Fabien Potencier
aa9801e8a2 bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #17078).

Discussion
----------

[Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator

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

Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)

Commits
-------

6ebd179 Added support \IteratorAggregate for UniqueEntityValidator
2016-01-11 11:04:47 +01:00
Disparity
6ebd1792d8 Added support \IteratorAggregate for UniqueEntityValidator
Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)
2016-01-11 11:04:46 +01:00
Pavel Batanov
de7b4d73c6 Fix #17306 Paths with % in it are note allowed (like urlencoded) 2016-01-09 15:55:11 +03:00
Fabien Potencier
5d63c554e8 bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17287).

Discussion
----------

[HttpKernel] Forcing string comparison on query parameters sort in UriSigner

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

The signing of an url fails when using query parameters with integers as keys.
The ksort function in the ```UriSigner``` class changes the order of the query params and causes to generate a different hash which results in a failed check.

In this PR we force a string comparison for ksort which keeps the correct order of parameters.

Commits
-------

2040139 Added sort order SORT_STRING for params in UriSigner
2016-01-07 14:44:10 +01:00