This PR was merged into the 4.4 branch.
Discussion
----------
Fix critical extension when reseting paged control
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The issue has been introduced here in #38392 and prevent performing an operation after fetched a paginated result => ldap throws an `Could not XXX: Critical extension is unavailable`
At this line: https://github.com/symfony/symfony/pull/38392/files#diff-24b79f3ac1a99938f5acb158a450e38d30c1984a5d333b5b20f2c38a73d10e31L183, the previous code called `ldap_control_paged_result($con, 0);` using the default value (`false`) for the `$critical` argument.
The replaced version always use `true`.
This PR restore the previous behavior by using `false` when reseting the pagination.
Commits
-------
a2b74762a6 Fix critical extension when reseting paged control
* 5.2:
remove unreachable code
[Browserkit] Add changelog entry for request parameters string cast
Update ExceptionEvent.php
fix firebase transport factory DI tag type
[Validator] Resolve IsinValidator's dependency on the validator.
[HttpFoundation] Fix for virtualhosts based on URL path
* 5.1:
remove unreachable code
Update ExceptionEvent.php
fix firebase transport factory DI tag type
[HttpFoundation] Fix for virtualhosts based on URL path
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Fix for virtualhosts based on URL path
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34866
| License | MIT
| Doc PR | no
This PR fixes base URL detection when:
- virtualhost is based on URL path
- AND local path does not match that URL virtual host path prefix
fix covered with tests
Commits
-------
75ff86811f [HttpFoundation] Fix for virtualhosts based on URL path
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Messenger] Make all the dependencies of AmazonSqsTransport injectable
| Q | A
| ------------- | ---
| Branch? | 5.x for features
| Bug fix? | no
| New feature? | yes - updated changelog
| Deprecations? | no
| Tickets | Fix#38640
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This is a pure refactoring PR that enables more flexibility with service injection without actually changing any behaviour or breaking backwards compatibility. It satisfies only 1 of 2 acceptance criteria of #38640 but since they're independent, I'm not marking the PR as WIP.
## Receiver & sender injection into AmazonSqsTransport
It is now possible to inject your own receiver and sender into `Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransport`.
### Recommended way - AmazonSqsTransport::create
For clean dependency injection, I recommed using the `create` static method, which obliges you to pass all dependencies:
```php
$transport = AmazonSqsTransport::create($connection, $receiver, $sender);
```
For example, this code from `Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory`:
```php
return new AmazonSqsTransport(Connection::fromDsn($dsn, $options), $serializer);
```
could be replaced with this:
```php
$connection = Connection::fromDsn($dsn, $options);
return AmazonSqsTransport::create(
$connection,
new AmazonSqsReceiver($connection, $serializer),
new AmazonSqsSender($connection, $serializer)
);
```
I didn't replace that code in the factory because I didn't find it essential but I will certainly do it in my custom factory in my project, passing my own receiver implementation.
### Using the main constructor
You can still use the main constructor but it's most suited for backwards compatibility, i.e. when you don't want to inject a receiver or a sender. With the full list of arguments it gets a bit messy due to their optionality.
#### Minimal call
```php
new AmazonSqsTransport($connection);
```
As before this PR, a receiver and a sender will be created using the default serializer, i.e. `Symfony\Component\Messenger\Transport\Serialization\PhpSerializer`.
#### With a custom serializer
```php
new AmazonSqsTransport($connection, $serializer);
```
As before this PR, a receiver and a sender will be created using the passed serializer.
#### With a custom receiver and sender
```php
new AmazonSqsTransport($connection, null, $receiver, $sender);
```
The injected services will be used. The second parameter (serializer) is unnecessary because it was only ever used while creating a receiver and a sender inside the transport. Because of this, I recommend using the new static `create` method.
Commits
-------
281af262e6 [Messenger] Make all the dependencies of AmazonSqsTransport injectable
This PR was merged into the 5.1 branch.
Discussion
----------
[FrameworkBundle] [Notifier] fix firebase transport factory DI tag type
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39062
| License | MIT
| Doc PR |
Commits
-------
38145232ab fix firebase transport factory DI tag type
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Add tests on CacheDataCollector
| 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 -->
| License | MIT
<!--
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 5.x.
-->
The `calculateStatistics()` method of `Symfony\Component\Cache\DataCollector\CacheDataCollector` contain a lot of logic and manipulate multi-dimensional array that could be refactor with VO.
But before doing this, I would add test on this part.
Commits
-------
7b4310f045 Add tests on CacheDataCollector
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Fix circular detection with multiple paths
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39056
| License | MIT
| Doc PR | -
There are currently 2 kind of issues related to the Dependency Injection:
1. performance issue when project contains many loops (#37850)
Which has been fixed by #38882
2. Infinity loop in some case (#38970)
Which has been fixed by #38980 and #39021
The new issue #39056 has been introduced by #38882 (The performance issue refactor) because in order to optimize loop detection, I take a short cut and choose to not collect ALL the circular loop but only the one that matters
I was wrong. All loops matters.
This PR fix my previous refacto to collect ALL the paths, with a low CPU footprint
Commits
-------
1c3721e8ad Fix circular detection with multiple paths
This PR was merged into the 4.4 branch.
Discussion
----------
[MimeType] Add missing alias for service @mime_type
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
I found that this was missing. Im not sure why these have not been added before. Was it intentional?
Commits
-------
7b733d651d [MimeType] Add missing alias for @mime_type
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[BrowserKit] Add jsonRequest function to the browser-kit client
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix -
| License | MIT
| Doc PR | symfony/symfony-docs#...
If you use the FOSRestBundle for your Api's you have maybe many tests using just:
```php
$client->request('POST', '/api/contacts', ['param' => 1]);
```
To test your JSON api as in the real browser request FOSRestBundle converts the json body into the `$request->request` object. I think something similar is done by ApiPlatform. If you have tests like above they will now fail as the integer is converted to string see also #38591.
This PR add a new `jsonRequest` which will look like the following and will so fix the above problem:
```php
$client->jsonRequest('POST', '/api/contacts', ['param' => 1]);
```
Commits
-------
c2fa2cb376 [BrowserKit] Add jsonRequest function to the browser-kit client
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Messenger][SQS] Make sure one can enable debug logs
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | Needed
If you add `&debug=true` on your DSN, then we will use `LoggerInterface::debug()` to print HTTP requests and responses.
This has a negative impact on performance, but it will be helpful when debugging.
Commits
-------
66edc59b56 [Messenger][SQS] Make sure one can enable debug logs