This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes#16742).
Discussion
----------
[Console][ProgressBar] redrawFrequency should never be 0
Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce a "division by zero" error.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
### why?
I had a piece of code that used a ProgressBar and set the redraw frequency to a calculated value. In some cases this calculated value was 0 (or just smaller than 1, internally a cast to `int` is made). In the `setProgress` the redraw frequency is used for a calculation of the period. There the error happens (and shows that redraw frequency should never be 0).
### Ticket
There is no ticket concerning this issue. I could do one, if you want.
### Tests
This gets tested implicitly in `ProgressBarTest::testNonDecoratedOutputWithoutMax`.
Commits
-------
a1c207c Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce an error.
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] Clean deps now that 2.8.0 is tagged
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e6efe7e [TwigBridge] Clean deps now that 2.8.0 is tagged
This PR was merged into the 2.8 branch.
Discussion
----------
[MonologBridge] Monolog Bridge 2.8 is incompatible with HttpKernel 3.0
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16837
| License | MIT
| Doc PR | none
Greetings from the SymfonyCon hackday. I wanted to start my day with an easy PR. 😉
As pointed out by @anlutro in #16837, MonologBridge 2.8 uses a deprecated interface of HttpKernel that has been removed in 3.0. Because of this, MonologBridge 2.8 must not be marked as compatible with HttpKernel 3.0 in composer.json.
Commits
-------
cb8d2c3 Disallow http-kernel 3.x, fixes#16837.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#16798).
Discussion
----------
[Process] Unset callback after stop to free memory
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As of yet, a `Process` instance can't free memory.
The built-in callback has a self-reference to the intance not cleared after instance destruction.
I've tried to change both `buildCallback` and https://github.com/symfony/process/blob/v2.7.6/Process.php#L1373 usage to avoid self-referencing, but it can't be done without breaking BC, and the memory issue is still there.
A simple test script (that obiously can't be embedded in unit-tests)
```php
for ($inc = 0; $inc < 10000; $inc++) {
$process = new Symfony\Component\Process\Process('echo 1');
$process->mustRun();
$process->stop();
unset($process);
echo (memory_get_usage(true) / 1000000) . ' MB ' . $inc . PHP_EOL;
}
```
Before:
```
1.572864 MB 0
5.505024 MB 9999
```
After:
```
1.572864 MB 0
1.572864 MB 9999
```
Ok, in this simple scenario 4 MB of RAM is nothing, but in our business app full of IOC where `unset`-ting is hard, our RAM explodes.
After `stop()`, the callback is no longer necessary.
To be clear, the garbage collector in the previous example was already active.
Deactivating it manually, which somewhere is needed to avoid particluar segfaults, obiously leads to worse scenarios:
Before:
```
gc_disable();
1.572864 MB 0
29.360128 MB 9999
```
After:
```
gc_disable();
1.572864 MB 0
1.572864 MB 9999
```
Commits
-------
ec93b9a [Process] Unset callback after stop to free memory
This PR was squashed before being merged into the 2.3 branch (closes#16799).
Discussion
----------
Improve error message for undefined DIC aliases
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
Additionally, I think the arguments need to be the other way round (`templating` is an alias pointing to `templating.engine.twig`).
Commits
-------
9195cd3 Improve error message for undefined DIC aliases
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Validate class names and factory methods
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Because, you know, people do mistakes... I saw this happening during a workshop: when e.g. the factory tag has no `method` attribute, we generate an container that embeds a parse error.
Commits
-------
b2e3850 [DependencyInjection] Validate class names and factory methods
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#16825).
Discussion
----------
[VarDumper] fix .sf-dump z-index (debug bar conflict)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16824
| License | MIT
| Doc PR | -
Just changed the z-index because the twig dump is actually displaying over the debug bar (#16824).
Commits
-------
a72efb9 [VarDumper] fixed .sf-dump z-index
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#16821).
Discussion
----------
[VarDumper] ampq → amqp
| Q | A
| ------------- | ---
| Fixed tickets | #16821
| License | MIT
Fixed typo in code comment.
Commits
-------
717caaa ampq → amqp
This PR was merged into the 2.3 branch.
Discussion
----------
CS: remove unneeded parentheses around control statements
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Commits
-------
45d250d CS: remove unneeded parentheses around control statements
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#16772).
Discussion
----------
Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
| 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
This fixes a "Database not Found" error when using `doctrine/orm` 2.5 while warming up your cache under certain situations. Basically, if you use the `EntityUserProvider`, then during cache warmup, Twig requires the `security.authorization_checker` which eventually requires this `EntityUserProvider`, which previously caused Doctrine to calculate the metadata for your User class. If no database exists (and you haven't specified the platform), you'll get the error.
More broadly, this simply tries to do less work in the constructor. It's a "bug fix", only kind of, but as it's completely an internal refactoring, it should be quite safe.
Thanks!
Commits
-------
44a2861 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
This PR was merged into the 2.8 branch.
Discussion
----------
Added the renamed options of the collection type to the upgrade information
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7aac273 Added the renamed options of the collection type to the upgrade information
This PR was merged into the 2.8 branch.
Discussion
----------
Fix BC for the default root form name
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15760
| License | MIT
| Doc PR | n/a
The block prefix is used, to match the previous behavior when using a custom block prefix.
The form type is now retrieved twice from the registry here, but this should not be an issue:
- unnamed forms are created only at the root, so only once per form at most (child forms are always named explicitly)
- the registry caches the resolved type, so the second access is just accessing the key in the array and returning it
Commits
-------
0a54d09 Fix BC for the default root form name
* 2.7:
[Process] Fix signaling/stopping logic on Windows
Forward compatibility with AbstractLayout* 2.8 tests
[Yaml] minor CS cleaning
[Console] do not encode backslashes in console default description
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix signaling/stopping logic on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9afbea2 [Process] Fix signaling/stopping logic on Windows