Commit Graph

41011 Commits

Author SHA1 Message Date
Grégoire Pineau
e78a13f717 [Workflow] Added missing license header 2019-03-20 20:20:03 +01:00
Yonel Ceruto
393d7280e5 Fix case when multiple loaders are providing paths for the same namespace 2019-03-20 11:45:54 -04:00
Fabien Potencier
fc826aac4c feature #30508 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration (Jules Pietri)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | symfony/symfony-docs#11126

A sibling to #30501, everything is in the title :).

Commits
-------

2911490c80 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration
2019-03-20 16:17:03 +01:00
Jules Pietri
2911490c80 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration 2019-03-20 15:57:56 +01:00
Fabien Potencier
1246c79b9f bug #30595 Do not validate child constraints if form has no validation groups (maryo)
This PR was merged into the 3.4 branch.

Discussion
----------

Do not validate child constraints if form has no validation groups

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

If a form has `Valid` constraint and `validation_groups` set to an empty array (to disable validation) then its children were still validated using default validation group because `FormValidator` validated the form data using the empty array validation group here
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L76

and then `RecursiveContextualValidator` treats the empty array as default validation group here.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L86

Commits
-------

f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups
2019-03-20 13:40:27 +01:00
Fabien Potencier
1479a26a0b feature #28920 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN

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

PR green and ready. From UPGRADE files:

 EventDispatcher
---------------

 * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated

HttpKernel
----------

 * Renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent`
 * Renamed `FilterControllerEvent` to `ControllerEvent`
 * Renamed `FilterResponseEvent` to `ResponseEvent`
 * Renamed `GetResponseEvent` to `RequestEvent`
 * Renamed `GetResponseForControllerResultEvent` to `ViewEvent`
 * Renamed `GetResponseForExceptionEvent` to `ExceptionEvent`
 * Renamed `PostResponseEvent` to `TerminateEvent`

Security
---------

 * The `ListenerInterface` is deprecated, turn your listeners into callables instead.
 * The `Firewall::handleRequest()` method is deprecated, use `Firewall::callListeners()` instead.

Commits
-------

75369dabb8 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN
2019-03-20 13:34:13 +01:00
Fabien Potencier
81bf2abf19 feature #30605 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait (alex-vasilchenko-md)
This PR was squashed before being merged into the 4.3-dev branch (closes #30605).

Discussion
----------

[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30573
| License       | MIT

A fix for this issue: https://github.com/symfony/symfony/issues/30573
Support for "rediss:" in DSN added.

Commits
-------

7e2852dd44 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait
2019-03-20 12:35:16 +01:00
Alex Vasilchenko
7e2852dd44 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait 2019-03-20 12:35:07 +01:00
Fabien Potencier
2de59a1362 bug #30440 [TwigBridge] Fix DebugCommand when chain loader is involved (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBridge] Fix DebugCommand when chain loader is involved

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30426
| License       | MIT

Better diff: https://github.com/symfony/symfony/pull/30440/files?utf8=%E2%9C%93&diff=unified&w=1

Commits
-------

f647b4a29d Fix DebugCommand when chain loader is involved
2019-03-20 09:06:40 +01:00
Fabien Potencier
059ba38214 bug #30479 Check if Client exists when test.client does not exist, to provide clearer exception message (SerkanYildiz)
This PR was squashed before being merged into the 3.4 branch (closes #30479).

Discussion
----------

Check if Client exists when test.client does not exist, to provide clearer exception message

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30420
| License       | MIT

The `DotEnv` component does not overwrite by using environment variables declared in `.env` files.

In the `FrameworkExtension` will be checked if the framework.test config is set to a non-false value, if so it will load the `test.xml` file which contains the definition for the `test.client` service.

When running `php bin/phpunit` it will use `phpunit.xml.dist` but because we defined `APP_ENV` in our system it will not load `test.xml` so when creating a client to do functional tests, we'll get an exception which isn't correct: `You cannot create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit"`

This PR aims to add a clearer exception message which indicates what really should be done to fix the error message.

Commits
-------

b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message
2019-03-20 08:44:30 +01:00
Serkan Yildiz
b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message 2019-03-20 08:44:21 +01:00
Fabien Potencier
3b9dad4e46 bug #30597 [Form] Added ResetInterface to CachingFactoryDecorator (HeahDude)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] Added ResetInterface to CachingFactoryDecorator

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29259
| License       | MIT
| Doc PR        | ~

I don't know if this should be considered a feature and target master, but I tend to see it as a bug fix.

Commits
-------

4ddf5a14eb [Form] Added ResetInterface to CachingFactoryDecorator
2019-03-20 08:34:28 +01:00
Fabien Potencier
d92ae4544c minor #30600 [Workflow] Remove deprecated usage (Nek-)
This PR was merged into the 4.2 branch.

Discussion
----------

[Workflow] Remove deprecated usage

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT

This is a little improvement suggestion because string usage is deprecated while it's still the default value. `null` is also deprecated but is required for BC.

Commits
-------

eeb3c29fab Remove deprecated usage
2019-03-20 08:31:47 +01:00
Fabien Potencier
2278d4c52b minor #30611 throw TypeErrors to prepare for type hints in 5.0 (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

throw TypeErrors to prepare for type hints in 5.0

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

Commits
-------

10afb99e3f throw TypeErrors to prepare for type hints in 5.0
2019-03-20 08:28:49 +01:00
Fabien Potencier
388532f085 minor #30610 throw TypeErrors to prepare for type hints in 5.0 (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

throw TypeErrors to prepare for type hints in 5.0

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

Commits
-------

f18751bd98 throw TypeErrors to prepare for type hints in 5.0
2019-03-20 08:28:04 +01:00
Fabien Potencier
83ff914b25 bug #30612 [FrameworkBundle] fix max host connections option for XML configs (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] fix max host connections option for XML configs

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

Commits
-------

3378f5e9a1 fix max host connections option for XML configs
2019-03-20 08:26:26 +01:00
Christian Flothmann
3378f5e9a1 fix max host connections option for XML configs 2019-03-19 22:31:07 +01:00
Christian Flothmann
10afb99e3f throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:12:04 +01:00
Christian Flothmann
f18751bd98 throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:07:50 +01:00
Fabien Potencier
d5d1b50cf7 feature #30604 [HttpClient] add MockHttpClient (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] add MockHttpClient

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

This PR introduces `MockHttpClient` and `MockResponse`, to be used for testing classes that need an HTTP client without making actual HTTP requests.

`MockHttpClient` is configured via its constructor: you provide it either with an iterable or a callable, and these will be used to provide responses as the consumer requests them.

Example:
```php
$responses = [
    new MockResponse($body1, $info1),
    new MockResponse($body2, $info2),
];

$client = new MockHttpClient($responses);
$response1 = $client->request(...); // created from $responses[0]
$response2 = $client->request(...); // created from $responses[1]
```

Or alternatively:
```php
$callback = function ($method, $url, $options) {
    return new MockResponse(...);
};

$client = new MockHttpClient($callback);
$response = $client->request(...); // calls $callback internal
```

The responses provided to the client don't have to be instances of `MockResponse` - any `ResponseInterface` works (e.g. `$this->getMockBuilder(ResponseInterface::class)->getMock()`).

Using `MockResponse` allows simulating chunked responses and timeouts:
```php
$body = function () {
    yield 'hello';
    yield ''; // the empty string is turned into a timeout so that they are easy to test
    yield 'world';
};
$mockResponse = new Mockresponse($body);
```

Last but not least, the implementation simulates the full lifecycle of a properly behaving `HttpClientInterface` contracts implementation: error handling, progress function, etc. This is "proved" by `MockHttpClientTest`, who implements and passes the reference test suite in `HttpClientTestCase`.

Commits
-------

8fd7584158 [HttpClient] add MockHttpClient
2019-03-19 19:41:07 +01:00
Nicolas Grekas
8fd7584158 [HttpClient] add MockHttpClient 2019-03-19 19:38:55 +01:00
Fabien Potencier
72fa2b3b2a feature #21035 [FrameworkBundle] Deprecate the Templating component integration (dunglas, fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate the Templating component integration

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

This PR deprecates the Templating component integration in FrameworkBundle. Only a few people use it because almost everybody use Twig or the serializer to output data. Removing this component will facilitate the maintenance.

Commits
-------

7169f4d3e2 [Templating] added more deprecation
224c891e10 [FrameworkBundle] Deprecate the Templating component integration
2019-03-19 19:24:43 +01:00
Fabien Potencier
7169f4d3e2 [Templating] added more deprecation 2019-03-19 18:56:32 +01:00
Kévin Dunglas
224c891e10 [FrameworkBundle] Deprecate the Templating component integration 2019-03-19 18:23:24 +01:00
Fabien Potencier
b315c638d5 minor #30608 [TwigBundle] Simplify code (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[TwigBundle] Simplify code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

<!--
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
-------

4d6967e756 [TwigBundle] simplified code
2019-03-19 18:22:55 +01:00
Fabien Potencier
4d6967e756 [TwigBundle] simplified code 2019-03-19 18:08:47 +01:00
Marek Štípek
f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups 2019-03-19 13:37:12 +01:00
Jules Pietri
4ddf5a14eb [Form] Added ResetInterface to CachingFactoryDecorator 2019-03-19 13:02:46 +01:00
Maxime Veber
eeb3c29fab Remove deprecated usage
null is also deprecated but must be conserved for BC purpose. Also it will
will not let the develop think string is ok.
2019-03-19 10:13:19 +01:00
Fabien Potencier
860884af59 minor #30596 [Tests] fixed compatbility of assertEquals(): void (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Tests] fixed compatbility of assertEquals(): void

| 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        | ~

Same as #30474.

Commits
-------

3f7bedc61f [Tests] fixed compatbility of assertEquals(): void
2019-03-19 08:58:15 +01:00
Fabien Potencier
f407a2bfa9 bug #30593 Fixed usage of TranslatorInterface in form extension (fixes #30591) (althaus)
This PR was merged into the 4.2 branch.

Discussion
----------

Fixed usage of TranslatorInterface in form extension (fixes #30591)

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30591
| License       | MIT

This PR replaces the fixed usage of the deprecated TranslatorInterface in the form extension with a soft one accepting either the old or the new interface.

Commits
-------

d8092c7b7b Fixed usage of TranslatorInterface in form extension (fixes #30591)
2019-03-19 08:51:32 +01:00
Jules Pietri
3f7bedc61f [Tests] fixed compatbility of assertEquals(): void 2019-03-19 08:51:13 +01:00
Fabien Potencier
bff9e68bb4 feature #30567 [HttpClient] exceptions carry response (antonch1989)
This PR was squashed before being merged into the 4.3-dev branch (closes #30567).

Discussion
----------

[HttpClient] exceptions carry response

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30502
| License       | MIT
| Doc PR        |

Commits
-------

103448cc67 [HttpClient] exceptions carry response
2019-03-19 08:49:53 +01:00
Anton Chernikov
103448cc67 [HttpClient] exceptions carry response 2019-03-19 08:49:42 +01:00
Samuel ROZE
b15eee97b4 feature #28849 [Messenger] Support for handling messages after current bus is finished (Nyholm)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Support for handling messages after current bus is finished

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10015

This is a replacement for #27844. We achieve the same goals without introducing the new concept of "recorder".

```php
class CreateUserHandler
{
    private $em;
    private $eventBus;

    public function __construct(MessageBus $eventBus, EntityManagerInterface $em)
    {
        $this->eventBus = $eventBus;
        $this->em = $em;
    }

    public function __invoke(CreateUser $command)
    {
        $user = new User($command->getUuid(), $command->getName(), $command->getEmail());
        $this->em->persist($user);

        $message = new UserCreatedEvent($command->getUuid();
        $this->eventBus->dispatch((new Envelope($message))->with(new DispatchAfterCurrentBus()));
    }
}
```

Note that this `DispatchAfterCurrentBusMiddleware` is added automatically as the first middleware.

2019-03-13: I updated the PR description.

Commits
-------

903355fbcc Support for handling messages after current bus is finished
2019-03-19 12:36:52 +07:00
Fabien Potencier
ddf0c951e2 fixed CHANGELOG 2019-03-19 06:12:32 +01:00
Fabien Potencier
603f5cf0c3 feature #29538 [Workflow] Add colors to workflow dumps (alexislefebvre)
This PR was squashed before being merged into the 4.3-dev branch (closes #29538).

Discussion
----------

[Workflow] Add colors to workflow dumps

Fixes #28874

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28874, replaces #28933
| License       | MIT
| Doc PR        | TODO, requires https://github.com/symfony/symfony-docs/pull/9476

Fetch data with the `MetadataStore` from #26092 in order to add colors to the dumps.

Example of configuration:

```yaml
            transitions:
                submit:
                    from: start
                    to: travis
                    metadata:
                        title: transition submit title
                        dump_style:
                            label: 'My custom label'
                            arrow_color: '#0088FF'
                            label_color: 'Red'
```

This code was developed as a bundle, examples can be found on its repository: https://github.com/alexislefebvre/SymfonyWorkflowStyleBundle

Commits
-------

60ad109533 [Workflow] Add colors to workflow dumps
2019-03-19 06:08:57 +01:00
Alexis Lefebvre
60ad109533 [Workflow] Add colors to workflow dumps 2019-03-19 06:08:23 +01:00
Nyholm
903355fbcc Support for handling messages after current bus is finished
Co-authored-by: Maxime Steinhausser <ogizanagi@users.noreply.github.com>
2019-03-19 05:15:31 +01:00
Nicolas Grekas
2ff8c19609 bug #30594 [HttpClient] changes minimal php version to use curl push function (XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] changes minimal php version to use curl push function

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

Adding some changes to CurlHttpClient to avoid potential bugs in php < 7.2.17 or php < 7.3.4.
For more information check these bugs :
- https://bugs.php.net/bug.php?id=77747
- https://bugs.php.net/bug.php?id=77535

Resolve by the following commit by Nikic :
- 97f9fd6949

Commits
-------

01a663aea0 [HttpClient] changes minimal php version to use curl push function
2019-03-18 16:16:35 +01:00
Anthony MARTIN
01a663aea0 [HttpClient] changes minimal php version to use curl push function 2019-03-18 16:11:55 +01:00
Nicolas Grekas
ac93c9ece8 feature #28975 [DI] Add an url EnvProcessor (jderusse)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] Add an url EnvProcessor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11128

This PR add a new env processor `url` to convert an URL (or DSN) into an array.

The main goal is to simplify the project configuration and reduce the number of env variable when working with bundle which are not able to deal with DSN
(pick some random project in symfony/recipes-contrib: https://github.com/symfony/recipes-contrib/blob/master/facile-it/mongodb-bundle/0.6/manifest.json or https://github.com/symfony/recipes-contrib/blob/master/wouterj/eloquent-bundle/1.0/manifest.json)

```yaml
# before
MONGODB_HOST=localhost
MONGODB_PORT=27017
MONGODB_USER=
MONGODB_PASSWORD=
MONGODB_DB=symfony

mongo_db_bundle:
    data_collection: '%kernel.debug%'
    clients:
        default:
            hosts:
            - { host: '%env(MONGODB_HOST)%', port: '%env(int:MONGODB_PORT)%' }
            username: '%env(MONGODB_USER)%'
            password: '%env(MONGODB_PASSWORD)%'
            connectTimeoutMS: 3000
    connections:
        default:
            database_name: '%env(MONGODB_DB)%'

# after
MONGODB_DSN=mongodb://localhost:27017/symfony

mongo_db_bundle:
    data_collection: '%kernel.debug%'
    clients:
        default:
            hosts:
            - { host: '%env(key:host:url:MONGODB_DSN)%', port: '%env(key:port:url:MONGODB_DSN)%' }
            username: '%env(key:user:url:MONGODB_DSN)%'
            password: '%env(key:pass:url:MONGODB_DSN)%'
            connectTimeoutMS: 3000
    connections:
        default:
            database_name: '%env(key:path:url:MONGODB_DSN)%'
```

Added also a `query_string` processor to parse query string

```
DATABASE_DSN=mysql://localhost/db?charset=utf8

foo:
  bar:
    charset: '%env(key:charset:query_string🔑query:url:DATABASE_DSN)%'
```

Commits
-------

f253c9b7ca Add an url EnvProcessor
2019-03-18 12:19:06 +01:00
Matthias Althaus
d8092c7b7b Fixed usage of TranslatorInterface in form extension (fixes #30591) 2019-03-18 11:22:47 +01:00
Jérémy Derussé
f253c9b7ca
Add an url EnvProcessor 2019-03-17 18:30:10 +01:00
Nicolas Grekas
401c1d3d75 feature #30419 [FrameworkBundle] Add integration of http-client component (Ioni14, nicoweb)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Add integration of http-client component

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

This PR adds the integration of the HttpClient component on FrameworkBundle.
By default, two services are provided, one implementing SFC-HttpClient, and another PSR18:
* `http_client` + its autowiring alias for `Symfony\Contracts\HttpClient\HttpClientInterface`)
This service is automatically set to the best HTTP client available with the configuration given under the `framework.http_client` key.
* `psr18.http_client` + its autowiring alias for `Psr\Http\Client\ClientInterface`). To make it work, one needs to provide autowiring aliases for `ResponseFactoryInterface` and `StreamFactoryInterface`, which are provided by [the recipe](https://github.com/symfony/recipes-contrib/blob/master/nyholm/psr7/1.0/config/packages/nyholm_psr7.yaml) for `nyholm/psr7` (but could be overriden by apps when using something else).

* one can also configure the default options, and "scoped" clients. For example:
```yaml
http_client:
    default_options:
        capath: '...'
    clients:
        github_client:
            default_options:
                base_uri: 'https://api.github.com'
```

This definition create a `github_client` service implementing SFC-HttpClient and a `psr18.github_client` one implementing PSR18, +2 corresponding named autowiring aliases: `HttpClientInterface $githubClient`,  and `ClientInterface $githubClient`.

Commits
-------

f2d2cf3021 work with attributes for xml config
0023a71260 [FrameworkBundle] Add integration of http-client component
2019-03-17 18:02:43 +01:00
nicoweb
f2d2cf3021 work with attributes for xml config 2019-03-17 17:54:33 +01:00
Nicolas Grekas
f88cb07d30 [DI] revert bad patch in previous PR 2019-03-17 17:47:41 +01:00
Thomas Talbot
0023a71260 [FrameworkBundle] Add integration of http-client component 2019-03-17 17:08:17 +01:00
Nicolas Grekas
3abf9ebc03 bug #30589 [DI] fix casting AutowiringFailedException to string when its callback throws (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] fix casting AutowiringFailedException to string when its callback throws

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

ping @weaverryan

Commits
-------

d57a148b8b [DI] fix casting AutowiringFailedException to string when its callback throws
2019-03-17 17:05:00 +01:00
Nicolas Grekas
d57a148b8b [DI] fix casting AutowiringFailedException to string when its callback throws 2019-03-17 16:55:03 +01:00