Commit Graph

41011 Commits

Author SHA1 Message Date
Fabien Potencier f206538c79 fixed typo 2019-03-23 16:11:21 +01:00
Fabien Potencier d6c0de2f1b fixed CS 2019-03-23 16:10:57 +01:00
Fabien Potencier 359e1c7a44 feature #30629 [HttpClient] added CachingHttpClient (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] added CachingHttpClient

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

The proposed `CachingHttpClient` uses `HttpCache` from the HttpKernel component to provide an HTTP-compliant cache.

If this is accepted, it could replace the corresponding part in #30602

Commits
-------

dae5686722 [HttpClient] added CachingHttpClient
2019-03-23 16:10:13 +01:00
Fabien Potencier d73a53a61c feature #30602 [BrowserKit] Add support for HttpClient (fabpot, THERAGE Kévin)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[BrowserKit] Add support for HttpClient

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| 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 | part of #30502
| License       | MIT
| Doc PR        | not yet

When combining the power of the new HttpClient component with the BrowserKit and Mime components, we can makes something really powerful... a full/better/awesome replacement for https://github.com/FriendsOfPHP/Goutte.

So, this PR is about integrating the HttpClient component with BrowserKit to give users a high-level interface to ease usages in the most common use cases.

Scraping websites can be done like this:

```php
use Symfony\Component\BrowserKit\HttpBrowser;
use Symfony\Component\HttpClient\HttpClient;

$client = HttpClient::create();
$browser = new HttpBrowser($client);

$browser->request('GET', 'https://example.com/');
$browser->clickLink('Log In');
$browser->submitForm('Sign In', ['username' => 'me', 'password' => 'pass']);
$browser->clickLink('Subscriptions')->filter('table tr:nth-child(2) td:nth-child(2)')->each(function ($node) {
    echo trim($node->text())."\n";
});
```

And voilà! Nice, isn't?

Want to add HTTP cache? Sure:

```php
use Symfony\Component\HttpKernel\HttpCache\Store;

$client = HttpClient::create();
$store = new Store(sys_get_temp_dir().'/http-cache-store');

$browser = new HttpBrowser($client, $store);

// ...
```

Want logging and debugging of HTTP Cache? Yep:

```php
use Psr\Log\AbstractLogger;

class EchoLogger extends AbstractLogger
{
    public function log($level, $message, array $context = [])
    {
        echo $message."\n";
    }
}

$browser = new HttpBrowser($client, $store, new EchoLogger());
```

The first time you run your code, you will get an output similar to:

```
Request: GET https://twig.symfony.com/
Response: 200 https://twig.symfony.com/
Cache: GET /: miss, store
Request: GET https://twig.symfony.com/doc/2.x/
Response: 200 https://twig.symfony.com/doc/2.x/
Cache: GET /doc/2.x/: miss, store
```

But then:

```
Cache: GET /: fresh
Cache: GET /doc/2.x/: fresh
```

Limit is the sky here as you get the full power of all the Symfony ecosystem.

Under the hood, these examples leverage HttpFoundation, HttpKernel (with HttpCache),
DomCrawler, BrowserKit, CssSelector, HttpClient, Mime, ...

Excited?

P.S. : Tests need to wait for the HttpClient Mock class to land into master.

Commits
-------

b5b2a2557c Add tests for HttpBrowser
dd55845706 [BrowserKit] added support for HttpClient
2019-03-23 16:07:52 +01:00
Fabien Potencier eeae25798a bug #30642 [FrameworkBundle] Update Client class to KernelBrowser (SerkanYildiz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Update Client class to KernelBrowser

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

I updated recently the WebTestCase with a check to provide a better/more clear exception message (see #30479). After that change @fabpot renamed different `Client` classes in components to a clearer name (for ex Client in HttpKernel is now KernelBrowser etc.). This PR aims to replace the Client in WebTestCase to the new name class name.

Commits
-------

28b6dd243e Replace class with new name.
2019-03-23 16:06:06 +01:00
Fabien Potencier 2d2cd40ba6 bug #30648 Debug finalized config in debug:config (ro0NL)
This PR was merged into the 4.2 branch.

Discussion
----------

Debug finalized config in debug:config

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

Re-processing the extension config in `debug:config` causes a lot of steps to be ignored, basically everything in `ValidateEnvPlaceholdersPass`.

As such we trigger a misleading error when this command is invoked.

Commits
-------

b9ac3a52fb Debug finalized config in debug:config
2019-03-23 16:04:42 +01:00
Fabien Potencier aa12dd0bd7 feature #30651 Allow user to set the project dir (tdutrion)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Allow user to set the project dir

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |  <!-- symfony/symfony-docs#... required for new features -->

Currently, the project directory is defined by the location of the composer.json file.

That file is not required in production, which therefore [breaks the method getProjectDir](https://github.com/symfony/symfony/issues/23950) (who sends back null).
The offered solution, while working, requires the developer to implement it, and uses inheritance override, while a more aesthetic solution could be used.

This does not fix the behaviour, but allows the developer to pass the project dir as a parameter.

While this solution does not include BC break or anything, it is important to notice that it includes
**an optional parameter**.

[Object instantiation in the framework bundle recipe](https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.2/public/index.php#L23) could be updated as follow (in another PR):

```php
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
```

```php
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG'], dirname(__DIR__));
```

Commits
-------

c40017d63c Allow user to set the project dir
2019-03-23 16:01:31 +01:00
Fabien Potencier 7d01aae41e feature #30654 [HttpClient] Add a ScopingHttpClient (XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Add a ScopingHttpClient

| 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 is a follow up of #30592 by @XuruDragon, with two main differences:
- I think `ScopingHttpClient` might be a better name for what is called a `ConditionalHttpClient` there,
- the `FrameworkBundle` part is removed so that it can be submitted separately later on.

With a `ScopingHttpClient`, you can add some default options conditionally based on the requested URL and a regexp that it should match. This allows building clients that add e.g. credentials based on the requested scheme/host/path.

When the requested URL is a relative one, a default index can be provided - whose corresponding default options (the `base_uri` one especially) will be used to turn it into an absolute URL.

Regexps are anchored on their left side.

E.g. this defines a client that will send some github token when a request is made to the corresponding API, and will not send those credentials if any other host is requested, while also turning relative URLs to github ones:
```php
$client = HttpClient::create();
$githubClient = new ScopingClient($client, [
    'http://api\.github\.com/' => [
        'base_uri' => 'http://api.github.com/',
        'headers' => ['Authorization: token '.$githubToken],
    ],
], 'http://api\.github\.com/');
```

Of course, it's possible to define several regexps as keys so that one can create a client that is authenticated against several hosts/paths.

Commits
-------

1ee0a1147a [HttpClient] Add a ScopingHttpClient
2019-03-23 15:56:28 +01:00
Fabien Potencier 22bd2504dc feature #30388 [Security] undeprecate the RoleHierarchyInterface (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Security] undeprecate the RoleHierarchyInterface

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

Instead of deprecating the interface it is sufficient to deprecate its
getReachableRoles() method and add a new getReachableRoleNames() method
in Symfony 5.

Commits
-------

2d3f2b7a74 undeprecate the RoleHierarchyInterface
2019-03-23 15:37:30 +01:00
Samuel ROZE 1a693039e4 FWB 4.3 requires Messenger 4.3 2019-03-23 21:36:28 +07:00
Fabien Potencier e512b7ecff feature #30652 Fixing a bug where messenger:consume could send message to wrong bus (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fixing a bug where messenger:consume could send message to wrong bus

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

This fixes #30631, where you can run `messener:consume` and accidentally sent received messages into the wrong bus.

The fix (done via middleware) is to attach a "bus name" to the `Envelope` and use it when the message is received to find that bus.

Commits
-------

ef077cf26c Fixing a bug where a transport could receive a message and dispatch it to a different bus
2019-03-23 15:33:29 +01:00
Fabien Potencier e3970f9879 feature #30650 Dispatching two events when a message is sent & handled (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Dispatching two events when a message is sent & handled

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

Alternative to #30646. This uses a more generic system, so you could do anything when a message is sent. The main use-case is when a message is dispatched by a 3rd party.

I didn't try to add *exhaustive* events everywhere: I added an event for a very specific use-case:

When a message is dispatched by a 3rd party, being able to add stamps (e.g. `DelayStamp` or a future `AmqpRoutingKeyStamp` before the message is sent. Example:

```php
class MailerMessageSendToTransportEventSubscriber implements EventSubscriberInterface
{
    public function onSendMessage(SendMessageToTransportsEvent $event)
    {
        $envelope = $event->getEnvelope();
        if (!$envelope->getMessage() instanceof SomeMailerMessage) {
            return;
        }

        $event->setEnvelope($envelope->with(new AmpqRoutingKeyStamp('mailer-route')));
    }

    public static function getSubscribedEvents()
    {
        return [SendMessageToTransportsEvent::class => 'onSendMessage'];
    }
}
```

Along with #30557, we will now have the following events, regarding async messages:
* Event when a message is sent to transports (this PR)
* Event when a message is received from transport, but before handling it
* Event when a message is received from transport and after handling it

Commits
-------

a7ad1b4ccc Dispatching two events when a message is sent & handled
2019-03-23 15:32:21 +01:00
Ryan Weaver ef077cf26c Fixing a bug where a transport could receive a message and dispatch it to a different bus 2019-03-23 21:29:45 +07:00
Samuel ROZE 521d82a9d2 bug #30658 [Messenger] Ensure an exception is thrown when the AMQP connect() does not work (sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Ensure an exception is thrown when the AMQP connect() does not work

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

This `connectionCredentials` instance escaped the renaming in #30557.

Commits
-------

46b9476b52 Ensure an exception is thrown when the AMQP connect() does not work
2019-03-23 21:22:52 +07:00
Ryan Weaver a7ad1b4ccc Dispatching two events when a message is sent & handled 2019-03-23 10:14:01 -04:00
Samuel ROZE 46b9476b52 Ensure an exception is thrown when the AMQP connect() does not work 2019-03-23 21:09:32 +07:00
Fabien Potencier 6ff11858b1 feature #30557 [Messenger] Worker events + global retry functionality (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Worker events + global retry functionality

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes, on Messenger only
| Deprecations? | no
| Tests pass?   | NEEDED
| Fixed tickets | #29132, #27008, #27215 and part of #30540
| License       | MIT
| Doc PR        | TODO

This is an alternative to #29132 and #27008. There are several big things:

1) The `messenger:consume` does not die if a handler has an error
2) Events are dispatched before, after and on error a message being handled
3) Logic is moved out of Amqp and into the Worker so that we can have some consistent features, like error handling.
4) A generic retry system was added, which works with Amqp and future transports should support.
 It will work out of the box for users. Retrying works by putting the received `Envelope` back into the bus, but with the `ReceivedStamp` removed. The retry functionality has an integration test for AMQP.
5) Added a new `MessageDecodingFailedException` that transport Serializers should throw if `decode()` fails. It allows us to reject a message in this situation, as allowing it to fail but remain on the queue causes it to be retried forever.
6) A new `DelayStamp` was added, which is the first of (later) more stamps for configuring the transport layer (see #30558).

BC breaks are documented in the CHANGELOG.

Thanks!

Commits
-------

a989384999 Adding global retry support, events & more to messenger transport
2019-03-23 14:52:43 +01:00
Ryan Weaver a989384999 Adding global retry support, events & more to messenger transport
Co-authored-by: Samuel ROZE <samuel.roze@gmail.com>
2019-03-23 09:39:27 -04:00
Anthony MARTIN 1ee0a1147a [HttpClient] Add a ScopingHttpClient 2019-03-23 10:56:47 +01:00
Roland Franssen b9ac3a52fb Debug finalized config in debug:config 2019-03-22 20:30:22 +01:00
tdutrion c40017d63c
Allow user to set the project dir
Currently, the project directory is defined by the location of the composer.json file.
That file is not required in production, which therefore breaks the method getProjectDir (who sends back null).
This does not fix the behaviour, but allows the developer to pass the project dir as a parameter.
2019-03-22 19:38:23 +01:00
Fabien Potencier dae5686722 [HttpClient] added CachingHttpClient 2019-03-22 16:52:17 +01:00
Christian Flothmann 2d3f2b7a74 undeprecate the RoleHierarchyInterface
Instead of deprecating the interface it is sufficient to deprecate its
getReachableRoles() method and add a new getReachableRoleNames() method
in Symfony 5.
2019-03-22 16:40:58 +01:00
Grégoire Pineau 59f20ad8fd minor #30551 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore

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

Commits
-------

4d58beb7c8 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore
2019-03-22 16:04:19 +01:00
Grégoire Pineau 9354c8ef45 minor #30643 Make MethodMarkingStore final (vudaltsov)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Make MethodMarkingStore final

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

Made `MethodMarkingStore` final as proposed in https://github.com/symfony/symfony/pull/29146#issuecomment-475574327.

Commits
-------

bbf582bce5 Make MethodMarkingStore final
2019-03-22 15:58:38 +01:00
Grégoire Pineau 4d58beb7c8 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore 2019-03-22 15:53:11 +01:00
Grégoire Pineau 98045b1a90 feature #30468 [Workflow] Added support for many inital places (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Added support for many inital places

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

Commits
-------

1af1bf29ef Added support for many inital places
2019-03-22 15:51:00 +01:00
gpenverne e8b9856ec3 Alias for each assets package 2019-03-22 15:17:13 +01:00
Valentin Udaltsov bbf582bce5 Make MethodMarkingStore final 2019-03-22 16:04:03 +03:00
Serkan Yildiz 28b6dd243e Replace class with new name. 2019-03-22 12:59:39 +01:00
THERAGE Kévin b5b2a2557c Add tests for HttpBrowser 2019-03-22 12:38:01 +01:00
Fabien Potencier dd55845706 [BrowserKit] added support for HttpClient 2019-03-22 12:38:00 +01:00
Fabien Potencier 522594a69d Merge branch '4.2'
* 4.2:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Fix case when multiple loaders are providing paths for the same namespace
  Check if Client exists when test.client does not exist, to provide clearer exception message
  throw TypeErrors to prepare for type hints in 5.0
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Form] Added ResetInterface to CachingFactoryDecorator
  Remove deprecated usage
  [Tests] fixed compatbility of assertEquals(): void
  Fixed usage of TranslatorInterface in form extension (fixes #30591)
  [Intl][4.2] Fix test
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  Fix DebugCommand when chain loader is involved
  [Form] Fixed some phpdocs
2019-03-22 09:16:47 +01:00
Fabien Potencier 7e5dfcff7b Merge branch '3.4' into 4.2
* 3.4:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Check if Client exists when test.client does not exist, to provide clearer exception message
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Tests] fixed compatbility of assertEquals(): void
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  [Form] Fixed some phpdocs
2019-03-22 09:16:34 +01:00
Fabien Potencier 9dad29d61c bug #30640 [Phpunit] fixed support for PHP 5.3 (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Phpunit] fixed support for PHP 5.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| 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

Compat with PHP 5.3 was broken by #30496
<!--
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
-------

606b8af8ec [Phpunit] fixed support for PHP 5.3
2019-03-22 09:15:47 +01:00
Fabien Potencier 606b8af8ec [Phpunit] fixed support for PHP 5.3 2019-03-22 09:11:54 +01:00
Fabien Potencier 0b2a9d56d7 feature #30448 [Finder] Ignore paths from .gitignore #26714 (amaabdou)
This PR was squashed before being merged into the 4.3-dev branch (closes #30448).

Discussion
----------

 [Finder] Ignore paths from .gitignore #26714

| Q             | A
| ------------- | ---
| Branch?       | master for features
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26714
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
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.
-->
Implementation of feature request #26714

Finder::ignoreVCS() is great at ignoring file patterns for the files created by popular VCS systems.

However, it would be great to be able to instruct Finder to actually exclude the paths excluded by .gitignore.

So if we have .gitignore:

vendor/
cache/

Finder::create()
	->files()
    ->ignoreVCS(true) // <--- Ignores `.git`
	->ignoreVCSIgnored(true); // <--- Ignores vendor/ and cache/

Commits
-------

9491393dc2  [Finder] Ignore paths from .gitignore #26714
2019-03-22 08:19:31 +01:00
Ahmed Abdou 9491393dc2 [Finder] Ignore paths from .gitignore #26714 2019-03-22 08:19:24 +01:00
Fabien Potencier 9ee5248731 minor #30633 Response prepare method update for more coherence (DamienVauchel)
This PR was merged into the 3.4 branch.

Discussion
----------

Response prepare method update for more coherence

$headers has been defined to avoid using $this->headers and is used everywhere but not in these lines.

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

Commits
-------

e89c9213e2 Response prepare method update
2019-03-22 07:11:03 +01:00
Fabien Potencier 7e30c971ab fixed CS 2019-03-22 07:07:54 +01:00
ScoobyDam e89c9213e2
Response prepare method update
Response prepare updated for more coherence.
2019-03-21 19:51:37 +01:00
Fabien Potencier 4574f8543c feature #30625 [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface

| 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 commit is directly extracted from #30602 by @fabpot

Commits
-------

b579b023bd [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface
2019-03-21 15:56:27 +01:00
Nicolas Grekas 6fdc1b43f7 minor #30626 [HttpClient] improve MockResponse (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] improve MockResponse

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

While working with `MockHttpClient`, we figured out these would be useful:
 - `MockResponse::getRequestOptions()` to get the options that were used when doing the request
- relax the format of the `raw_headers` info and allow it to be defined as name=>value(s) pairs.

Commits
-------

26f6e28160 [HttpClient] improve MockResponse
2019-03-21 13:41:56 +01:00
Nicolas Grekas 26f6e28160 [HttpClient] improve MockResponse 2019-03-21 13:37:55 +01:00
Kévin Dunglas 2d64e703c2
[Validator][DoctrineBridge][FWBundle] Automatic data validation 2019-03-21 13:05:54 +01:00
Fabien Potencier b579b023bd [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface 2019-03-21 12:53:53 +01:00
Fabien Potencier e1df835816 minor #30618 [Workflow] Added missing license header (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Added missing license header

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

Commits
-------

e78a13f717 [Workflow] Added missing license header
2019-03-20 22:14:09 +01:00
Fabien Potencier af28965c24 fixed encoder in Mime 2019-03-20 21:49:31 +01:00
Fabien Potencier b29686029a bug #30616 Fix case when multiple loaders are providing paths for the same namespace (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix case when multiple loaders are providing paths for the same namespace

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

Fixes @stof https://github.com/symfony/symfony/pull/30440#discussion_r267316027

Let me know if a test case is necessary for this.

Cheers!

Commits
-------

393d7280e5 Fix case when multiple loaders are providing paths for the same namespace
2019-03-20 21:18:35 +01:00
Grégoire Pineau 1af1bf29ef Added support for many inital places 2019-03-20 20:27:53 +01:00