This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes#27929).
Discussion
----------
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Method `\Symfony\Component\HttpFoundation\HeaderBag::get` return type was declared only as `string|string[]` but there is also possibility of returning of `null` value since the `null` is the default value for second parameter.
Commits
-------
a72f4ecb3a [HttpFoundation] Fixed phpdoc for get method of HeaderBag
This PR was merged into the 4.1 branch.
Discussion
----------
[EventDispatcher] Clear orphaned events on reset
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
When the Orphaned Events feature was added in #24392 it was forgotten to also clear them when the `reset` method on the `TraceableEventDispatcher` is called. This makes the Orphaned Events tab on the Event profiler an evergrowing list when using PHP-PM (or other event loop implementations).
Commits
-------
d3260dfdcd [EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
This PR was merged into the 4.1 branch.
Discussion
----------
[DependencyInjection] add missing test for #27710
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/27710#pullrequestreview-131904804
| License | MIT
| Doc PR |
Commits
-------
a265caf041 [DependencyInjection] add missing test for #27710
This PR was merged into the 3.4 branch.
Discussion
----------
[Form/Profiler] Massively reducing memory footprint of form profiling pages...
… by removing redundant 'form' variable from view variables.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
## Problem
When trying to profile large forms in web profiler, the page can get so big that the memory footprint of the web browser excedes 1Gb making everything unusable and sometimes crashing the browser.
This is especially true for "deep" forms as every node of the form also contains its children in the debugging infos.
## Solution
When removing the "form" view variable that actually contains duplicated contents of everything already displayed in the page, the memory footprint massively decrease making the page usable again even form very complex and deep forms.
By using CutStub, we keep a necessary level of information by providing the information that the variable is indeed here but not directly accessible in the dump.
Commits
-------
5f5077f4fc [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] correctly return parameter's default value on "--"
Fixes#27916
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27916
| License | MIT
| Doc PR | n/a
The tests have been adjusted to use a default value different from the one in `A*Input::getParameterOption()`'s signature. This would have detected the bug in the first place and should prevent future regressions.
Commits
-------
d78dcc0615 [Console] correctly return parameter's default value on "--"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] deprecate non string requirement names
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Basically, this will help catching wrong `@Route` annotation configurations like the following which can lead to hard to debug issues:
```php
@Route("/{foo}", requirements={"foo", "bar"})
```
Commits
-------
8bb5266553 deprecate non string requirement names
As to the PHP documentation date() uses the value of time() as timestamp
if none is given. date() has to be mocked in ClockMock as well for this
still being true, otherwise \time() is used as default.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20656
| License | MIT
| Doc PR | -
By adding `<tag name="proxy" interface="Some\ProxifiedInterface" />` to your service definitions, this PR allows generating interface-based proxies.
This would allow two things:
- generating lazy proxies for final classes
- wrapping a service into such proxy to forbid using the methods that are on a specific implementation but not on some interface - the proxy acting as a safe guard.
The generated proxies are always lazy, so that lazy=true/false makes no difference.
As a shortcut, you can also use `lazy: Some\ProxifiedInterface` to do the same (yaml example this time.)
Commits
-------
1d9f1d1b70 [ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #19895
| License | MIT
| Doc PR | -
With this PR, when igbinary is available, it is automatically used to serialize values.
This provides faster and smaller cache payloads.
The unserializing logic is autoadaptative:
- when an igbinary-serialized value is unserialized but the extension is missing, a cache miss is triggered
- when a natively-serialized value is unserialized and the extension is available, the native `unserialize()` is used
Ping @palex-fpt since you provided very useful comments on the topic and might be interested in reviewing here also.
Commits
-------
9c328c4894 [Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
* Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service
* added automatic table creation when using Doctrine DBAL with PDO-based backends
Commits
-------
1484117430 [FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] allow turning routes to utf8 mode by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows building optimized routers that match in a single regexp instead of an alternate of utf8/non-utf8 set of routes.
Commits
-------
8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Process][Console] deprecated defining commands as strings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #27796
| License | MIT
| Doc PR | -
* Added the `Process::fromShellCommandline()` static constructor to define shell command-lines
* Allowed passing commands as `array($process, 'ENV_VAR' => 'value')` to `ProcessHelper::run()`
* Deprecated passing commands as strings when creating a `Process` instance.
* Deprecated the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods.
* Deprecated passing a command as a string to `ProcessHelper::run()`, pass it the command as an array of arguments instead.
* Made the `ProcessHelper` class final
Commits
-------
8895bc1b5b [Process][Console] deprecated defining commands as strings
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Improve exception messages by hiding the hidden ids they contain
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27822
| License | MIT
| Doc PR | -
This PR improves error messages containing hidden ids, especially the ones mentioning service locators.
Right now, when a service subscriber is incomplete, we get:
> The service ".service_locator.G69Xsbl.App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
With this PR we get this instead:
> The service "routing.loader" in the container provided to "App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
When no locators are involved, the hidden service is swallowed:
> The service "App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
This PR also improves runtime exceptions thrown in service locators.
Before:
> Cannot autowire service ".service_locator.Z1jvVrN": it references interface "Symfony\Component\Config\Loader\LoaderInterface" but no such service exists. You should maybe alias this interface to one of these existing services: [...].
After:
> Cannot autowire service "routing.loader" required by "App\Controller\MyRouter": it references interface "Symfony\Component\Config\Loader\LoaderInterface" but no such service exists. You should maybe alias this interface to one of these existing services: [...].
TODO:
- [x] add tests.
Commits
-------
d2b4901a43 [DI] Improve exception messages by hiding the hidden ids they contain
This PR was merged into the 4.1 branch.
Discussion
----------
[Serializer] Fix serialization of items with groups across entities and discrimination map
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27816, #27641
| License | MIT
| Doc PR | ø
I believe this approach is better than the one taken in #27816. At least, it's an alternative :)
Commits
-------
c648b938b2 Fix serialization of abstract items with groups across multiple entities
* 4.1:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
improve deprecation messages
Replace .initialism with .text-uppercase.
* 4.0:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
improve deprecation messages
Replace .initialism with .text-uppercase.
* 3.4:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
Replace .initialism with .text-uppercase.
This PR was squashed before being merged into the 3.4 branch (closes#27903).
Discussion
----------
[Lock] fix lock file permissions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | see discussion below
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See [this comment](https://github.com/symfony/symfony/pull/27668#issuecomment-403392924). Since we are using `r+` now to fix an issue on Solaris, we also need to change the file permissions when the lock file is created for the first time. Otherwise
```php
fopen($fileName, 'r+')
```
will fail due to the file permissions and while
```php
fopen($fileName, 'r')
```
will work, the subsequent locking will again fail on Solaris.
Changing the file permissions to `0666` fixes this issue. __However__ any lock file that was generated _prior_ to this change will still cause issues and would need to be manually deleted. Usually the default `sys_get_temp_dir()` location is used for the lock files and _usually_ these files are purged periodically, so it probably won't matter that much. But it still might cause some confusion since it will not be transparent, why the file lock failed on Solaris systems.
Commits
-------
23481a112e [Lock] fix lock file permissions
This PR was merged into the 4.2-dev branch.
Discussion
----------
[MonologBridge] Prefer PSR-3 to interact with Monolog in tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | part of #27857
| License | MIT
| Doc PR | N/A
This PR changes tests in the Monolog bridge:
* Calls to `Logger::addInfo()` are changed to `Logger::info()`.
* The return value of `Logger::debug()`, `Logger::info()`, `Logger::notice()`, `Logger::warning()`, `Logger::error()` etc. is no longer asserted to be `true`.
This way, the tests only use PSR-3 compatible code to interact with the logger, which makes them forward-compatible with the changes in Monolog 2.
Commits
-------
78498d3b81 Prefer PSR-3 to interact with Monolog in tests.
This PR was squashed before being merged into the 3.4 branch (closes#27886).
Discussion
----------
[Form] Removed .form-control-label class.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
There is no such a class neither in [bootstrap 4.0](https://getbootstrap.com/docs/4.0/components/forms/#form-controls) nor in [bootstrap 4.1](https://getbootstrap.com/docs/4.1/components/forms/#form-controls).
Commits
-------
cb3e712698 [Form] Removed .form-control-label class.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Removed .mb-0 in errors.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
`<span class="d-block">` will never have a margin on its own, so `.mb-0` is needless.
Commits
-------
925dda130e Removed .mb-0 in errors.