Commit Graph

47682 Commits

Author SHA1 Message Date
Fabien Potencier
31fb219896 feature #34550 [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | ~
| 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/roadmap):
 - 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 master.
-->
Taking over #33218 (taking over #30983)

The `ChoiceLoaderInterface` is not easy to understand/implement, while its goal is simple, lazy load an array of choices.
What may seem complicated is the how/what to optimize loading, we need to deal with a `$value` callback (which refers to the `choice_value` option allowing to transform a model choice to a unique string value that can be displayed/submitted).

We have now enough implementations in core to justify the need of an abstraction and provide a better DX in the process.

Before this PR we needed to implement 3 methods to create a loader:
 - `loadChoiceList(?callable $value): ChoiceListInterface`
 - `loadChoicesForValues(array $values, ?callable $value): array`
 - `loadValuesForChoices(array $choices, ?callable $value): array`
and handle optimization, in each.

Now we only need to implement:
 - `loadChoices():  iterable`

and optionnally:
 - `doLoadChoicesForValues(array $values, ?callable $value): array`
if more optimization is needed to only load submitted values, (i.e the core intl loader prevents loading values that are the same as choices, and the doctrine one performs a `WHERE id IN ($ids)` query).

Commits
-------

1394df2dea [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations
2020-02-12 20:40:35 +01:00
Fabien Potencier
3fb89ef179 feature #35688 [Notifier] Simplify OVH implementation (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier] Simplify OVH implementation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->
<!--
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/roadmap):
 - 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 master.
-->

Commits
-------

39f9ac2620 [Notifier] Simplify OVH implementation
2020-02-12 17:30:07 +01:00
Fabien Potencier
39f9ac2620 [Notifier] Simplify OVH implementation 2020-02-12 17:24:01 +01:00
Fabien Potencier
5150fc51f6 bug #35685 sms endpoint is only available in ovh-eu (cbourgois)
This PR was merged into the 5.1-dev branch.

Discussion
----------

sms endpoint is only available in ovh-eu

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | no ticket. <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT

`/sms` endpoint is only available for `ovh-eu` api.

Signed-off-by: Cyrille Bourgois <cyrille.bourgois@corp.ovh.com>

Commits
-------

a49dead4e0 sms endpoint is only available in ovh-eu
2020-02-12 17:20:01 +01:00
Fabien Potencier
fb14669c08 minor #35687 [HttpKernel] Fix method name in doc comments (successgo)
This PR was merged into the 5.0 branch.

Discussion
----------

[HttpKernel] Fix method name in doc comments

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| 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 #35686  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->
<!--
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/roadmap):
 - 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 master.
-->

Commits
-------

5888566a89 [HttpKernel] Fix method name in doc comments
2020-02-12 17:19:20 +01:00
Success Go
5888566a89 [HttpKernel] Fix method name in doc comments 2020-02-12 22:34:24 +08:00
Cyrille Bourgois
a49dead4e0
sms endpoint is only available in ovh-eu
Signed-off-by: Cyrille Bourgois <cyrille.bourgois@corp.ovh.com>
2020-02-12 14:30:49 +01:00
Fabien Potencier
b7df5ea6bb minor #35684 Remove deprecated endpoint (antleblanc)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Remove deprecated endpoint

| Q             | A
| ------------- | ---
| Branch?       | master (deprecated endpoint)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | no ticket.
| License       | MIT

runabove has been closed.

previous attempt made on the read-only repository: https://github.com/symfony/ovh-cloud-notifier/pull/1

Signed-off-by: Antoine Leblanc <antoine.leblanc@corp.ovh.com>

Commits
-------

e65a8cffad Remove deprecated endpoint
2020-02-12 14:12:05 +01:00
Antoine Leblanc
e65a8cffad
Remove deprecated endpoint
runabove has been closed.

Signed-off-by: Antoine Leblanc <antoine.leblanc@corp.ovh.com>
2020-02-12 12:02:15 +01:00
Fabien Potencier
da9f3af3e1 bug #35578 [Console][QuestionHelper] Use String width() to properly move the cursor backwards (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console][QuestionHelper] Use String width() to properly move the cursor backwards

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/35536#issuecomment-581343181
| License       | MIT
| Doc PR        | -

This bug can only be fixed on master since we need to require the String component. Once the component is required, we can iterate in the Console component to use it more where it is needed.

Commits
-------

67a1f55ce1 [Console][QuestionHelper] Use String width() to properly move the cursor backwards
2020-02-11 16:25:50 +01:00
Nicolas Grekas
b84faa4ee8 Merge branch '5.0'
* 5.0:
  [HttpClient] fix "undefined variable"
  [HttpClient] remove useless code in test
  [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [Security] Fix exception name in doc comments
2020-02-11 15:27:37 +01:00
Nicolas Grekas
b43d418171 Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] fix "undefined variable"
  [HttpClient] remove useless code in test
  [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [Security] Fix exception name in doc comments
2020-02-11 15:26:26 +01:00
Nicolas Grekas
ded655b669 Merge branch '3.4' into 4.4
* 3.4:
  [Security] Fix exception name in doc comments
2020-02-11 15:26:15 +01:00
Nicolas Grekas
7e734a3389 [HttpClient] fix "undefined variable" 2020-02-11 15:25:58 +01:00
Nicolas Grekas
d41ea2a02e [HttpClient] remove useless code in test 2020-02-11 15:05:45 +01:00
Fabien Potencier
5cf876f3ac bug #35674 [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Spotted by @B-Galati in https://github.com/symfony/symfony/pull/35659#issuecomment-584508876

Commits
-------

6d1657b720 [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
2020-02-11 14:59:26 +01:00
Fabien Potencier
acc98b775a Fix typos 2020-02-11 14:52:27 +01:00
Fabien Potencier
e0a6a7331c feature #34540 [Notifier] add OvhCloud bridge (antiseptikk)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Notifier] add OvhCloud bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add OvhCloud sms integration for the Notifier component.
Tested with 'ovh-eu' entrypoint.

Inspiration : https://github.com/ovh/php-ovh

Commits
-------

76bfb85e26 [Notifier] add OvhCloud bridge
2020-02-11 14:51:31 +01:00
Thomas Ferney
76bfb85e26 [Notifier] add OvhCloud bridge 2020-02-11 14:51:25 +01:00
Nicolas Grekas
6d1657b720 [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface 2020-02-11 14:51:01 +01:00
Nicolas Grekas
8c694d6157 [DomCrawler] fix leftover 2020-02-11 11:47:17 +01:00
Nicolas Grekas
c895a400d9 bug #35672 [HttpClient] fix HttpClientDataCollector when handling canceled responses (thematchless)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HttpClientDataCollector when handling canceled responses

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

small addition to the already merged #35562

Commits
-------

7088ef78f7 [HttpClient] fix HttpClientDataCollector when handling canceled responses
2020-02-11 11:44:52 +01:00
Nicolas Grekas
1d34c8ca89 feature #35192 [PhpUnitBridge] Add the ability to expect a deprecation inside a test (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[PhpUnitBridge] Add the ability to expect a deprecation inside a test

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | todo

Replaces https://github.com/symfony/symfony/pull/25757

Proposed implementation uses a dedicated trait for a better DX. Using `$this->expectDeprecation()` feels natural.

Unfortunately it is not currently possible to test the cases that should produce errors or risky, so there are some things that are not testable here. I plan to propose another feature for the PhpUnitBridge to be able to test those kind of things. If it's accepted, we will then be able to strenghten the tests of this one.

Commits
-------

a3a928050d [PhpUnitBridge] Add the ability to expect a deprecation inside a test
2020-02-11 11:38:57 +01:00
Thomas Calvet
a3a928050d [PhpUnitBridge] Add the ability to expect a deprecation inside a test 2020-02-11 11:38:45 +01:00
Matthias Meyer
7088ef78f7
[HttpClient] fix HttpClientDataCollector when handling canceled responses 2020-02-11 11:10:58 +01:00
Robin Chalas
bbeb49f32d minor #35671 [Messenger][Redis] Add missing changelog entry (chalasr)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger][Redis] Add missing changelog entry

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Missed in #35384

Commits
-------

08fb0c4dfd [Messenger][Redis] Add missing changelog entry
2020-02-11 09:47:53 +01:00
Robin Chalas
08fb0c4dfd [Messenger][Redis] Add missing changelog entry 2020-02-11 09:47:07 +01:00
Fabien Potencier
1b52d6035a feature #35667 [DomCrawler] Rename UriExpander.php -> UriResolver (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DomCrawler] Rename UriExpander.php -> UriResolver

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | refs https://github.com/symfony/symfony-docs/pull/13054#discussion_r377138605
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/13054 // don't open a new issue in doc repo

Commits
-------

3217f8182a [DomCrawler] Rename UriExpander.php -> UriResolver
2020-02-11 07:10:22 +01:00
Grégoire Pineau
3217f8182a [DomCrawler] Rename UriExpander.php -> UriResolver 2020-02-11 07:10:08 +01:00
Fabien Potencier
e5ccf5d558 minor #35668 Updated ICU urls (oleg-andreyev)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Updated ICU urls

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Updated `@see` links to icu4c project (PHP docs has outdated links also)

Commits
-------

7adece8cc7 Updated ICU urls
2020-02-11 06:40:00 +01:00
Oleg Andreyev
7adece8cc7
Updated ICU urls 2020-02-10 23:25:54 +02:00
Fabien Potencier
a9eec7169a minor #35663 [Contracts] Split the global CHANGELOG in dedicated CHANGELOG per contract (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Contracts] Split the global CHANGELOG in dedicated CHANGELOG per contract

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

---

This is more in sync with what we do with other components + bundles.
And when we contribute to a contact, it's easier to find the file (because with the substree, we don't get the global package)

Commits
-------

a05ee087a2 [Constracts] Split the global CHANGELOG in dedicated CHANGELOG per contract
2020-02-10 21:09:55 +01:00
Nicolas Grekas
033ec1bc0f feature #35611 [Console] Moved estimated & remaining calculation logic to separate get method (peterjaap)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Console] Moved estimated & remaining calculation logic to separate get method

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT

This way, we can use `getEstimated()`and `getRemaining()` to get easy access to the estimated / remaining number of seconds to be used in our placeholder definition set with `setPlaceholderFormatterDefinition` without having to redefine the calculation ourself.

Example before;

```php
ProgressBar::setPlaceholderFormatterDefinition(
    'eta',
    function (ProgressBar $progressBar) {
        $estimated = round((time() - $progressBar->getStartTime()) / ($progressBar->getProgress() ?: 0.1) * $progressBar->getMaxSteps());
        return date('H:i:s', strtotime('+' . $estimated . ' seconds'));
    }
);
```

Example after;

```php
ProgressBar::setPlaceholderFormatterDefinition(
    'eta',
    function (ProgressBar $progressBar) {
        return date('H:i:s', strtotime('+' . $this->getEstimated() . ' seconds'));
    }
);
```

Commits
-------

19958fba5a [Console] Moved estimated & remaining calculation logic to separate get method
2020-02-10 17:05:15 +01:00
Peter Jaap Blaakmeer
19958fba5a [Console] Moved estimated & remaining calculation logic to separate get method 2020-02-10 17:05:09 +01:00
Fabien Potencier
7e4abf5e9d feature #33968 [Notifier] Add Firebase bridge (Jeroeny)
This PR was squashed before being merged into the 5.1-dev branch (closes #33968).

Discussion
----------

[Notifier] Add Firebase bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add [Firebase](https://firebase.google.com) integration for the Notifier component. With Firebase you can send push notifications to the users of you Android and iOS app and website (formerly known as Google Cloud messaging).

I'm not sure if it's possible to have this merged, like the other bridges. Or if I should create a stand-alone repository? That'd be fine too.

Also it's now using the `ChatMessage` as implementation of `Symfony\Component\Notifier\Message\MessageInterface`, but I feel like this component could use a `PushMessage` or something similar. Although I'm not sure if it would contain more than `subject` that the `ChatMessage` does.

Commits
-------

2776d2f811 [Notifier] Add Firebase bridge
2020-02-10 16:35:00 +01:00
Jeroeny
2776d2f811 [Notifier] Add Firebase bridge 2020-02-10 16:34:55 +01:00
Fabien Potencier
1d472a6e9a feature #34022 [Notifier] add RocketChat bridge (Jeroeny)
This PR was squashed before being merged into the 5.1-dev branch (closes #34022).

Discussion
----------

[Notifier] add RocketChat bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add [RocketChat](https://rocket.chat/) integration for the Notifier component. RocketChat is a self hosted chat service.

Fully tested with a trial version of RocketChat.

@wirone I noticed you suggested this.

Commits
-------

4869ef61cd [Notifier] add RocketChat bridge
2020-02-10 16:33:35 +01:00
Jeroeny
4869ef61cd [Notifier] add RocketChat bridge 2020-02-10 16:33:29 +01:00
Fabien Potencier
4003700e90 feature #32454 [Messenger] Add SQS transport (jderusse)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Add SQS transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | TODO

This PR add the AWS SQS transport in messenger.

It also add a `DisconnectedReceiverInterface` that allows the worker to release not-proceeded message (which are not automatically released in SQS and have to wait a TTL). Tell me if you prefer to move it in a dedicated PR.

accepted DNS:
- `sqs://default/accountId/queueName`
- `sqs://default/queueName`
- `sqs://default/queueName?region=us-east-2`
- `sqs://my_custome_endpoint:12345/queueName?sslmode=disabled`

To reduce AWS costs, the implementation performs a long polling call and prefetch several messages.
TO get ~real time worker, one could use `./bin/console messenger:consume --sleep 0.001`

Commits
-------

c226479d5f [Messenger] Add SQS transport
2020-02-10 13:30:37 +01:00
Fabien Potencier
11f1312d91 feature #33875 Add Mattermost notifier bridge (thePanz)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Add Mattermost notifier bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  See #33687
| License       | MIT
| Doc PR        |

Added a http://mattermost.org (open source Slack alternative)  transport for the new Notifier component

Commits
-------

eaba6a507c Add Mattermost notifier bridge
2020-02-10 13:29:39 +01:00
Grégoire Pineau
a05ee087a2 [Constracts] Split the global CHANGELOG in dedicated CHANGELOG per contract 2020-02-10 11:54:33 +01:00
Thomas Calvet
67a1f55ce1 [Console][QuestionHelper] Use String width() to properly move the cursor backwards 2020-02-10 10:12:08 +01:00
Emanuele Panzeri
eaba6a507c Add Mattermost notifier bridge 2020-02-10 10:04:31 +01:00
Fabien Potencier
9eb7cb1b7b feature #35400 [RFC][DX][OptionsResolver] Allow setting info message per option (yceruto)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[RFC][DX][OptionsResolver] Allow setting info message per option

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | TODO

This is a DX proposal that will help in debugging/errors to better understand the meaning of one defined option.

This is how you'd use it:
```php
$resolver = new OptionsResolver();
$resolver->setDefined('date');
$resolver->setAllowedTypes('date', \DateTime::class);
$resolver->setInfo('date', 'A future date'); // <-- NEW
// ...
```
This information may be useful for those options where their name cannot be intuitive enough, or their purpose is too complex. Here is an example (based on the example above):
```php
// ...
$resolver->setAllowedValues('date', static function ($value): bool {
    return $value >= new \DateTime('now');
});
```
So, if you introduce a date value that does not match the criteria, you will get this error message:

**Before:**
```
The option "date" with value DateTime is invalid.
```
Note that the allowed value is not printable in this case, hence the error message cannot be clear at all.

**After:**
```
The option "date" with value DateTime is invalid. Info: A future date.
```
Although a more accurate error message can be triggered within the `\Closure` if desired.

Also you'll see this info message on `debug:form` command (see tests), then you have in advance the informative description of any option.

What do you think?

Commits
-------

0477a06d8a Allow setting one info message per option
2020-02-10 09:05:33 +01:00
Fabien Potencier
9e0a39ee05 minor #35657 [Security] Fix exception name in doc comments (chalasr)
This PR was squashed before being merged into the 3.4 branch (closes #35657).

Discussion
----------

[Security] Fix exception name in doc comments

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

f10098e9f1 [Security] Fix exception name in doc comments
2020-02-10 09:04:06 +01:00
Robin Chalas
f10098e9f1 [Security] Fix exception name in doc comments 2020-02-10 09:03:59 +01:00
Yonel Ceruto
0477a06d8a Allow setting one info message per option 2020-02-09 19:42:47 -05:00
Jules Pietri
1394df2dea [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations 2020-02-10 00:49:37 +01:00
Nicolas Grekas
332fa65f69 [FrameworkBundle] fix typo 2020-02-09 21:32:53 +01:00
Nicolas Grekas
477ee19778 feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][Routing] added Configurators to handle template and redirect controllers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | let's see
| Fixed tickets | partially #24640, #25145
| License       | MIT
| Doc PR        | symfony/symfony-docs#11120

While working on https://github.com/symfony/symfony-docs/pull/11085, I felt bad about the long notations required for simple [redirects](https://symfony.com/doc/current/routing/redirect_in_config.html) and [templates rendering](https://symfony.com/doc/current/templating/render_without_controller.html) template actions, but I love and use those features since always. Then I gave it a try yesterday night and now I realised I missed #24640 and that #25145 has been closed x).

So here we go, here's my WIP. WDYT of this implementation? ping @javiereguiluz?

I'm going to open the PR in the docs so we can discuss the DX changes there too, and keep focus on the code here.

Cheers!

EDIT
----
This PR now only update PHP-DSL configurators.

______________

TODO:

- [x] gather reviews
- ~[x] fix xml schema~
- [x] add some tests
- ~[ ] handle xsd auto discovery~
- [x] rebase on top of #30507
- [x] ~add shortcuts for #30514~

Commits
-------

de74794acf [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers
2020-02-09 17:37:38 +01:00