-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wire EntityArgumentResolver when available #1554
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jderusse
approved these changes
Aug 18, 2022
HypeMC
reviewed
Aug 18, 2022
lyrixx
reviewed
Aug 19, 2022
nicolas-grekas
force-pushed
the
entity-arg-resolver
branch
4 times, most recently
from
August 19, 2022 12:42
7c743f7
to
d91c5a7
Compare
stof
reviewed
Aug 19, 2022
nicolas-grekas
force-pushed
the
entity-arg-resolver
branch
from
August 23, 2022 07:16
d91c5a7
to
f88e824
Compare
ostrolucky
approved these changes
Aug 28, 2022
nicolas-grekas
force-pushed
the
entity-arg-resolver
branch
from
September 7, 2022 13:02
f88e824
to
dd24835
Compare
nicolas-grekas
force-pushed
the
entity-arg-resolver
branch
from
September 7, 2022 13:09
dd24835
to
cb2b071
Compare
PR rebased, green, thus ready. |
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Nov 9, 2022
… than `EntityValueResolver` (kbond) This PR was merged into the 6.2 branch. Discussion ---------- [SecurityBundle] Set `UserValueResolver`'s priority higher than `EntityValueResolver` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a `UserValueResolver`'s priority is currently `40` and `EntityValueResolver`'s priority is `110` (configured in doctrine-bundle). Currently, to use the `CurrentUser` attribute and `MapEntity` (when `auto_mapping` is enabled), you need to do the following to have it work: ```php public function postAction( #[CurrentUser] #[MapEntity(disabled: true)] User $user, Post $post ) ``` This removes this need for `#[MapEntity(disabled: true)]` but I'm not sure the larger impact of increasing the priority of `UserValueResolver`. Here is some context as to why the priorities are they way they are: - doctrine/DoctrineBundle#1554 (comment) - #18510 Commits ------- 48499b9 Set `UserValueResolver`'s priority higher than `EntityValueResolver`
symfony-splitter
pushed a commit
to symfony/security-bundle
that referenced
this pull request
Nov 9, 2022
… than `EntityValueResolver` (kbond) This PR was merged into the 6.2 branch. Discussion ---------- [SecurityBundle] Set `UserValueResolver`'s priority higher than `EntityValueResolver` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a `UserValueResolver`'s priority is currently `40` and `EntityValueResolver`'s priority is `110` (configured in doctrine-bundle). Currently, to use the `CurrentUser` attribute and `MapEntity` (when `auto_mapping` is enabled), you need to do the following to have it work: ```php public function postAction( #[CurrentUser] #[MapEntity(disabled: true)] User $user, Post $post ) ``` This removes this need for `#[MapEntity(disabled: true)]` but I'm not sure the larger impact of increasing the priority of `UserValueResolver`. Here is some context as to why the priorities are they way they are: - doctrine/DoctrineBundle#1554 (comment) - symfony/symfony#18510 Commits ------- 48499b99c4 Set `UserValueResolver`'s priority higher than `EntityValueResolver`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wires symfony/symfony#43854 by adding a new configuration node.
The default is: