Commit Graph

49287 Commits

Author SHA1 Message Date
Nicolas Grekas 284f6f2b0f Merge branch '5.1'
* 5.1:
  [Messenger] fix typo
2020-06-09 16:24:57 +02:00
Nicolas Grekas 7da0ffd062 Merge branch '5.0' into 5.1
* 5.0:
  [Messenger] fix typo
2020-06-09 16:24:29 +02:00
Nicolas Grekas bd4a238fb2 Merge branch '4.4' into 5.0
* 4.4:
  [Messenger] fix typo
2020-06-09 16:23:46 +02:00
Nicolas Grekas 749380a399 [Messenger] fix typo 2020-06-09 16:23:13 +02:00
Nicolas Grekas 7e6ff0d47e Merge branch '5.1'
* 5.1:
  Correctly use doctrine/dbal v3+
  Correctly use doctrine/dbal v3+
2020-06-09 16:16:45 +02:00
Nicolas Grekas 374e23b967 Merge branch '5.0' into 5.1
* 5.0:
  Correctly use doctrine/dbal v3+
  Correctly use doctrine/dbal v3+
2020-06-09 16:15:34 +02:00
Nicolas Grekas 9bfe5065b7 Merge branch '4.4' into 5.0
* 4.4:
  Correctly use doctrine/dbal v3+
  Correctly use doctrine/dbal v3+
2020-06-09 16:10:15 +02:00
Nicolas Grekas 2ebb63a883 Merge branch '3.4' into 4.4
* 3.4:
  Correctly use doctrine/dbal v3+
2020-06-09 16:07:49 +02:00
Nicolas Grekas 909931d9a4 Correctly use doctrine/dbal v3+ 2020-06-09 16:07:03 +02:00
Nicolas Grekas 4a51827b6d Correctly use doctrine/dbal v3+ 2020-06-09 16:02:17 +02:00
Nicolas Grekas 880142ac40 Merge branch '5.1'
* 5.1:
  [Cache] fix parse error on PHP 5.5
  [Cache] fix compat with doctrine/dbal v3
  [Lock] fix compat with doctrine/dbal v3
2020-06-09 14:11:52 +02:00
Nicolas Grekas d5ff9e7d81 Merge branch '5.0' into 5.1
* 5.0:
  [Cache] fix parse error on PHP 5.5
  [Cache] fix compat with doctrine/dbal v3
  [Lock] fix compat with doctrine/dbal v3
2020-06-09 14:11:32 +02:00
Nicolas Grekas d0a11c7911 Merge branch '4.4' into 5.0
* 4.4:
  [Cache] fix parse error on PHP 5.5
2020-06-09 14:09:45 +02:00
Nicolas Grekas e1050c9373 Merge branch '3.4' into 4.4
* 3.4:
  [Cache] fix parse error on PHP 5.5
2020-06-09 14:08:55 +02:00
Nicolas Grekas ef6fc09260 [Cache] fix parse error on PHP 5.5 2020-06-09 14:06:18 +02:00
Nicolas Grekas e8f4ca1c6d Merge branch '4.4' into 5.0
* 4.4:
  [Cache] fix compat with doctrine/dbal v3
  [Lock] fix compat with doctrine/dbal v3
2020-06-09 13:54:45 +02:00
Nicolas Grekas 1c328c64ad Merge branch '3.4' into 4.4
* 3.4:
  [Cache] fix compat with doctrine/dbal v3
2020-06-09 13:52:05 +02:00
Nicolas Grekas 0f76308929 [Cache] fix compat with doctrine/dbal v3 2020-06-09 13:48:38 +02:00
Nicolas Grekas 7bbbd3dd0d [Lock] fix compat with doctrine/dbal v3 2020-06-09 13:46:03 +02:00
Nicolas Grekas ddcb795484 Merge branch '5.1'
* 5.1:
  minor #37141 [Messenger] fix forward compatibility with Doctrine DBAL 2.11+ (xabbuh)
  fix forward compatibility with Doctrine DBAL 3
  [WebProfilerBundle] Set NullLogger for functional tests
  [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn
  [FrameworkBundle] Fix XSD definition
  Update welcome.html.php
  [FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait
  [travis] add nightly to allowed failures
2020-06-09 13:33:42 +02:00
Nicolas Grekas afefcfd078 Merge branch '5.0' into 5.1
* 5.0:
  minor #37141 [Messenger] fix forward compatibility with Doctrine DBAL 2.11+ (xabbuh)
  fix forward compatibility with Doctrine DBAL 3
  [WebProfilerBundle] Set NullLogger for functional tests
  [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn
  [FrameworkBundle] Fix XSD definition
  Update welcome.html.php
  [travis] add nightly to allowed failures
2020-06-09 13:33:28 +02:00
Nicolas Grekas 19228e6740 Merge branch '4.4' into 5.0
* 4.4:
  minor #37141 [Messenger] fix forward compatibility with Doctrine DBAL 2.11+ (xabbuh)
  fix forward compatibility with Doctrine DBAL 3
  [WebProfilerBundle] Set NullLogger for functional tests
  [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn
  [FrameworkBundle] Fix XSD definition
  Update welcome.html.php
  [travis] add nightly to allowed failures
2020-06-09 13:33:14 +02:00
Fabien Potencier 5a0645974f minor #37141 [Messenger] fix forward compatibility with Doctrine DBAL 2.11+ (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] fix forward compatibility with Doctrine DBAL 2.11+

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

The methods will be deprecated in 2.11 (see doctrine/dbal#4019), but the forward compatibility layer is only present in 3.0 (see doctrine/dbal#4007).

Commits
-------

bca4f9970b fix forward compatibility with Doctrine DBAL 2.11+
2020-06-09 13:31:06 +02:00
Nicolas Grekas ae6894c3ed Merge branch '3.4' into 4.4
* 3.4:
  fix forward compatibility with Doctrine DBAL 3
  [WebProfilerBundle] Set NullLogger for functional tests
  [travis] add nightly to allowed failures
2020-06-09 13:29:11 +02:00
Nicolas Grekas e26d5f217b bug #37169 [Cache] fix forward compatibility with Doctrine DBAL 3 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix forward compatibility with Doctrine DBAL 3

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

Commits
-------

316efef8b8 fix forward compatibility with Doctrine DBAL 3
2020-06-09 13:26:53 +02:00
Fabien Potencier 691b604972 feature #37114 Provides a way to override cache and log folders from the ENV (Plopix)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Provides a way to override cache and log folders from the ENV

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

When using Docker and especially on Mac OS X, performances are terrible when using a "mount" on the host inside the container. (which happens by default)

To optimize the performances, one of the tricks is to change where the application is going to write the cache and the logs.

This PR provides a new env variables `APP_CACHE_DIR` and `APP_LOG_DIR` which can be set to change where will be saved the caches and the logs.

I know we can do it per project BUT:
- I think that is a good addition to Symfony
- it would allow project like eZ Platform and eZ Launchpad to automate that optimization
https://github.com/ezsystems/ezplatform/pull/543

Let me know

Commits
-------

5fa5d36153 Provides a way to override cache and log folders form the ENV
2020-06-09 13:19:08 +02:00
Christian Flothmann 316efef8b8 fix forward compatibility with Doctrine DBAL 3 2020-06-09 13:16:53 +02:00
Nicolas Grekas 911c5d5cbd minor #37164 [WebProfilerBundle] Set NullLogger for functional tests (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Set NullLogger for functional tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/36962
| License       | MIT
| Doc PR        | -

Commits
-------

0b9519975d [WebProfilerBundle] Set NullLogger for functional tests
2020-06-09 11:15:27 +02:00
Fabien Potencier 4d477ec3f0 feature #36736 [FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| 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        | not yet

The configuration allows to set global `sender` and `recipients`, but for the *envelope*.

If you want to set some global headers, it was not possible (a default `from` header for instance, of a `bcc`).

That's implemented in this PR.

Commits
-------

805e9e62c1 [FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration
2020-06-09 10:49:17 +02:00
Fabien Potencier 805e9e62c1 [FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration 2020-06-09 10:31:02 +02:00
Thomas Calvet 0b9519975d [WebProfilerBundle] Set NullLogger for functional tests 2020-06-09 10:25:18 +02:00
Fabien Potencier 9b132bcb87 bug #37159 [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn (atailouloute)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn

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

Commits
-------

c5833fa784 [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn
2020-06-09 10:20:56 +02:00
Ahmed TAILOULOUTE c5833fa784 [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn 2020-06-09 10:20:50 +02:00
Fabien Potencier 017af041f8 minor #37163 [FrameworkBundle] Fix XSD definition (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix XSD definition

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| 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

Commits
-------

38ad0063a0 [FrameworkBundle] Fix XSD definition
2020-06-09 09:58:29 +02:00
Fabien Potencier 38ad0063a0 [FrameworkBundle] Fix XSD definition 2020-06-09 09:39:38 +02:00
Fabien Potencier c459c80561 feature #37136 [HttpClient] added support for pausing responses with a new `pause_handler` callable exposed as an info item (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpClient] added support for pausing responses with a new `pause_handler` callable exposed as an info item

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

This code sample will delay sending the request by 2 seconds:
```php
$response = $client->request('GET', 'https://symfony.com/');
$response->getInfo('pause_handler')(2);
```

Unlike "competing" HTTP clients written in PHP, this one works while streaming a request/response. This means this PR allows implementing delays before retries but it also enables throttling the streams while still maintaining async/multiplexing.

Returning the handler as an info item saves adding a new method and thus plays well with decorators, without requiring a new dedicated interface.

While this can be used directly, the target use case is within an async-decorator, by using [the `AsyncContext::pause()` method](https://github.com/symfony/symfony/pull/36779/files#diff-1d1f61631f4f5e84634e7c3dac6f208cR89).

As a  bonus, this PR improves `NativeHttpClient` by making it able to count the maximum number of open connections *per-host*.

Commits
-------

f3cc7c1bad [HttpClient] added support for pausing responses with a new `pause_handler` callable exposed as an info item
2020-06-09 07:26:44 +02:00
Nicolas Grekas f3cc7c1bad [HttpClient] added support for pausing responses with a new `pause_handler` callable exposed as an info item 2020-06-09 07:26:34 +02:00
Fabien Potencier d75ef185d1 feature #36779 [HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #31885, fix #32367
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/13736

This PR allows processing the stream of chunks.

```php
<?php
$client = new class() implements HttpClientInterface {
    use AsyncDecoratorTrait;

    public function request(string $method, string $url, array $options): ResponseInterface
    {
        return new AsyncResponse($method, $url, $options, static function (ChunkInterface $chunk, AsyncContext $context) {

            // do what you want with chunks, e.g. split them
            // in smaller chunks, group them, skip some, etc.

            yield $chunk;
        });
    }
};
```

Some ideas:
- custom retry/redirect logic
- align chunk boundaries with server-sent events and yield augmented chunks that know about messages (see #36692)
- play some OAuth dance before issuing the real request
- do some live transclusion
- be creative :)

Any custom logic should fit into the `$passthru` filter iterator (the last constructor argument of `AsyncResponse`). There, one has access to an `AsyncContext` DTO, which allows controlling the stream, eg. to replace the current request/response, to change the passthru filter itself, etc.

The surrounding logic will catch badly behaving filters to ease spotting some mistakes (eg. never forwarding an "isLast()" chunk, or yielding extra chunks after an "isLast()" one, etc.)

For the record:
- When the chunk passthru issues many internal requests in order to complete the external one, the info of each internal request is accessible via the `previous_info` entry. I considered merging all internal `response_headers` info under the main one since that's possible, but I'm not sure it's worth the added complexity. Please tell me if you think we should do it.
- A future iteration/PR might add support for time-based events. Right now, implementing a pause in the stream involves calling `usleep()`, but this doesn't play really well with async. Implementing small pauses and summing them up to the target pause might be good enough - we'll need to give it a try to know better.

Commits
-------

766a1c6287 [HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async
2020-06-09 07:11:55 +02:00
Fabien Potencier fbc9f1c294 bug #37154 [FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait

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

Needs https://github.com/symfony/recipes/pull/781

Commits
-------

bf0b48ad87 [FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait
2020-06-09 06:53:37 +02:00
Fabien Potencier 4d6a02a0e1 minor #37131 Update welcome.html.php (ThomasLandauer)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Update welcome.html.php

Added info about `kernel.debug` - see https://github.com/symfony/symfony-docs/pull/13772#issuecomment-640264394 which is a follow-up of https://github.com/symfony/symfony/issues/37129

| Q             | A
| ------------- | ---
| Branch?       | 4.4. No need to change 3.4, since it's already present: https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/HttpKernel/Resources/welcome.html.php#L65
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37129
| License       | MIT
| Doc PR        | not necessary

Commits
-------

53491b9762 Update welcome.html.php
2020-06-08 20:54:18 +02:00
Thomas Landauer 53491b9762 Update welcome.html.php 2020-06-08 20:54:12 +02:00
Fabien Potencier 5a74790bfd Merge branch '5.1'
* 5.1:
  fix forward compatibility with Doctrine DBAL 2.11+
  [SecurityBundle] Fix the session listener registration under the new authentication manager
  allow cursor to be used even when STDIN is not defined
2020-06-08 20:51:17 +02:00
Nicolas Grekas bf0b48ad87 [FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait 2020-06-08 18:13:49 +02:00
Nicolas Grekas 6ee6b2e1b8 [travis] add nightly to allowed failures 2020-06-08 17:48:27 +02:00
Fabien Potencier 0b192490a9 minor #37141 [Messenger] fix forward compatibility with Doctrine DBAL 2.11+ (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] fix forward compatibility with Doctrine DBAL 2.11+

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

The methods will be deprecated in 2.11 (see doctrine/dbal#4019), but the forward compatibility layer is only present in 3.0 (see doctrine/dbal#4007).

Commits
-------

bca4f9970b fix forward compatibility with Doctrine DBAL 2.11+
2020-06-08 12:38:09 +02:00
Christian Flothmann bca4f9970b fix forward compatibility with Doctrine DBAL 2.11+ 2020-06-08 11:16:34 +02:00
Fabien Potencier 9760d37057 bug #37126 [SecurityBundle] Fix the session listener registration under the new authentication manager (johnvandeweghe)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[SecurityBundle] Fix the session listener registration under the new authentication manager

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37119
| License       | MIT
| Doc PR        | N/A

Fixes the logic that adds session listeners for firewalls to properly add them only for statefull firewalls. Adds tests to confirm that it is only added to statefull ones. Also remove unused abstract field on session listener

Commits
-------

936ae9df75 [SecurityBundle] Fix the session listener registration under the new authentication manager
2020-06-08 08:10:18 +02:00
John VanDeWeghe 936ae9df75 [SecurityBundle] Fix the session listener registration under the new authentication manager 2020-06-08 08:10:12 +02:00
Fabien Potencier 72ca171dbb bug #37130 [Console] allow cursor to be used even when STDIN is not defined (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Console] allow cursor to be used even when STDIN is not defined

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37124
| License       | MIT
| Doc PR        |

This allows to use the `Cursor` class introduced in Symfony 5.1 even when the `STDIN` constant is not defined. We did a similar bugfix in the past in the `QuestionHelper` class in #10798.

Commits
-------

aff1ffaeff allow cursor to be used even when STDIN is not defined
2020-06-08 08:06:34 +02:00
Nicolas Grekas 766a1c6287 [HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async 2020-06-08 00:07:07 +02:00