This PR was merged into the 4.4 branch.
Discussion
----------
[Finder] Use a lazyIterator to close files descriptors when no longer used
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fix#35508
| License | MIT
| Doc PR | -
The `RecursiveDirectoryIterator` class open the file on `__construct`.
Because we Inject an instance of `RecursiveDirectoryIterator` inside the \AppendIterator` class, php opens a lot of file even before iterating on it.
This PR adds a new `LazyIterator` class that instantiate the decorated class only when something starts iterating on it.
When the iteration is over, it unset the variable to close let the decorated class clean things (ie. close the files)
Commits
-------
7117e1a798 Use a lazyintertor to close files descriptors when no longer used
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] [Kernel] Silence failed deprecations logs writes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
When `->buildContainer()` throws because the cache directory cannot be created, we still try to write the deprecations logs inside the cache directory. In this case, the final exception is `Warning: file_put_contents(/app/var/cache/dev/App_KernelDevDebugContainerDeprecations.log): failed to open stream: No such file or directory` instead of `Unable to create the "cache" directory (/app/var/cache/dev).`.
Alternative:
```php
try {
// ...
} catch (\RuntimeException $e)
} finally {
if (isset($e)) {
throw $e;
}
// ...
}
```
Commits
-------
b7100b6909 [HttpKernel] [Kernel] Silence deprecations logs writes
This PR was merged into the 4.4 branch.
Discussion
----------
Allow psr/cache v3 but on symfony/cache
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Consumers of PSR-6 are compatible with v1|2|3.
Implementations aren't until they add explicit return types, which is not possible without a BC break.
Commits
-------
bf23c44a07 Allow psr/cache v3 but on symfony/cache
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38019
| License | MIT
| Doc PR | -
When creating a new Request object `REQUEST_TIME_FLOAT` was not set by default.
Replaces broken 39952 PR :(
Commits
-------
c52c1e0b9b [HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object
This PR was merged into the 4.4 branch.
Discussion
----------
[SecurityBundle] role_names variable instead of roles
replaced the roles variable with role_names in order to fix cache warming
introduced @ d64372df8c
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40087
| License | MIT
| Doc PR | symfony/symfony-docs#14923
Commits
-------
58bb614abd [SecurityBundle] role_names variable instead of roles
This PR was merged into the 4.4 branch.
Discussion
----------
[Doctrine] Restore priority for EventSubscribers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fix#40031
| License | MIT
| Doc PR | -
Since #39990, lazy subscribers are called AFTER listeners (which is the opposite of previous implementation).
This PR restore the previous behavior.
Note: ordered subscribers is implemented in #39978 but is considered as a new feature.
Commits
-------
94eac1b83f Restore priority for eventSubscribers
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] fix parsing return types in DebugClassLoader
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
In 5.3, we might want to make `SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1` the default, so that ppl know when they're missing some return types when they inherit some classes from vendors. This would fix https://github.com/orgs/symfony/projects/1#card-30856423
On 4.4, we have to disable this mode of reporting until these PRs are merged:
- https://github.com/twigphp/Twig/pull/3481
- https://github.com/doctrine/collections/pull/269
- https://github.com/predis/predis/pull/678
Commits
-------
58e32b3c2a [ErrorHandler] fix parsing return types in DebugClassLoader
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] fix handling messages with null bytes from anonymous classes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
PHP truncates error messages at null bytes before calling userland error handlers (known behavior in PHP, marked as "won't fix".)
This doesn't play well with anonymous classes.
This PR works around the issue by getting the message from the stack trace.
Commits
-------
ac94746dc7 [ErrorHandler] fix handling messages with null bytes from anonymous classes
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] fix reporting deprecations when they come from DebugClassLoader
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/40067/files?w=1).
Commits
-------
6a4312deac [PhpUnitBridge] fix reporting deprecations when they come from DebugClassLoader
This PR was merged into the 4.4 branch.
Discussion
----------
fix validator when we have false returned by the current element of the iterator
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40057
| License | MIT
Commits
-------
a9e9359581 fix validator when we have a false current element
This PR was merged into the 4.4 branch.
Discussion
----------
Streamline dataproviders
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
No need to create extra PR's on other branches, no more occurrences 👍
Commits
-------
025079b051 Streamline dataproviders