Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documented the ArgumentResolver along the ControllerResolver#6422

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@linaori
Copy link
Contributor

QA
Doc fix?yes
New docs?no ~symfony/symfony#18308
Applies to3.1
Fixed tickets~

The ArgumentResolver is used now instead of the ControllerResolver. I have yet to document the extension point but first I want to have this page mention it.

@linaorilinaoriforce-pushed thefeature/argument-resolvers branch 3 times, most recently from00e0e7b to678c705CompareApril 1, 2016 11:56
@linaorilinaori changed the titleDocumented the ArgumentResolver along the ControllerResolver[WiP] Documented the ArgumentResolver along the ControllerResolverApr 1, 2016
@linaorilinaoriforce-pushed thefeature/argument-resolvers branch 2 times, most recently frombd2fb26 to947626cCompareApril 1, 2016 13:47
@javiereguiluz
Copy link
Member

@iltar thanks for this contribution. We'll need to change a bit the "tone" (some parts read too informal) but so far contents are very promising. Thanks!

@linaori
Copy link
ContributorAuthor

@javiereguiluz sure thing! I'm not too experienced with the language style so I'm firstly making sure the contents is up-to-date so it can be fine-tuned afterwards. This is always the hardest part for me writing documentation.

When writing code, you have codestyle, but when you're writing texts it's almost freestyle ;)

@javiereguiluz
Copy link
Member

@iltar you are doing great! It's just a matter of minor "cosmetic changes". But for now don't worry about them 😄

@linaori
Copy link
ContributorAuthor

@javiereguiluz is the array shorthand notation preferred or do you want the full notation?

edit - for now I will keep amending so I can see if I make parse errors without too many issues, phpstorm only shows me highlights, no validation

@javiereguiluz
Copy link
Member

@iltar we still usearray() in the docs.

@linaorilinaoriforce-pushed thefeature/argument-resolvers branch 2 times, most recently from25f4985 to2eecbd2CompareApril 1, 2016 14:21
@linaorilinaoriforce-pushed thefeature/argument-resolvers branch 2 times, most recently from66ee94b to1ce0cc7CompareApril 2, 2016 16:28

..caution::

The `getArguments()` method in the:class:`Symfony\\Component\\Httpkernel\\Controller\\ControllerResolver`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

getArguments must be surrounded by two `

fabpot added a commit to symfony/symfony that referenced this pull requestApr 3, 2016
…iltar, HeahDude)This PR was merged into the 3.1-dev branch.Discussion----------Added an ArgumentResolver with clean extension point| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |#17933 (pre-work),#1547,#10710| License       | MIT| Doc PR        |symfony/symfony-docs#6422**This PR is a follow up for and blocked by:#18187**, relates to#11457 by@wouterj. When reviewing, please take the last commit: [Added an ArgumentResolver with clean extension point](4c092b3)This PR provides:- The ability to tag your own `ArgumentValueResolverInterface`. This means that you can effectively expand on the argument resolving in the `HttpKernel` without having to implement your own `ArgumentResolver`.- The possibility to cache away argument metadata via a new `ArgumentMetadataFactory` which simply fetches the data from the cache, effectively omitting 1 reflection call per request. *Not implemented in this PR, but possible once this is merged.*- The possibility to add a PSR-7 adapter to resolve the correct request, avoids the paramconverters- The possibility to add a value resolver to fetch stuff from $request->query- Drupal could simplify [their argument resolving](https://github.com/drupal/drupal/blob/8.1.x/core/lib/Drupal/Core/Controller/ControllerResolver.php) by a lot- etc.The aim for this PR is to provide a 100% BC variant to add argument resolving in a clean way, this is shown by the 2 tests: `LegacyArgumentResolverTest` and `ArgumentResolverTest`./cc@dawehner@larowlan if you have time, can you check the impact for Drupal? I think this should be a very simple change which should make it more maintainable.Commits-------1bf80c9 Improved DX for the ArgumentResolverf29bf4c Refactor ArgumentResolverTestcee5106 cs fixescfcf764 Added an ArgumentResolver with clean extension point360fc5f Extracting arg resolving from ControllerResolver
@linaori
Copy link
ContributorAuthor

So the PR is merged and the previous comments are addressed. I will open a new PR once I'm done writing some initial docs about the actual feature.

I think everything code related is fixed in this PR so it's up to the text itself now

@xabbuh
Copy link
Member

@iltar Is this supposed to be merged before#6438 or the other way around?

@linaori
Copy link
ContributorAuthor

@xabbuh it doesn't really matter, one describes the feature, the other makes sure the documentation doesn't trigger deprecations in your code.

:ref:`controller resolver<component-http-kernel-resolve-controller>` (explained
below). To complete your working kernel, you'll add more event listeners
to the events discussed below::
to the events discussed below
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

missing colon ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Moved the caution to below, this also fixes the issue where the : refers to a caution instead of the intended code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Then it should be a full stop (.).

@linaorilinaoriforce-pushed thefeature/argument-resolvers branch from24b11e2 toa9897c7CompareApril 14, 2016 11:30
fabpot added a commit to symfony/symfony that referenced this pull requestApr 15, 2016
This PR was merged into the 3.1-dev branch.Discussion----------[HttpKernel] Renamed the argument resolver tag| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | not if merged before 3.1| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ~| License       | MIT| Doc PR        | ~Changed as discussed several times:#18510 (comment),symfony/symfony-docs#6422 (comment).Commits-------cd10057 Renamed argument resolver tag, added test
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestApr 15, 2016
This PR was merged into the 3.1-dev branch.Discussion----------[HttpKernel] Renamed the argument resolver tag| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | not if merged before 3.1| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ~| License       | MIT| Doc PR        | ~Changed as discussed several times:symfony/symfony#18510 (comment),symfony/symfony-docs#6422 (comment).Commits-------cd10057 Renamed argument resolver tag, added test
@linaori
Copy link
ContributorAuthor

linaori commentedApr 15, 2016
edited
Loading

Broken build is related to:

:doc:`/cookbook/controller/argument_value_resolver`

This will be solved as soon as#6438 is merged.

@wouterj
Copy link
Member

Merged#6438 now. Can you please rebase?

@linaorilinaoriforce-pushed thefeature/argument-resolvers branch froma9897c7 to4edfe5aCompareJune 12, 2016 09:13
@linaori
Copy link
ContributorAuthor

@wouterj rebase is done and checks pass now

:class:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface` and
use any argument resolver that implements the
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface`.
However, the HttpKernel component comes with some built-in listeners, and everything
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

remove the comma beforeand

@wouterj
Copy link
Member

Can you please also fix the outstanding comments (both from me and others)? Sorry for not reviewing it before asking you to rebase.

@xabbuh
Copy link
Member

@iltar Is this still a work in progress from your point of view?

@linaori
Copy link
ContributorAuthor

@xabbuh I totally forgot to fix the title! No, this should be finished.

@linaorilinaori changed the title[WiP] Documented the ArgumentResolver along the ControllerResolverDocumented the ArgumentResolver along the ControllerResolverJul 4, 2016

$response->send();


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should be removed

@xabbuh
Copy link
Member

👍

@linaorilinaoriforce-pushed thefeature/argument-resolvers branch froma26f622 to3eda91dCompareJuly 4, 2016 12:06
@linaorilinaoriforce-pushed thefeature/argument-resolvers branch from3eda91d tof630d8dCompareJuly 4, 2016 12:08
@linaori
Copy link
ContributorAuthor

Fixed a merge conflict and the feedback, can you please check it 1 time if everything went fine? I had a small issue inbetween

@xabbuh
Copy link
Member

👍 still looks good to me

Status: Reviewed

Note to merger: This needs to be merged in the3.1 branch.

wouterj added a commit that referenced this pull requestJul 5, 2016
…olver (iltar)This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes#6422).Discussion----------Documented the ArgumentResolver along the ControllerResolver| Q             | A| ------------- | ---| Doc fix?      | yes| New docs?     | no ~symfony/symfony#18308| Applies to    | 3.1| Fixed tickets | ~The ArgumentResolver is used now instead of the ControllerResolver. I have yet to document the extension point but first I want to have this page mention it.Commits-------11920e3 Documented the ArgumentResolver along the ControllerResolver
@wouterj
Copy link
Member

Thanks@iltar! This is a big PR :)

I've merged this into the 3.1 branch as usual. After merging, I reread all changed sections and did some minor changes in998cc40 It would be great if you can review them.

@wouterjwouterj closed thisJul 5, 2016
@linaori
Copy link
ContributorAuthor

@wouterj I've checked it, LGTM

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

8 participants

@linaori@javiereguiluz@xabbuh@weaverryan@wouterj@fabpot@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp