This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Fix Tests for PHPUnit 9.3
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37564
| License | MIT
| Doc PR | N/A
PHPUnit's `logicalXor()` creates an XOR operation for one or multiple constraints. It expects the operands for that operation to be passed as variadic arguments, but this particullar test passes them in a single array.
This somewhat works on PHPUnit 8, but fails on PHPUnit 9. This PR fixes the failing test.
Commits
-------
f290b97d4f [WebProfilerBundle] Fix Tests on PHPUnit 9.3.
This PR was merged into the 4.4 branch.
Discussion
----------
Don't call createMock with an array of interfaces
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37564
| License | MIT
| Doc PR | N/A
PHPUnit 8 allows us to pass an array of interfaces to `createMock()`. The result was a mock object that implemented all of the given interfaces. This feature has sadly been removed (see sebastianbergmann/phpunit#3955), which forces us to create dummy classes that can be mocked instead. I've done this already on the 3.4 branch with #37566.
This PR fixes all affected tests (that I could find) on the 4.4 branch.
Commits
-------
a8e762d8c3 Don't call createMock with an array of interfaces.
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Console] Make sure $maxAttempts is an int or null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The behavior of the "less than" operator for mixed types has changed in php 8. It is now possible to call `setMaxAttempts()` with a random string without raising the expected `InvalidArgumentException`. I've added an explicit type cast in order to restore the previous behavior.
Commits
-------
4fcd4916ed [Console] Make sure $maxAttempts is an int or null.
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Adjust tests to new "class not found" error message format
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Commits
-------
5b95bcd009 [HttpKernel] Adjust tests to new "class not found" error message format.
This PR was merged into the 5.1 branch.
Discussion
----------
Fix a typo in UPGRADE-5.1.md
I guess there was a mistake on the Config upgrade.
The method's name which signature has changed is `NodeDefinition::setDeprecated(...)` (instead of `NodeDefinition::setDeprecation(...)`). Same thing goes for `BaseNode::setDeprecated(...).
Thanks :)
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | kinda
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | none
| License | MIT
| Doc PR | none
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
Commits
-------
144599f0d9 Update UPGRADE-5.1.md
I guess there was a mistake on the Config upgrade. The method's name which signature has changed is `NodeDefinition::setDeprecated(...)` (instead of `NodeDefinition::setDeprecation(...)`).
Same thing goes for `BaseNode::setDeprecated(...).
Thanks :)
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Register NotificationDataCollector and NotificationLoggerListener service
| Q | A
| ------------- | ---
| Branch? | master<!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#38009 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
Commits
-------
1beffd1363 Register NotificationDataCollector and NotificationLoggerListener
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.
Discussion
----------
esmtp error not being thrown properly
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
This is the same fix as https://github.com/symfony/symfony/pull/32895 but for esmtp transport
Commits
-------
976eea3be0 esmtp error not being thrown properly
This PR was merged into the 5.2-dev branch.
Discussion
----------
Create impersonation_exit_path() and *_url() functions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes (not added atm) <!-- please add some, will be required by reviewers -->
| Fixed tickets | #24676 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | To come later <!-- symfony/symfony-docs#... --><!-- required for new features -->
This is a relaunch of the PR #24737
It adds more flexibility to the previous try.
You have two twig functions `impersonation_exit_url()` and `impersonation_exit_path()`
You can either leave on the same path, redirect to the path where was the user at the user switch, or to the path you want.
Example:
The following code
```twig
<p>{{ impersonation_exit_url() }}</p>
<p>{{ impersonation_exit_path() }}</p>
<p> </p>
<p>{{ impersonation_exit_url(path('app_default_other')) }}</p>
<p>{{ impersonation_exit_path(path('app_default_other')) }}</p>
<p> </p>
<p>{{ impersonation_exit_url('_use_impersonated_from_url') }}</p>
<p>{{ impersonation_exit_path('_use_impersonated_from_url') }}</p>
```
will output
![Capture d’écran de 2019-07-31 20-58-42](https://user-images.githubusercontent.com/7721219/62239914-1482cb00-b3d6-11e9-9b58-ea8d30a2e28a.png)
**Note:** If this proposal appears to be better, I'll add tests, update changelog, and prepare the doc.
**Bonus:**
As the "impersonated from url" is stored in the `SwitchUserToken` it might be possible to display it in the profiler:
![Capture d’écran de 2019-07-31 21-04-50](https://user-images.githubusercontent.com/7721219/62240294-efdb2300-b3d6-11e9-911a-bec48fd75327.png)
WDYT?
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
c1e3703efd Create impersonation_exit_path() and *_url() functions
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Yaml Parser] fixed Parser to skip comments when inlining sequences
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37972
| License | MIT
The parser didn't skip comments when parsing values in a sequence. This resulted in the YamlFileLoader trying to
parse a comment as a IteratorArgument which resulted in a InvalidArgumentException.
Consider the following valid yaml:
```yaml
- !foo [
bar,
#baz
]
```
The parser would generate the following array:
```php
['bar', '#baz']
```
After this fix the parser will generate the following array:
```php
['bar']
```
This bug only appeared for me in 4.4
Commits
-------
b5316ebebb [Yaml Parser] fixed Parser to skip comments when inlining sequences
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Fix caster for invalid SplFileInfo objects on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The behavior of uninitialized `SplFileInfo` classes has changed in php 8: https://3v4l.org/s4c4O
* `getPathname()` won't return `false` anymore.
* The error raised by most accessors is now recoverable. On php 7, it's fatal.
This PR adjusts the caster for those objects to the new behavior.
Commits
-------
ab45e2aaae [VarDumper] Fix caster for invalid SplFileInfo objects on php 8.
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Remove DelaySeconds parameter for FIFO queues
remove DelaySeconds parameter for FIFO queues
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
As it is written in the [docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html) the DelaySeconds parameter can't be set for FIFO queues.
Commits
-------
c638b497bf Update Connection.php
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Adjust output parsing of CoverageListenerTrait for PHPUnit 9.3
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37637, #37564
| License | MIT
| Doc PR | N/A
This PR makes `CoverageListenerTrait` pass with PHPUnit 9.3. It contains a backport of #38054.
The problem that is addressed here is that a one of the fixture classes is now included in the output despite having a coverage of zero. The test now accepts both cases:
* The class is omitted from the output
* The class appears with 0.00% coverage.
Commits
-------
a3831dc0f2 [PhpUnitBridge] Adjust output parsing for PHPUnit 9.3.
99c98bd716 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Skip test cases that produce a TypeError on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
On php 8, `NumberFormatter::setAttribute()` will throw a type error if the provided value is not of type `int|float`. This is why I'm skipping the corresponding tests for now. Alternatively, we could check for the PHP version in Symfony's implementation of that class and throw the `TypeError` as well, if we're on php 8. But since this is a breaking change, I'm was unsure if I sould go that way.
Commits
-------
7f1055b97c [Intl] Skip test cases that produce a TypeError on php 8.
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add Bosnian (BS) translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#30275
| License | MIT
| Doc PR | none
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
Commits
-------
dd44563004 add bosnian (bs) translation
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Fix CacheCollectorPass with decorated cache pools
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38055
| License | MIT
| Doc PR |
The `getDefinition` call in `addToCollector` does not work when the service is decorated. Also instances will be added with the decoration name. This looks weird in the profiler. I have changed it to prefer the attribute name.
Before:
![image](https://user-images.githubusercontent.com/6224096/92225243-3be27c00-eea3-11ea-8bd5-2ae69212e658.png)
After: (`\Shopware\Storefront\Framework\Cache\CacheDecorator` did go into `cache.object`)
![image](https://user-images.githubusercontent.com/6224096/92225284-47ce3e00-eea3-11ea-885f-cdba95b89302.png)
Commits
-------
973442759c Fix CacheCollectorPass with decorated cache pools
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
Updated to use `PHPUnit\Util\Annotation\Registry` and related classes.
Fixes#37637
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37637
| License | MIT
| Doc PR | n/a
- [x] Fixes the issue under PHPUnit 8.5+
- [ ] Tests TBD
If this is a sensible approach, I will try to add a test for this addition.
Commits
-------
5f83811002 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Parse "x not found" errors correctly on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #36872
| License | MIT
| Doc PR | N/A
PHP 8 uses double quotes instead of single ones in error messages. This PR teaches `ClassNotFoundFatalErrorHandler` to parse the new format.
Depends on composer/composer#9183
Commits
-------
275496a1f4 [Debug] Parse "x not found" errors correctly on php 8.
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] Fix typed collections in PHP 7.4
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | No ticket
| License | MIT
| Doc PR | N/A
#37971 introduced support for typed properties in PHP 7.4, however by short circuiting the `getTypes()` method, typed collections are returned as `Type::BUILTIN_TYPE_ARRAY` without a proper collection type. If running on PHP < 7.4, the `getMutator()` method would be called which would extract the collection type from the getter/setter or adder/remover.
I updated the typedPropertiesTest to cover this case.
Commits
-------
282ed2850c [PropertyInfo] Fix typed collections in PHP 7.4
This PR was merged into the 5.2-dev branch.
Discussion
----------
Increase HttpBrowser::getHeaders() visibility to protected
Resolves symfony/symfony#38051
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#38051
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Increases visibility to allow for oddball header overrides; see #38051 for more detail.
If this looks good, let me know if this is worth adding docs/changelog entries and I'll do so.
Commits
-------
3d75ab515f Increase HttpBrowser::getHeaders() visibility to protected
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.
Discussion
----------
[Form] Remove invalid instantiation declaration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | No ticket
| License | MIT
| Doc PR | N/A
Remove invalid instantiation declaration
Commits
-------
6e17099f7a Remove invalid instantiation declaration
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Messenger] Add option to prevent Redis from deleting messages on rejection
~Unless `delete_after_ack` configuration is set to `true`.~
Introduces `delete_after_reject` configuration property.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | ~no~ yes (introduces config property)
| Deprecations? | no
| Tickets | Fix#36619
| License | MIT
> Redis Messenger transport deletes messages when rejecting, causing other consumers / applications to be unable to reach that message.
> This affects primarily cases where Messenger component is used to read/write with other, third party applications.
Commits
-------
135c6504f1 [Messenger] Add option to prevent Redis from deleting messages on rejection
This PR was merged into the 5.2-dev branch.
Discussion
----------
[DoctrineBridge] Ulid and Uuid as Doctrine Types
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | #36102 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
This Types Implementations are basically copies from https://github.com/ramsey/uuid-doctrine, with minor tweaks to use Symfonys Uid classes.
I am not done yet. I'm going to implement some UnitTests and I also do need to add the Changelog Entries.
And I do ask my self if the Types should be registered automatically (with the recipe?), cause it would collide with Ramseys uuids implementation.
Commits
-------
f44fa34098 [DoctrineBridge] Ulid and Uuid as Doctrine Types