This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Refactor serializer normalize method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The serializer normalize method contains some dead or duplicate code. This PR refactor the method to make it simpler.
I tried to keep the same Exceptions in the same situations but they could probably be simplified too. (The last case only append if you pass a ressource to the serializer.)
Commits
-------
2bb5f45 Refactor serializer normalize method
This PR was merged into the 2.7 branch.
Discussion
----------
Fixed Bootstrap form theme form "reset" buttons
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14290
| License | MIT
| Doc PR | -
All the credit for this solution goes to @AntonioAmore, who reported the error originally and provided a solution. I only confirmed the bug and verified the proposed solution.
Commits
-------
67c7f05 Fixed Bootstrap form theme form "reset" buttons
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Process] Fix typo, no arguments needed anymore
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
Commits
-------
7f89158 [Process] Fix typo, no arguments needed anymore
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
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
This PR was merged into the 2.7 branch.
Discussion
----------
synchronize 2.7 and 3.0 upgrade files
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16667
| License | MIT
| Doc PR |
This is a first step into solving #16667 by checking also the entries from the `UPGRADE-2.7.md` file.
Commits
-------
8d5b9d5 synchronize 2.7 and 3.0 upgrade files
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] Use is_subclass_of instead of reflection
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
Follows https://github.com/symfony/symfony/pull/17400
>
For performance reason, I replaced a reflection instantiation by ``is_subclass_of``.
Commits
-------
5af5d06 Use is_subclass_of instead of reflection
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
This PR was merged into the 2.7 branch.
Discussion
----------
fix merge 2.3 into 2.7 for SecureRandom dependency
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 8d7b19fbbe
| License | MIT
| Doc PR | -
As the SecureRandom service moved from SecurityBundle to FrameworkBundle, the dependency needs to be moved as well.
Commits
-------
aedeebb fix merge 2.3 into 2.7 for SecureRandom dependency
* 2.3:
Fixed correct class name in thrown exception
Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
Removed a duplicated test in CardSchemeValidatorTest
Fix perf and mem issue when using token_get_all
[SecurityBundle] fix SecureRandom service constructor args
Normalize params only when used.
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] Use label_format option for checkbox and radio labels
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
dc8f780 [TwigBridge] Use label_format option for checkbox and radio labels
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.
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
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
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
* 2.3:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
Conflicts:
.travis.yml
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/HttpKernel/Kernel.php
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
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