* 5.1:
[PhpUnitBridge] Create a predictable symlink pointing to the local install
[PropertyInfo] Backport support for typed properties (PHP 7.4)
[PhpUnitBridge] Polyfill new phpunit 9.1 assertions
[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
[PhpUnit] Add polyfill for assertMatchesRegularExpression()
Update Notifier bridge readme
[TwigBridge] Fix#37931: BC break where filter method `trans` did not allow null values for `$message` parameter anymore
[PropertyAccess] Fix accessing dynamic properties
* 4.4:
[PhpUnitBridge] Create a predictable symlink pointing to the local install
[PropertyInfo] Backport support for typed properties (PHP 7.4)
[PhpUnitBridge] Polyfill new phpunit 9.1 assertions
[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
[PhpUnit] Add polyfill for assertMatchesRegularExpression()
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 squashed before being merged into the 5.2-dev branch.
Discussion
----------
Allow Drupal to wrap the Symfony test listener
| 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 | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Drupal has a test listener that wraps the Symfony listener as we need to manipulate deprecation testing to skip specific deprecations. We've managed to remove some how custom stuff and reaching into Symfony's privates via reflection recently (and fix a bug or two) but now we're getting output like:
```
2x: a:4:{s:11:"deprecation";s:191:"Calling Drupal\Tests\WebAssert::responseNotMatches with more than one argument is deprecated in drupal:9.1.0 and will throw an exception in drupal:10.0.0. See https://www.drupal.org/node/TODO";s:5:"class";s:52:"Drupal\Tests\comment\Functional\CommentAnonymousTest";s:6:"method";s:13:"testAnonymous";s:15:"triggering_file";s:74:"/Users/alex/dev/sites/drupal8alt.dev/core/tests/Drupal/Tests/WebAssert.php";}
2x in DrupalListener::endTest from Drupal\Tests\Listeners
```
instead of
```
2x: Calling Drupal\Tests\WebAssert::responseNotMatches with more than one argument is deprecated in drupal:9.1.0 and will throw an exception in drupal:10.0.0. See https://www.drupal.org/node/TODO
2x in CommentAnonymousTest::testAnonymous from Drupal\Tests\comment\Functional
```
We can fix this by aliasing and copying the \Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Deprecation class but ideally that class could be a bit more liberal in its implementation.
Commits
-------
91de46da3f Allow Drupal to wrap the Symfony test listener
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Serializer][Mime] Fix Mime message serialization
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#37414, Fix#37324 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
Symfony serialization is used by Messenger to serialize Emails. By Email messages are data objects with some logic to prepare emails to be sent. Without configuration, the Symfony Serializer serializes Emails with too many data (and triggers some unneeded validation).
This PR aims to fix the above issue and at the same time makes serialized emails as small as possible and as readable as possible.
Commits
-------
9d869b1ece Fix Mime message serialization
This PR was merged into the 4.4 branch.
Discussion
----------
stop using deprecated PHPUnit APIs
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
3d209c46e4 stop using deprecated PHPUnit APIs
* 5.1:
Postpone BC layer removal to 6.0.
add validator translation 99 for Italian language
stop using the deprecated at() PHPUnit matcher
Fix typehint phpdoc
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Workflow] Added Context to Workflow Event
There's also a default context for the initial marking event.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37421
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13947
This time, I need context in the events, because, sometimes, the transition is automatic and sometimes, it is manual. I want to be able to make the difference. I figured using the context for that is a good idea. I hope you do too :)
By the way, I believe it also fixes#37421 . I took @pluk77 request to be able to differentiate an initial marking by having a default context in that case
Commits
-------
bfe07dda83 Added Context to Workflow Event There's also a default context for the initial marking event.
* 5.1:
Fix typo
Fix deprecated libxml_disable_entity_loader
Add Tagalog translations for validator messages 94, 95, 96 and 99
PHPUnit's assertContains() performs strict comparisons now.
[ClassLoader][Routing] Fix namespace parsing on php 8.
Fix deprecated libxml_disable_entity_loader
Made reference to PHPUnit\Util\XML::loadfile php5-compatible.
[Validator] Add missing translations for german and vietnamese
Modernized deprecated PHPUnit assertion calls
[Console] The message of "class not found" errors has changed in php 8.
The PHPUnit\Util\XML class has been removed in PHPUnit 9.3.
[Console] Make sure we pass a numeric array of arguments to call_user_func_array().
Remove outdated references from base_js.html.twig file
[String] We cannot have a "provides" function in test cases.
Typo: somes styles fixed
[Serializer] Fix that it will never reach DOMNode
[Validator] sync translations
[VarDumper] Improve previous fix on light array coloration
[Cache] Fix#37667
* 4.4:
Fix typo
Fix deprecated libxml_disable_entity_loader
Add Tagalog translations for validator messages 94, 95, 96 and 99
PHPUnit's assertContains() performs strict comparisons now.
[ClassLoader][Routing] Fix namespace parsing on php 8.
Fix deprecated libxml_disable_entity_loader
Made reference to PHPUnit\Util\XML::loadfile php5-compatible.
[Validator] Add missing translations for german and vietnamese
Modernized deprecated PHPUnit assertion calls
[Console] The message of "class not found" errors has changed in php 8.
The PHPUnit\Util\XML class has been removed in PHPUnit 9.3.
[Console] Make sure we pass a numeric array of arguments to call_user_func_array().
[Serializer] Fix that it will never reach DOMNode
[Validator] sync translations
[VarDumper] Improve previous fix on light array coloration
[Cache] Fix#37667
* 3.4:
Add Tagalog translations for validator messages 94, 95, 96 and 99
PHPUnit's assertContains() performs strict comparisons now.
[ClassLoader][Routing] Fix namespace parsing on php 8.
Fix deprecated libxml_disable_entity_loader
Made reference to PHPUnit\Util\XML::loadfile php5-compatible.
[Validator] Add missing translations for german and vietnamese
Modernized deprecated PHPUnit assertion calls
[Console] The message of "class not found" errors has changed in php 8.
The PHPUnit\Util\XML class has been removed in PHPUnit 9.3.
[Console] Make sure we pass a numeric array of arguments to call_user_func_array().
[Serializer] Fix that it will never reach DOMNode
[Validator] sync translations
[VarDumper] Improve previous fix on light array coloration
[Cache] Fix#37667
* 5.1:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Removed @internal from Composite
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Messenger] fix ignore account & endpoint options amazon sqs connection
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 5.0:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 4.4:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 3.4:
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[SCA] Minor fixes on tests