This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier cef7e5b1b0 feature #18308 Added an ArgumentResolver with clean extension point (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](4c092b31f9)

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 ArgumentResolver
f29bf4c Refactor ArgumentResolverTest
cee5106 cs fixes
cfcf764 Added an ArgumentResolver with clean extension point
360fc5f Extracting arg resolving from ControllerResolver
2016-04-03 18:53:12 +02:00
.composer Merge branch '2.3' into 2.7 2016-04-02 09:48:01 +02:00
.github Improved the "branch" row of the PR table 2016-03-13 12:02:32 +01:00
src/Symfony feature #18308 Added an ArgumentResolver with clean extension point (iltar, HeahDude) 2016-04-03 18:53:12 +02:00
.editorconfig Add EditorConfig File 2012-06-16 14:08:15 +02:00
.gitignore Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
.php_cs use nowdoc instead of heredoc 2015-12-21 17:05:00 +01:00
.travis.php [Cache] Symfony PSR-6 implementation 2016-01-19 08:02:17 +01:00
.travis.yml Merge branch '3.0' 2016-04-02 10:08:03 +02:00
appveyor.yml Merge branch '3.0' 2016-04-02 10:08:03 +02:00
CHANGELOG-3.0.md Merge branch '3.0' 2016-03-31 10:13:34 +02:00
composer.json Merge branch '3.0' 2016-04-02 10:08:03 +02:00
CONTRIBUTING.md Update contributing docs 2016-02-24 15:36:06 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.3.39 2016-03-13 17:37:49 +01:00
LICENSE Update copyright year 2016-01-01 23:53:47 -03:00
phpunit [phpunit] disable prophecy 2016-03-25 10:58:58 +01:00
phpunit.xml.dist Merge branch '3.0' 2016-03-16 18:16:29 +01:00
README.md Merge branch '2.8' 2015-06-04 22:30:47 +02:00
UPGRADE-3.0.md Fix leftover conflict marker in UPGRADE-3.0.md 2016-03-14 22:24:56 +01:00
UPGRADE-3.1.md cs fixes 2016-04-01 11:46:27 +02:00
UPGRADE-4.0.md minor #18396 upgrade 3.1/4.0 minor cs fixes (HeahDude) 2016-04-01 08:31:30 +02:00

README

What is Symfony?

Symfony is a PHP full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Installation

The best way to install Symfony is to use the official Symfony Installer. It allows you to start a new project based on the version you want.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony can help speed up your development and take the quality of your work to the next level, read the official Symfony documentation.

Contributing

Symfony is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section and use Pull Request Template.

Running Symfony Tests

Information on how to run the Symfony test suite can be found in the Running Symfony Tests section.