This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] Backport support for typed properties (PHP 7.4)
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- 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 | N/A. <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13719 to be fixed
Backports #34557 as suggested.
One of my workmate hit this issue with the Serializer component and it was not obvious for him why it was not working, without hint.
Commits
-------
1b19f255a3 [PropertyInfo] Backport support for typed properties (PHP 7.4)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Create a predictable symlink pointing to the local install
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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
Static analysis tools such as PHPStan need to be able to autoload classes provided by to work. It's also useful to use the assertions provided by PHPUnit with other testing tools such as Behat.
When using `simple-phpunit`, PHPUnit isn't installed in the `vendor/` directory, consequently other tools cannot autoload its classes.
A workaround is to configure these tools to load the autoloader installed by `simple-phpunit`. Example with PHPstan:
```neon
parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9.2-0/vendor/autoload.php
```
However, the path of the autoloader isn't predictable: it depends of PHPUnit version.
This PR changes `simple-phpunit` to create a symlink with a predictable path (`vendor/.phpunit/phpunit`) pointing to the currently used version of PHPUnit, so it is possible to hardcode this value in config files.
The symlink is recreated before every run, so if a different version of PHPUnit must be used because the PHP version in use is different from the previous run (frequent when developing libraries compatible with multiple PHP versions), it still works.
Commits
-------
bf7654f245 [PhpUnitBridge] Create a predictable symlink pointing to the local install
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
Move the polyfill method introduced in #37960 in the `Assert` trait. Sorry I noticed this trait later.
Commits
-------
0426113eda [PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[PhpUnit] Add polyfill for assertMatchesRegularExpression()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
`assertRegExp()` is now deprecated in favor of `assertMatchesRegularExpression`.
Commits
-------
33eccd2a00 [PhpUnit] Add polyfill for assertMatchesRegularExpression()
This PR was merged into the 3.4 branch.
Discussion
----------
Backport: Improve link script with rollback when using symlink
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | N/A <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | N/A
Backports #37915 to 3.4.
Even if it's a new feature, it's a contributors tool that can be used for any version to try out.
Commits
-------
ab92e9f4c3 Backport: Improve link script with rollback when using symlink
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Yaml] fix more numeric cases changing in PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | 968ffcfa65 (r41697638)
| License | MIT
| Doc PR |
see also https://wiki.php.net/rfc/saner-numeric-strings
Commits
-------
7cd5106041 fix more numeric cases changing in PHP 8
This PR was merged into the 3.4 branch.
Discussion
----------
[ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
a55ce7c8bb fix passing arguments to call_user_func_array() on PHP 8
This PR was merged into the 3.4 branch.
Discussion
----------
[Filesystem] fix test on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
c08178978a [Filesystem] fix test on PHP 8
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] stop using the deprecated schema synchronizer API
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
see the failing tests and doctrine/dbal#4213
Commits
-------
40129d6239 stop using the deprecated schema synchronizer API
This PR was submitted for the 5.1 branch but it was squashed and merged into the 4.4 branch instead.
Discussion
----------
[Mailer] Fixed mandrill api header structure
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
When using the Mandrill API transport, it is not possible to set a reply-to address.
**How to reproduce**
Create a new email and add a reply-to address:
```php
$email = (new Email())
->from('from@example.com')
->to('to@example.com')
->replyTo('replyto@example.com')
->subject('subject')
->text('text');
$mailer->send($email);
```
The expected result is a payload which contains the following headers:
```
"headers": {
"reply-to": "replyto@example.com"
}
```
But instead, the `getPayload()` method produces these headers:
```
"headers": [
"reply-to: replyto@example.com"
]
```
**Additional context**
See https://mandrillapp.com/api/docs/messages.html.
Commits
-------
aeb4c5e6c7 [Mailer] Fixed mandrill api header structure
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.
Discussion
----------
[Mailer] Reorder headers used to determine Sender
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Use the `Return-Path` header as the last candidate to determine the Envelope's sender address.
The `Return-Path` is usually configured _in addition_ to the `Sender` and/or `From` header: it allows for email bounces and complaints to be sent to a dedicated email address. It should therefor not be used as the first candidate header to determine the sender.
Commits
-------
7e60a8f8c9 [Mailer] Reorder headers used to determine Sender
Use the `Return-Path` header as the last candidate to determine the
Envelope's sender address.
The `Return-Path` is usually configured _in addition_ to the `Sender`
and/or `From` header: it allows for email bounces and complaints to be
sent to a dedicated email address. It should therefore not be used as
the first candidate header to determine the sender.
This PR was merged into the 3.4 branch.
Discussion
----------
make return type correct
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
Since the real return type is `\ArrayIterator` AND array of `FormView` I've decided to change it. Also the other reason is that phpstan iks kind of failing because of this and I need to `assert` things in children of this class.
Commits
-------
32b5b9e1d7 make return type correct
This PR was merged into the 4.4 branch.
Discussion
----------
[Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37870
| License | MIT
| Doc PR | no
Fixes#37870
The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.
Commits
-------
c4e5131757 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport
Fixes#37870
The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.
This PR was merged into the 4.4 branch.
Discussion
----------
Fix the parameter names in the SecurityFactoryInterface::create() method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
With regard to PHP 8, Psalm has added a named arguments check:
https://psalm.dev/articles/getting-ready-for-named-arguments
This check currently fails, because the `SecurityFactoryInterface` uses different parameter names than the `AbstractFactory`. You can see for yourselves at https://psalm.dev/r/81413a1c96.
Commits
-------
a73f5c1587 Fix the parameter names in the SecurityFactoryInterface::create() method
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] mark the AssertingContextualValidator class as internal
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
7ff0287cd6 mark the AssertingContextualValidator class as internal
This PR was merged into the 4.4 branch.
Discussion
----------
[Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37742
| License | MIT
| Doc PR | -
The strategy is to sort the passed classes from the "bottom" one in the hierarchy to the "top" one so that the first `is_a` in `getMappedObjectType()` is right.
Commits
-------
c16a192473 [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one