* 3.4:
[DI] Fix dumping Doctrine-like service graphs
fix serialization workaround in CustomUserMessageAuthenticationException
PHPUnit Bridge: Rollback to traditional array syntax.
[Form] fix some docblocks and type checks
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix dumping Doctrine-like service graphs
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30017#29637#29693
| License | MIT
| Doc PR | -
I'm unable to provide a reproducer for this, the required service reference graph is too crazy, but that does the job :)
Commits
-------
ed96830893 [DI] Fix dumping Doctrine-like service graphs
This PR was merged into the 3.4 branch.
Discussion
----------
PHPUnit Bridge: Rollback to traditional array syntax.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30039
| License | MIT
| Doc PR | N/A
I've used PHP CS Fixer to convert all short array expressions back to the traditional syntax understood by php 5.3. Unfortunately, I don't have a local php 5.3 setup anymore, so I hope I've caught all occurrences.
Commits
-------
8b330de7f7 PHPUnit Bridge: Rollback to traditional array syntax.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] fix some docblocks and type checks
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30018
| License | MIT
| Doc PR |
Commits
-------
ec0c37192b [Form] fix some docblocks and type checks
* 3.4:
Add missing `@internal` annotations
Disable Twig in the profiler menu when Twig is not used
Mark some/most implementations of Serializable as `@internal`
[Config] ensure moving away from Serializable wont break cache:clear
[VarDumper] dont implement Serializable in Stub
[Config] fix compat with wrapping autoloaders
This PR was merged into the 3.4 branch.
Discussion
----------
Disable Twig in the profiler menu when Twig is not used
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30033
| License | MIT
| Doc PR | -
Commits
-------
b47408179f Disable Twig in the profiler menu when Twig is not used
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] dont implement Serializable in Stub
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30014
| License | MIT
| Doc PR | -
`Serializable` is really really broken...
Commits
-------
73070d7d32 [VarDumper] dont implement Serializable in Stub
This PR was merged into the 3.4 branch.
Discussion
----------
Mark some/most implementations of Serializable as `@internal`
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There are more usages of `Serializable` in the code base, but the remaining are unfortunately exposed as part of interfaces.
All these places are IMHO already considered internal, this just makes it explicit.
Will ease moving away from `Serializable`.
Commits
-------
7b9d73d891 Mark some/most implementations of Serializable as `@internal`
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] ensure moving away from Serializable wont break cache:clear
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When a resource implementation moves away from `Serializable`, the `cache:clear` command currently fails with `Warning: Class Symfony\Component\Config\Resource\ClassExistenceResource has no unserializer`. This change makes it ignore the failure, which is fine.
Commits
-------
9d3180a7e2 [Config] ensure moving away from Serializable wont break cache:clear
This PR was submitted for the 4.1 branch but it was merged into the 4.2 branch instead (closes#29532).
Discussion
----------
[Messenger] fixed RabbitMQ arguments not passed as integer values
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29044
| License | MIT
RabbitMQ expects some arguments to be passed as integer values.
Make sure to cast those after parsing the DSN
\cc @thomaskonrad
Commits
-------
f19c035aaa [Messenger] fixed RabbitMQ arguments not passed as integer values
* 4.1:
[Routing] dont redirect routes with greedy trailing vars with no explicit slash
skip native serialize among child and parent serializable objects
[Routing] backport tests from 4.1
[MonologBridge] Remove unused local variable
Remove unreachable code
Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
Support use of hyphen in asset package name
Remove gendered pronouns
Replace gender by eye color in tests
[Security] dont do nested calls to serialize()
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] dont redirect routes with greedy trailing vars with no explicit slash
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29673#29734#29575
| License | MIT
| Doc PR | -
From the linked issue:
> The current logic is the following:
> - when a route is declared with a trailing slash, the trimmed-slash url is redirected to the one with the slash
> - when a route is declared with *no* trailing slash, the slashed url is redirected to the trimmed-slash one
>
> That includes routes with slash-greedy requirements: when the same greedy requirement matches both the slashed and the trimmed-slash URLs, only one of them is considered the canonical one and a redirection happens.
>
> We could fine tune this logic and make an exception when a trailing slash-greedy requirement is declared with no explicit trailing slash after it. (ie disable any redirections for `/foo/{.*}` but keep it for `/foo/{.*}/`. That would mean `/foo/bar` and `/foo/bar/` wouldn't trigger the redirection for route `/foo/{.*}`, breaking the "not-semantics" property of trailing slashes for catch-all routes. Which might be legit afterall.
This PR implements this fine tuning, as that's the most BC behavior (and thus the correct one).
See #30012 for `testGreedyTrailingRequirement` in action on 3.4 as a proof.
Commits
-------
2bb8890bbb [Routing] dont redirect routes with greedy trailing vars with no explicit slash
* 3.4:
skip native serialize among child and parent serializable objects
[Routing] backport tests from 4.1
Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
Support use of hyphen in asset package name
Remove gendered pronouns
Replace gender by eye color in tests
[Security] dont do nested calls to serialize()
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] don't do nested calls to serialize()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29951
| License | MIT
| Doc PR | n/a
The problem (originally reported as `Symfony\Component\Security\Core\Authentication\Token\AbstractToken` issue), may occur also in classes extending `Symfony\Component\Security\Core\Exception\AuthenticationException`
Tasks:
- [x] Skip native serializer (workaround itself)
- [x] Token test
- [x] Exception test
Commits
-------
10256fc4fd skip native serialize among child and parent serializable objects
41000f1de0 [Security] dont do nested calls to serialize()
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Support use of hyphen in asset package name
This PR is a continuity of #28128
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29122
| License | MIT
| Doc PR | n/a
According to issue https://github.com/symfony/symfony-docs/pull/10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```yaml
framework:
assets:
packages:
app-client-frontend:
version: "%env(FRONTEND_VERSION)%"
version_format: '%%2$s/dist/%%1$s'
base_urls:
- "%env(FRONTEND_URL)%"
```
Commits
-------
5c58b6e875 Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
30b6a4f7bf Support use of hyphen in asset package name
This PR was merged into the 4.2 branch.
Discussion
----------
Remove a harmless duplicate array key from VarDumper
This has the same field order as the original code.
Detected via static analysis - The `type` is also the first element of the array. This change preserves the key order of the resulting array.
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes (harmless)
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | N/A
| Fixed tickets |
| License | MIT
| Doc PR |
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest 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 the master branch.
-->
Commits
-------
1cd30acc2a Remove a harmless duplicate array key from VarDumper
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes#30003).
Discussion
----------
Remove unreachable code
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | (unreachable)
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | n/a (unreachable) <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
The try/finally block will either return or throw.
Additionally, $socket was never defined.
Detected via static analysis
Commits
-------
2fb8f49146 Remove unreachable code
This PR was merged into the 4.2 branch.
Discussion
----------
Fix format strings for deprecation notices
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets |
| License | MIT
| Doc PR |
The `%c` conversion specifier expects an integer
(the value of the byte to print). To produce a literal `%`, `%%` should be used.
Detected via static analysis
Commits
-------
2e00dfb0c8 Fix format strings for deprecation notices
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (Manual tests only)
| Fixed tickets | #28122
| License | MIT
| Doc PR | n/a
According to issue https://github.com/symfony/symfony-docs/pull/10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```
framework:
assets:
packages:
app-client-frontend:
version: "%env(FRONTEND_VERSION)%"
version_format: '%%2$s/dist/%%1$s'
base_urls:
- "%env(FRONTEND_URL)%"
```