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
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText
| Q | A
| ------------- | ---
| Branch? | 5.x (bugfix of a 5.x-only feature)
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39003
| License | MIT
~WIP~ This is now complete and, thanks to @yceruto, I've fixed two bugs in this PR:
* `ErrorDetailsStamp` couldn't be (de)serialized properly with that constructor argument
* `FlattenException::$statusText` wasn't (de)normalized
Commits
-------
9af554cb41 [Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge] indexBy could reference to association columns
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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#37982 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | -
<!--
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.
-->
This is my approach to solve #37982. It partials reverts @xabbuh PR #38604
This is my first Symfony contribution, so please, tell me if I need to do something more or something is wrong.
Also, this bug affects 4.x and 5.x versions. I think merging in this branches is done automatically. If not, please tell me.
Thanks you
Commits
-------
f9a0e000e9 failing test for issue 38861
4c36145664 [DoctrineBridge] indexBy could reference to association columns
This PR was merged into the 5.2-dev branch.
Discussion
----------
Adds constants for YamlEncoder options
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
As I understand it encoders and normalizers use (public) constants for context keys so IDEs can help by providing autocomplete. I added these constants for the YamlEncoder where they are missing right now. For reference see other encoders like CsvEncoder or XmlEncoder.
Commits
-------
6ebf7e164e Adds constants for YamlEncoder options
This PR was merged into the 4.4 branch.
Discussion
----------
[DoctrineBridge] also reset id readers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38890
| License | MIT
| Doc PR |
Commits
-------
784bd0080d also reset id readers
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator] Allow load mappings from attributes without doctrine/annotations
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Tickets | #38096
| License | MIT
| Doc PR | TODO
Follows #38309.
Currently, we cannot enable constraint mapping from attributes without having `doctrine/annotations` installed. Lifting that limitation is a bit tricky because `ValidatorBuilder::enableAnnotationMapping()` creates an annotation reader if you don't pass one. This PR aims at deprecating this behavior.
I know it's a bit late for such a change in 5.2 and I should have seen earlier that this part was missing. 😓 Since I don't expect people to go all-in on attributes on day one, it's probably okay to postpone this change to 5.3.
Commits
-------
441c80603e [Validator] Allow load mappings from attributes without doctrine/annotations.
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Allow to use attribute-based configuration of routing/serializer without doctrine/annotations
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Follows #37474, #38525
Currently, we need `doctrine/annotations` to be installed in order to configure routing and serializer via PHP attributes. Given that for both components we can already replace Doctrine Annotations completely, I'd like to get rid of that limitation.
Commits
-------
e5492e2e55 [FrameworkBundle] Configure PHP Attributes without doctrine/annotations.
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator] Override the default option of the choice constraint
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | TODO
We have a bundle that run test against the last version of symfony and we detect BC Break when passing a string as the first argument of the class Choice
Our code extends the Choice class and change the defaultOption.
I saw that others constraints class had new construct signature (for php8 attributes), but only some of them kept the array options as their first arguments. Why ?
ping @ogizanagi @derrabus
https://travis-ci.com/github/Elao/PhpEnums/jobs/410045368
```
1) Elao\Enum\Tests\Unit\Bridge\Symfony\Validator\Constraint\EnumTest::testDefaultValueIsEnumClass
Symfony\Component\Validator\Exception\MissingOptionsException: The options "class" must be set for constraint "Elao\Enum\Bridge\Symfony\Validator\Constraint\Enum".
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php:171
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php:110
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php:75
/home/travis/build/Elao/PhpEnums/src/Bridge/Symfony/Validator/Constraint/Enum.php:39
/home/travis/build/Elao/PhpEnums/tests/Unit/Bridge/Symfony/Validator/Constraint/EnumTest.php:22
```
Commits
-------
d553750054 Allow user to override default options when extending the Choice Constraint
This PR was merged into the 4.4 branch.
Discussion
----------
[ProxyManagerBridge] replace ProxyManager\Version by feature detection
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I'd like to get rid of this `Version` class, which is the source of so many issues with deps.
This won't remove the class from ocramius/proxy-manager, but that's a separate story that this change could enable in the end :)
Commits
-------
5f77aad6ca [ProxyManagerBridge] replace ProxyManager\Version by feature detection