Commit Graph

38312 Commits

Author SHA1 Message Date
Nicolas Grekas
1299336de5 fix tests 2020-01-09 14:25:29 +01:00
Christian Flothmann
f5d407318d expand listener in place 2020-01-09 14:17:05 +01:00
Nicolas Grekas
e7f2a1afaa Merge branch '5.0'
* 5.0:
  fix tests
2020-01-09 13:59:39 +01:00
Nicolas Grekas
85cf2ee0ca Merge branch '4.4' into 5.0
* 4.4:
  fix tests
2020-01-09 13:59:02 +01:00
Nicolas Grekas
29f5b180d9 Merge branch '4.3' into 4.4
* 4.3:
  fix tests
2020-01-09 13:57:53 +01:00
Nicolas Grekas
56877e7186 Merge branch '3.4' into 4.3
* 3.4:
  fix tests
2020-01-09 13:45:17 +01:00
Nicolas Grekas
d24df0d441 fix tests 2020-01-09 13:44:20 +01:00
Nicolas Grekas
9476574453 Merge branch '5.0'
* 5.0:
  fix deps
  Relax transient test
2020-01-09 13:39:32 +01:00
Nicolas Grekas
bf47b7d960 Merge branch '4.4' into 5.0
* 4.4:
  fix deps
  Relax transient test
2020-01-09 13:38:56 +01:00
Nicolas Grekas
f06e5ccb84 Merge branch '4.3' into 4.4
* 4.3:
  fix deps
  Relax transient test
2020-01-09 13:35:03 +01:00
Nicolas Grekas
4ee84b3915 fix deps 2020-01-09 13:29:25 +01:00
Nicolas Grekas
cc2246e916 Merge branch '3.4' into 4.3
* 3.4:
  Relax transient test
2020-01-09 13:15:56 +01:00
Nicolas Grekas
0497fd9d31 Relax transient test 2020-01-09 13:09:28 +01:00
Nicolas Grekas
80cc6bda60 Merge branch '5.0'
* 5.0:
  Added more tests for WebProfilerBundle
2020-01-09 13:01:00 +01:00
Nicolas Grekas
0c6f88e43a Merge branch '4.4' into 5.0
* 4.4:
  Added more tests for WebProfilerBundle
2020-01-09 13:00:51 +01:00
Nicolas Grekas
2a3de1a6d1 Merge branch '4.3' into 4.4
* 4.3:
  Added more tests for WebProfilerBundle
2020-01-09 12:59:40 +01:00
Nicolas Grekas
0c47116813 Merge branch '3.4' into 4.3
* 3.4:
  Added more tests for WebProfilerBundle
2020-01-09 12:56:22 +01:00
Javier Eguiluz
2f7a820edd Added more tests for WebProfilerBundle 2020-01-09 12:43:54 +01:00
Nicolas Grekas
e0c1f4da32 Merge branch '5.0'
* 5.0:
  [String] add test case for wordwrap method
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:56:45 +01:00
Mohamed Gamal
c314598df9 [String] add test case for wordwrap method 2020-01-09 10:55:26 +01:00
Nicolas Grekas
8031b864c3 Merge branch '4.4' into 5.0
* 4.4:
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:53:06 +01:00
Nicolas Grekas
62c4608e17 bug #35269 [HttpKernel][FileLocator] Fix deprecation message (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel][FileLocator] Fix deprecation message

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

Ref https://github.com/symfony/symfony/pull/34886

`$deprecatedPath` is the foreach value so it only works if the last element triggers the deprecation, otherwise the value is wrong.

Commits
-------

18ce8399d2 [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:50:57 +01:00
Nicolas Grekas
e587194d89 Merge branch '4.3' into 4.4
* 4.3:
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:50:08 +01:00
Nicolas Grekas
4228906e96 Merge branch '3.4' into 4.3
* 3.4:
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:48:33 +01:00
Benhssaein Youssef
2be7029b70 [Process] - update @throws phpdoc 2020-01-09 10:39:05 +01:00
Nicolas Grekas
7e3d89983c minor #35274 [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource (plozmun)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PHPUnitBridge] file_get_contents() expects parameter 3 to be resource

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

file_get_contents 3rd parameter (context) expects resource or NULL to ignore them

Commits
-------

a28a42187c [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
2020-01-09 10:21:19 +01:00
Pablo Lozano
a28a42187c [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource 2020-01-09 10:21:13 +01:00
Nicolas Grekas
c3c8e2c806 bug #35254 [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails (mpdude)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails

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

Some commands executed by the `simple-phpunit` script are not checked for success. For example [here](https://travis-ci.org/twigphp/Twig/jobs/634110681), Composer fails with the message

```
  [InvalidArgumentException]
  Could not find package phpunit/phpunit with version 7.5.* in a version inst
  allable using your PHP version 7.0.25.
```

Yet, the `simple-phpunit` script happily continues, going over failing `chdir()`, `file_get_contents()` and `include()` calls and eventually returns a successful `0` exit code. So CI tests look OK when in fact PHPUnit was not even downloaded.

Commits
-------

576e18561f [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:20:23 +01:00
Matthias Pigulla
576e18561f [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails 2020-01-09 10:20:13 +01:00
Pierre du Plessis
1137bdc3f7
Add LoggerAwareInterface to ScopingHttpClient and TraceableHttpClient 2020-01-09 09:41:13 +02:00
Robin Chalas
1443b43e1b feature #34819 [Console] Add SingleCommandApplication to ease creation of Single Command Application (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console] Add SingleCommandApplication to ease creation of Single Command Application

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

---

```php
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\SingleCommandApplication;

(new SingleCommandApplication())
    ->setName('My Super Command') // Optional
    ->setVersion('1.0.0') // Optional
    ->setProcessTitle('my_proc_title') // Optional
    ->addArgument('who', InputArgument::OPTIONAL, 'Who', 'World')  // Optional
    ->setCode(function(InputInterface $input, OutputInterface $output) {
        $output->writeln(sprintf('Hello %s!', $input->getArgument('who')));
    })
    ->run()
;

```

---

Note: I tried this too, and it works as expected:

```php

class MyCommand extends SingleCommandApplication
{
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('hello');

        return 0;
    }
}

new MyCommand();
```

Commits
-------

4af513d449 [Console] Add SingleCommandApplication to ease creation of Single Command Application
2020-01-09 04:02:00 +01:00
Thomas Calvet
18ce8399d2 [HttpKernel][FileLocator] Fix deprecation message 2020-01-08 19:38:10 +01:00
Nicolas Grekas
8acfd3a9d2 Merge branch '5.0'
* 5.0:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [FrameworkBundle] Document the router.cache_class_prefix parameter removal
  [Routing] Fix using a custom matcher & generator dumper class
  [Notifier] Add more specific types at documentation level when php engine can't
  [Serializer] Fix cache in MetadataAwareNameConverter
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [HttpClient] Added missing sprintf
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Messenger] Added check if json_encode succeeded
  [Messenger] Added check if json_encode succeeded
  [FrameworkBundle][ContainerLintCommand] Only skip .errored. services
  [HttpClient] fix exception in case of PSR17 discovery failure
  [DependencyInjection] Handle ServiceClosureArgument for callable in container linting
  fix processing chain adapter based cache pool
  [HttpKernel] release lock explicitly
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
  [Security\Guard] Fix missing typehints
  do not render preferred choices as selected
2020-01-08 18:33:57 +01:00
Nicolas Grekas
d65de0f772 Merge branch '4.4' into 5.0
* 4.4:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [Routing] Fix using a custom matcher & generator dumper class
  [Serializer] Fix cache in MetadataAwareNameConverter
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [HttpClient] Added missing sprintf
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Messenger] Added check if json_encode succeeded
  [Messenger] Added check if json_encode succeeded
  [FrameworkBundle][ContainerLintCommand] Only skip .errored. services
  [HttpClient] fix exception in case of PSR17 discovery failure
  [DependencyInjection] Handle ServiceClosureArgument for callable in container linting
  fix processing chain adapter based cache pool
  [HttpKernel] release lock explicitly
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
  [Security\Guard] Fix missing typehints
  do not render preferred choices as selected
2020-01-08 18:33:29 +01:00
Nicolas Grekas
80cd480254 Merge branch '4.3' into 4.4
* 4.3:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [Routing] Fix using a custom matcher & generator dumper class
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [HttpClient] Added missing sprintf
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Messenger] Added check if json_encode succeeded
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
  [Security\Guard] Fix missing typehints
2020-01-08 18:29:02 +01:00
Nicolas Grekas
9b11c36bd2 bug #35261 [Routing] Fix using a custom matcher & generator dumper class (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] Fix using a custom matcher & generator dumper class

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

This PR fixes a BC break I encountered while upgrading an existing project from 4.2 to 4.4. In this project I use a custom `generator_dumper_class` that is not a `CompiledUrlGeneratorDumper` (it didn't exist yet). I faced 2 problems:
- The generator is considered "compiled" while it is not. This is because we don't check if the `generator_dumper_class` is effectively a `CompiledUrlGeneratorDumper` to compute the `$compiled` variable. That result in a `\TypeError: Return value of Symfony\Component\Routing\Router::getCompiledRoutes() must be of the type array, int returned`
- My custom dumper is not used at all. This is because of https://github.com/symfony/symfony/pull/31964. I altered the condition to fall back only in one way and not the other. The original issue is still fixed (if one uses a classic `UrlGenerator` + a `CompiledUrlGeneratorDumper`, it fall backs on `PhpGeneratorDumper`). However, if one uses a `CompiledUrlGenerator` + a classic `PhpGeneratorDumper` (my case), the classic dumper is still returned. Since `$compiled` is now correctly computed, this case works fine. The Router won't try to get the compiled routes and will use the "old" way.

Commits
-------

3a840a9796 [Routing] Fix using a custom matcher & generator dumper class
2020-01-08 18:23:22 +01:00
Nicolas Grekas
d6381617ac Merge branch '3.4' into 4.3
* 3.4:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
2020-01-08 18:19:22 +01:00
Nicolas Grekas
a4a1f12a00 bug #34643 [Dotenv] Fixed infinite loop with missing quote followed by quoted value (naitsirch)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] Fixed infinite loop with missing quote followed by quoted value

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

If there's a quote missing to end a value and in the next line there's again a quoted value Dotenv will run into an infinite loop. An .env file with the following content will result in this error:
```
FOO="foo
BAR="bar"
```
See #34642 for more details.

Commits
-------

eb69e135b2 [Dotenv] Fixed infinite loop with missing quote followed by quoted value
2020-01-08 18:02:35 +01:00
Nicolas Grekas
fd19bd7816 bug #35239 [Security\Http] Prevent canceled remember-me cookie from being accepted (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security\Http] Prevent canceled remember-me cookie from being accepted

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

`RememberMeServices::autoLogin()` only checks that the cookie exists in `$request->cookies` while `loginFail()` only alter `$request->attributes` (which allows child implementations to read the canceled cookie for e.g. removing a persistent one).
This makes `autoLogin()` checks for `request->attributes` first, which fixes the linked issue.

Failure expected on deps=high build.

Commits
-------

9b711b87fe [Security] Prevent canceled remember-me cookie from being accepted
2020-01-08 18:02:00 +01:00
Nicolas Grekas
2f38a5a6c0 bug #35267 [Debug] fix ClassNotFoundFatalErrorHandler (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix ClassNotFoundFatalErrorHandler

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

Spotted by the CI on 4.4, see https://github.com/symfony/symfony/pull/35266 for details.
Replaces https://github.com/symfony/symfony/pull/35255 /cc @mpdude

Commits
-------

0c320febe1 [Debug] fix ClassNotFoundFatalErrorHandler
2020-01-08 17:40:23 +01:00
Nicolas Grekas
0c320febe1 [Debug] fix ClassNotFoundFatalErrorHandler 2020-01-08 17:36:15 +01:00
Thomas Calvet
add10dfe2c [FrameworkBundle] Document the router.cache_class_prefix parameter removal 2020-01-08 15:54:22 +01:00
Thomas Calvet
3a840a9796 [Routing] Fix using a custom matcher & generator dumper class 2020-01-08 15:00:15 +01:00
Grégoire Pineau
4af513d449 [Console] Add SingleCommandApplication to ease creation of Single Command Application
```
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\SingleCommandApplication;

(new SingleCommandApplication())
    ->setName('My Super Command') // Optional
    ->setVersion('1.0.0') // Optional
    ->setProcessTitle('my_proc_title') // Optional
    ->addArgument('who', InputArgument::OPTIONAL, 'Who', 'World')  // Optional
    ->setCode(function(InputInterface $input, OutputInterface $output): int {
        $output->writeln(sprintf('Hello %s!', $input->getArgument('who')));

        return 0;
    })
    ->run()
;

```
2020-01-08 12:40:31 +01:00
Islam93
b3a2173c8e [DI] deferred exceptions in ResolveParameterPlaceHoldersPass 2020-01-08 14:20:51 +03:00
Philippe Segatori
b9931f571c [Notifier] Add more specific types at documentation level when php engine can't 2020-01-08 10:13:26 +01:00
Loïck Piera
7f2cef759c
Add support for safe preference - RFC8674 2020-01-07 23:59:55 +01:00
Bastien Jaillot
6449f9299c [Serializer] Fix cache in MetadataAwareNameConverter
`isset` is used to test existence of values that is
`null` by default, which result to always bypass the cache
and force to do the calculate all the time.

This is a critical perf improvement in prod mode for an api.

Ref #35085
2020-01-07 23:30:39 +01:00
naitsirch
eb69e135b2 [Dotenv] Fixed infinite loop with missing quote followed by quoted value
If there's a quote missing to end a value and in the next line there's again a quoted value Dotenv will run into an infinite loop. An .env file with the following content will result in this error:
```
FOO="foo
BAR="bar"
```
See #34642 for more details.
2020-01-07 21:29:45 +01:00
Igor Tarasov
08c1481b88
[HttpClient] Added missing sprintf
It was supposed to be there.
2020-01-07 23:22:51 +03:00
Fabien Potencier
20bf17f6ad feature #35104 [Messenger] Log sender alias in SendMessageMiddleware (ruudk)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Log sender alias in SendMessageMiddleware

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

This makes it easier to read which sender alias was used.

```diff
- Sending message Domain\Event\PaymentFlow\PaymentFlowFailedEvent with Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport
+ Sending message Domain\Event\PaymentFlow\PaymentFlowFailedEvent with async sender using Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport
```

Commits
-------

4e6626ca63 Log sender alias in SendMessageMiddleware
2020-01-07 20:50:54 +01:00
Fabien Potencier
e781cd8283 minor #35109 [FrameworkBundle] cache ClassMetadataFactory in debug (bastnic)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] cache ClassMetadataFactory in debug

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no (performance)
| New feature?  | performance...
| Deprecations? | no
| Tickets       | #35096
| License       | MIT
| Doc PR        |

Cf #35096, validator and serialization yaml/xml files are parsed at each requests. But they are already tracked by a `DirectoryResource` in
bd9dc7c573/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (L1246-L1261)

So it only needs a real cache purge on validator / serializer sytem cache, and I use the [CachePoolClearerCacheWarmer](https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Bundle/CacheWarmer/CachePoolClearerCacheWarmer.php) from APIP that already does similar things.

Handling that sort of cache in Symfony fixes a lot of others performance issue.

![image](https://user-images.githubusercontent.com/84887/71452294-e6869480-2783-11ea-9aa8-431db3edfd8d.png)

Commits
-------

53324986cb [FrameworkBundle] cache ClassMetadataFactory in debug
2020-01-07 20:35:07 +01:00
Fabien Potencier
b9cc0c8985 bug #35200 [TwigBridge] do not render preferred choices as selected (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] do not render preferred choices as selected

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35135#issuecomment-570607719
| License       | MIT
| Doc PR        |

Commits
-------

c5b8190424 do not render preferred choices as selected
2020-01-07 20:31:57 +01:00
Fabien Potencier
290ce00f96 bug #35243 [HttpKernel] release lock explicitly (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] release lock explicitly

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

Commits
-------

6fb55812ab [HttpKernel] release lock explicitly
2020-01-07 20:30:23 +01:00
Fabien Potencier
aaf6915661 bug #35193 [TwigBridge] button_widget now has its title attr translated even if its label = null or false (stephen-lewis)
This PR was squashed before being merged into the 3.4 branch (closes #35193).

Discussion
----------

[TwigBridge] button_widget now has its title attr translated even if its label = null or false

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

Duplicate of #34436 but changed to bugfix and applied to 3.4. Buttons with null or false 'label' options will now have their 'title' attribute translated against the current translation domain.

Commits
-------

2a5d9cb75a [TwigBridge] button_widget now has its title attr translated even if its label = null or false
2020-01-07 20:28:14 +01:00
Stephen Lewis
2a5d9cb75a [TwigBridge] button_widget now has its title attr translated even if its label = null or false 2020-01-07 20:28:09 +01:00
Nicolas Grekas
c4c0b84366 bug #35219 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script (oleg-andreyev)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script

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

Locally using [phpenv](https://github.com/phpenv/phpenv) together [phpenv-composer](https://github.com/ngyuki/phpenv-composer) with for managing php versions and composer installations.

`which composer` is detecting wrapper instead of binary.
Before appending PHP executable to composer path need to validate that detected composer is not a wrapper otherwise PHP will simply return the content of a wrapper

Commits
-------

25c805ed56 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
2020-01-07 20:24:08 +01:00
Oleg Andreyev
25c805ed56 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script 2020-01-07 20:24:01 +01:00
Fabien Potencier
47a866bf7b bug #35150 [Messenger] Added check if json_encode succeeded (toooni)
This PR was squashed before being merged into the 4.3 branch (closes #35150).

Discussion
----------

[Messenger] Added check if json_encode succeeded

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

Similar PR as https://github.com/symfony/symfony/pull/35137 but for branch 4.3.

When trying to add a message to redis transport which can not be encoded with `json_encode` there is now a `TransportException` containing the `json_last_error_msg` as the message.
I had an issue where I tried to send an email through messenger by symfony mailer which contains a pdf attachment. Instead of an error while sending i got an error `Encoded envelope should have at least a "body"` which happened because the encoded message was `false`.

This is not exactly a bugfix, but IMO also not a feature worth being mentioned in the changelog so I am not sure I've filled out the Q/A correctly.

Commits
-------

c2bdc4c4d3 [Messenger] Added check if json_encode succeeded
2020-01-07 20:21:24 +01:00
Toni Rudolf
c2bdc4c4d3 [Messenger] Added check if json_encode succeeded 2020-01-07 20:21:19 +01:00
Toni Rudolf
a16a574ca8 [Messenger] Added check if json_encode succeeded 2020-01-07 20:20:25 +01:00
Fabien Potencier
9e7a4102ad bug #35245 [HttpClient] fix exception in case of PSR17 discovery failure (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix exception in case of PSR17 discovery failure

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

On symfony.com, we need to use HTTPlug for 3rd party libs. When `nyholm/psr7` is not installed, we currently see an exception saying `No HTTPlug clients found.` from `HttpClientDiscovery`.

This fixes the message by correctly suggesting `nyholm/psr7` instead, since there *is* an HTTPlug client: `HttplugClient` from our HttpClient component.

It's quite unfortunate that `guzzle/psr7` provides no PSR17 factory yet, because that would have solved some part of this deps mess. /cc @Nyholm @sagikazarmark FYI
Note that https://packagist.org/providers/psr/http-factory-implementation lists `guzzle/psr7` but this is a wrong solution: no tagged release of it is PSR17-compatible, which means installing it doesn't solve the issue.

Commits
-------

96e70a4080 [HttpClient] fix exception in case of PSR17 discovery failure
2020-01-07 20:17:11 +01:00
Fabien Potencier
ada4c56a91 bug #35244 [Cache] fix processing chain adapter based cache pool (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix processing chain adapter based cache pool

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

Commits
-------

8d7fa32d15 fix processing chain adapter based cache pool
2020-01-07 20:15:45 +01:00
Fabien Potencier
c29b2a11d4 feature #35205 [Form] derive the view timezone from the model timezone (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] derive the view timezone from the model timezone

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

Commits
-------

ef5835d833 derive the view timezone from the model timezone
2020-01-07 20:12:15 +01:00
Fabien Potencier
de34f229a9 minor #35213 [Security\Guard] Fix missing typehints (chalasr)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security\Guard] Fix missing typehints

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

Commits
-------

2ef8771ad7 [Security\Guard] Fix missing typehints
2020-01-07 20:10:35 +01:00
Mohamed Gamal
3e0c98836e [String] add test case for unwrap method 2020-01-07 20:08:50 +01:00
Thomas Calvet
d38cdc9dce [FrameworkBundle][ContainerLintCommand] Only skip .errored. services 2020-01-07 17:40:07 +01:00
Nicolas Grekas
96e70a4080 [HttpClient] fix exception in case of PSR17 discovery failure 2020-01-07 13:55:38 +01:00
Nicolas Grekas
ffd5d12045 bug #35225 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting (shieldo)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Handle ServiceClosureArgument for callable in container linting

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (+)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | (none)
| License       | MIT

Making use of `ServiceClosureArgument` instances in service definitions was not accounted for in container linting when a service type-hints for `callable` in an argument - adding this check ensures that `ServiceClosureArgument` instances are recognised correctly as callables (once they are resolved).

Commits
-------

e48829e9b6 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting
2020-01-07 11:57:32 +01:00
Douglas Greenshields
e48829e9b6 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting 2020-01-07 11:57:22 +01:00
Christian Flothmann
8d7fa32d15 fix processing chain adapter based cache pool 2020-01-07 11:39:48 +01:00
Nicolas Grekas
6fb55812ab [HttpKernel] release lock explicitly 2020-01-07 11:19:31 +01:00
Robin Chalas
9b711b87fe [Security] Prevent canceled remember-me cookie from being accepted 2020-01-06 22:59:17 +01:00
Nicolas Grekas
b1bee60119 Merge branch '5.0'
* 5.0:
  Fix closing tag in mailer collector template
  [Notifier] Fix two minor issues
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 14:05:24 +01:00
Nicolas Grekas
8c9e27834d Merge branch '4.4' into 5.0
* 4.4:
  Fix closing tag in mailer collector template
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 14:04:40 +01:00
Nicolas Grekas
b9a0b33540 minor #35221 [WebProfilerBundle] Fix closing tag in mailer collector template (norkunas)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Fix closing tag in mailer collector template

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| 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.
-->

Commits
-------

c2d2e5a61d Fix closing tag in mailer collector template
2020-01-06 14:00:05 +01:00
Nicolas Grekas
fb2d2577d9 Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 13:57:54 +01:00
Nicolas Grekas
f9b36c754d bug #35223 [HttpClient] Don't read from the network faster than the CPU can deal with (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't read from the network faster than the CPU can deal with

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

Something I spotted while working on #35115: both the curl and native clients don't play well with heavily compressed HTTP streams: they decompress faster than userland can process chunks.

The attached patch moves the decompression logic to the chunk generator. This means internally we only deal with raw compressed chunks, and they are decompressed only when passing the value to userland.

Commits
-------

ac3d77a76a [HttpClient] Don't read from the network faster than the CPU can deal with
2020-01-06 13:56:11 +01:00
Thomas Calvet
87212e41b3 [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr 2020-01-06 12:26:45 +01:00
Tomas
c2d2e5a61d Fix closing tag in mailer collector template 2020-01-06 13:23:58 +02:00
Thomas Calvet
4f80d4d639 [Notifier] Fix two minor issues 2020-01-06 11:24:48 +01:00
Nicolas Grekas
ac3d77a76a [HttpClient] Don't read from the network faster than the CPU can deal with 2020-01-06 10:53:56 +01:00
Maciej Malarz
99dab87ada [DI] DecoratorServicePass should keep container.service_locator on the decorated definition 2020-01-04 20:22:46 +01:00
Robin Chalas
2ef8771ad7 [Security\Guard] Fix missing typehints 2020-01-04 19:57:41 +01:00
Chris Tanaskoski
e2c2397f1e [HttpClient] In StreamWrapper::createResource use the more efficient Response::toStream method if safe and available 2020-01-04 15:45:34 +01:00
Nicolas Grekas
e9f0cfe9db Merge branch '5.0'
* 5.0: (31 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [FrameworkBundle] Fix getUser() phpdoc in AbstractController
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  ...
2020-01-04 15:20:45 +01:00
Nicolas Grekas
905db59b3a minor #35186 [FrameworkBundle] Fix getUser() phpdoc in AbstractController (natewiebe13)
This PR was merged into the 5.0 branch.

Discussion
----------

[FrameworkBundle] Fix getUser() phpdoc in AbstractController

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

This imports the `Symfony\Component\Security\Core\User\UserInterface` as the docs state that it returns `UserInterface` but doesn't use a FQN or import the class. This makes `getUser()` appear to return `Symfony\Bundle\FrameworkBundle\Controller\UserInterface`

Commits
-------

bba9fd6ccf [FrameworkBundle] Fix getUser() phpdoc in AbstractController
2020-01-04 15:13:44 +01:00
Nicolas Grekas
f673cdc6e2 minor #35158 Update year in license files (rosier)
This PR was merged into the 5.0 branch.

Discussion
----------

Update year in license files

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

Happy new year Notifier and String

Commits
-------

ef4426ae87 Update year in license files
2020-01-04 15:09:07 +01:00
Nicolas Grekas
581b439931 Merge branch '4.4' into 5.0
* 4.4: (26 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  fix version when "anonymous: lazy" was introduced
  ...
2020-01-04 15:08:26 +01:00
Nicolas Grekas
9d4c98ee17 bug #35209 [HttpClient] fix support for non-blocking resource streams (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix support for non-blocking resource streams

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

Commits
-------

c651f63813 [HttpClient] fix support for non-blocking resource streams
2020-01-04 15:05:21 +01:00
Nicolas Grekas
75c24bbdde Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
2020-01-04 15:04:37 +01:00
Nicolas Grekas
ccfc4b67b3 bug #35210 [HttpClient] NativeHttpClient should not send >1.1 protocol version (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] NativeHttpClient should not send >1.1 protocol version

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

Commits
-------

8b61c95685 [HttpClient] NativeHttpClient should not send >1.1 protocol version
2020-01-04 15:04:26 +01:00
Nicolas Grekas
8b61c95685 [HttpClient] NativeHttpClient should not send >1.1 protocol version 2020-01-04 15:00:37 +01:00
Nicolas Grekas
c651f63813 [HttpClient] fix support for non-blocking resource streams 2020-01-04 14:51:57 +01:00
Nicolas Grekas
ee5e64413e minor #35153 [SecurityBundle] fix version when "anonymous: lazy" was introduced (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] fix version when "anonymous: lazy" was introduced

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

Commits
-------

c280a01724 fix version when "anonymous: lazy" was introduced
2020-01-04 14:12:34 +01:00
Nyholm
43c1e77a88 [Mailer] Make sure you can pass custom headers to Mailgun 2020-01-04 14:10:16 +01:00
Nicolas Grekas
6f6976a192 minor #35157 Update year in license files (rosier)
This PR was merged into the 4.4 branch.

Discussion
----------

Update year in license files

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

Happy new year ErrorHandler

Commits
-------

500a075673 Update year in license files
2020-01-04 14:07:55 +01:00
Nicolas Grekas
c000577edb Merge branch '4.3' into 4.4
* 4.3:
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  [HttpClient] fix typo
  [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
  [Routing] Fix i18n routing when the url contains the locale
  Fix BC issue in phpDoc Reflection library
  [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2020-01-04 14:00:46 +01:00
Nicolas Grekas
eb5171f059 bug #33672 [Mailer] Remove line breaks in email attachment content (Stuart Fyfe)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[Mailer] Remove line breaks in email attachment content

Line breaks are not allowed in attachment content when sending over the
API.

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33671, Closes #32645
| License       | MIT
| Doc PR        |

This is a fix for #33671. Send grid's API throws a 400 error when sending email attachments with default base64 encoding.
Removing the line breaks resolves this issue.

Commits
-------

a28a7f9dee [Mailer] Remove line breaks in email attachment content
2020-01-04 13:46:16 +01:00
Stuart Fyfe
a28a7f9dee [Mailer] Remove line breaks in email attachment content 2020-01-04 13:45:40 +01:00
Nicolas Grekas
423d3ddf05 bug #35101 [Routing] Fix i18n routing when the url contains the locale (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] Fix i18n routing when the url contains the locale

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

This PR fixes different scenarios with i18n routing.

Commits
-------

cd40bb8604 [Routing] Fix i18n routing when the url contains the locale
2020-01-04 13:43:28 +01:00
Nicolas Grekas
cbf2abdece bug #35124 [TwigBridge][Form] Added missing help messages in form themes (cmen)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBridge][Form] Added missing help messages in form themes

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

Results:
![b3](https://user-images.githubusercontent.com/8505069/71522117-a9292080-28c3-11ea-86cd-0f257d50267d.png)

![b3h](https://user-images.githubusercontent.com/8505069/71522118-acbca780-28c3-11ea-95d7-9931442160dd.png)

![b4](https://user-images.githubusercontent.com/8505069/71522119-af1f0180-28c3-11ea-8559-02f69efcd2ef.png)

![b4h](https://user-images.githubusercontent.com/8505069/71522121-b219f200-28c3-11ea-86d7-abd192ed33ad.png)

![f](https://user-images.githubusercontent.com/8505069/71522126-b5ad7900-28c3-11ea-8300-3b52258da84b.png)

Commits
-------

5374d4f210 [TwigBridge][Form] Added missing help messages in form themes
2020-01-04 13:39:07 +01:00
Nicolas Grekas
6b2f4e6126 bug #35195 [HttpClient] fix casting responses to PHP streams (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix casting responses to PHP streams

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

This patch is required to properly deal with casting responses to PHP streams.
This changes a public method, but we can't expect anyone to override it as it's totally internal.
Found when working on (and required by) #35115

Commits
-------

35c08ef395 [HttpClient] fix casting responses to PHP streams
2020-01-04 13:29:59 +01:00
Nicolas Grekas
cf83c608d3 bug #35168 [HttpClient] fix capturing SSL certificates with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix capturing SSL certificates with NativeHttpClient

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

Commits
-------

234589a753 [HttpClient] fix capturing SSL certificates with NativeHttpClient
2020-01-04 13:28:10 +01:00
Nicolas Grekas
d394214b72 minor #35155 Update year in license files (rosier)
This PR was merged into the 4.3 branch.

Discussion
----------

Update year in license files

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

Happy new year new components ;-)

Commits
-------

0d7a8bdd0a Update year in license files
2020-01-04 13:25:35 +01:00
Nicolas Grekas
a56c3ef85c Merge branch '3.4' into 4.3
* 3.4:
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  Update year in license files
  [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
  Fix BC issue in phpDoc Reflection library
  [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2020-01-04 13:24:57 +01:00
Shaharia Azam
5cac29571b Update links to documentation 2020-01-04 13:05:51 +01:00
Nicolas Grekas
28e502ec49 bug #35134 [PropertyInfo] Fix BC issue in phpDoc Reflection library (jaapio)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] Fix BC issue in phpDoc Reflection library

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35077
| License       | MIT

The used phpDocumentor library DocBlockReflection contained a BC break
that broke this component. The patch was applied in the recently released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be caught.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more popular generics notation for arrays.

This PR might need some tests but the current test cases are not very clear to me. Instead of patching the code we could also try to ban the broken versions of the used phpdoc libraries, but that would require much more testing, and doesn't really add any value. Especially because the DocBlockReflection and TypeResolver are used by over half a million projects. It would raise more questions than just patching the behavior of the PropertyInfo component.

We are sorry that this issue slipt through our QA pipeline. The linked issue already showed that the issue is now fixed by just doing a `composer update` but it is not very convenient to leave this known issue in symfony.

Commits
-------

bad07ec557 Fix BC issue in phpDoc Reflection library
2020-01-04 13:01:51 +01:00
Ahmed Raafat
da117714fd [Validator] Add the missing translations for the Arabic (ar) locale 2020-01-04 13:00:45 +01:00
Nicolas Grekas
9392f76519 minor #35207 [Form] ensure to expect no validation for the right reasons (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] ensure to expect no validation for the right reasons

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

Commits
-------

8d46f95f4c ensure to expect no validation for the right reasons
2020-01-04 12:55:48 +01:00
Nicolas Grekas
51d8070960 minor #35154 Update year in license files (rosier)
This PR was merged into the 3.4 branch.

Discussion
----------

Update year in license files

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

Happy new year to everyone

Commits
-------

889a110e74 Update year in license files
2020-01-04 12:53:32 +01:00
Christian Flothmann
8d46f95f4c ensure to expect no validation for the right reasons 2020-01-04 10:13:45 +01:00
Christian Flothmann
ef5835d833 derive the view timezone from the model timezone 2020-01-04 09:47:43 +01:00
Jesse Rushlow
555189ae2c
[Security-Guard] fixed 35203 missing name tag in param docblock
Added missing $credentials name tag to @param for getPassword()
to resolve PHPStan error and comply with the docBlock spec.
2020-01-03 18:06:56 -05:00
Christian Flothmann
c5b8190424 do not render preferred choices as selected 2020-01-03 19:24:56 +01:00
Nicolas Grekas
35c08ef395 [HttpClient] fix casting responses to PHP streams 2020-01-03 19:18:19 +01:00
Thomas Calvet
dba1804f5d [PhpUnitBridge] Add test case for @expectedDeprecation annotation 2020-01-03 12:33:57 +01:00
Thomas Calvet
50ba566c0b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack 2020-01-03 11:53:28 +01:00
Nate Wiebe
bba9fd6ccf [FrameworkBundle] Fix getUser() phpdoc in AbstractController 2020-01-03 00:46:11 -05:00
Guillaume Verstraete
36eeba7a3a [Mailer] Fix addresses management in Sendgrid API payload 2020-01-03 02:28:31 +01:00
Fabien Potencier
e348513157 bug #35173 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API (vilius-g)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API

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

Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.

This also adds previously missing attachment names.

Commits
-------

7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
2020-01-02 19:35:45 +01:00
Vilius Grigaliūnas
7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.
2020-01-02 17:40:32 +02:00
Vilius Grigaliūnas
9e12a6dcda [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
This fixes the same problem as https://github.com/symfony/symfony/commit/6dbac13a07c23f321b04489b6a9773 but for HTTP transport.
2020-01-02 17:01:57 +02:00
Thomas Calvet
93aa5bcd0a [FrameworkBundle][ContainerLintCommand] Style messages 2020-01-02 12:33:20 +01:00
Thomas Calvet
4f642ad624 [DependencyInjection][PhpDumper] Dump root namespace array_key_exists 2020-01-02 11:48:57 +01:00
Nicolas Grekas
234589a753 [HttpClient] fix capturing SSL certificates with NativeHttpClient 2020-01-02 11:45:17 +01:00
Jan Rosier
ef4426ae87 Update year in license files 2020-01-01 15:53:07 +01:00
Jan Rosier
500a075673 Update year in license files 2020-01-01 15:47:03 +01:00
Christophe Meneses
5374d4f210 [TwigBridge][Form] Added missing help messages in form themes 2020-01-01 13:53:32 +01:00
Jan Rosier
0d7a8bdd0a Update year in license files 2020-01-01 12:51:43 +01:00
Jan Rosier
889a110e74 Update year in license files 2020-01-01 12:03:25 +01:00
Christian Flothmann
c280a01724 fix version when "anonymous: lazy" was introduced 2020-01-01 10:41:58 +01:00
Nicolas Grekas
8e9aafc84f bug #35125 [Translator] fix performance issue in MessageCatalogue and catalogue operations (ArtemBrovko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] fix performance issue in MessageCatalogue and catalogue operations

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

In our project we use lots of catalogue operations during importing of translations to our system and we ran into performance issue. Code profiler showed lots or `array_replace` calls in  [MessageCatalogue::add](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L128) method. This method is actually called by [MessageCatalogue::set](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L70), which is quite an overkill, because `MessageCatalogue::set` is meant to set only one translation at a time. Method was reworked. `MergeOperation` and `TargetOperation` was reworked as well to use this improved `MessageCatalogue::set` method instead of constructing array with only one translation and passing it to `MessageCatalogue::add` method.

Table shows execution time before and after

|  | Time in seconds (avg. of 10 executions)
----------- | ------
Before | 50
After | 8

Looks like 4.* and 5.* versions can also be improved by the same changes.
<!--
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
-------

5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2019-12-31 15:31:48 +01:00
Nicolas Grekas
f35935f050 minor #35133 [DebugBundle] Drop RemoveWebServerBundleLoggerPass (chalasr)
This PR was merged into the 5.0 branch.

Discussion
----------

[DebugBundle] Drop RemoveWebServerBundleLoggerPass

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| 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.
-->

Commits
-------

167411c194 [DebugBundle] Drop RemoveWebServerBundleLoggerPass
2019-12-31 15:30:00 +01:00
Nicolas Grekas
3db9090e73 minor #35149 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5 (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5

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

Commits
-------

4c790b0589 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5
2019-12-31 15:23:48 +01:00
Emanuele Panzeri
879ba76a6a Fix Nexmo notifier bridge namespace 2019-12-31 15:16:53 +01:00
Nicolas Grekas
4c790b0589 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5 2019-12-30 18:22:15 +01:00
Nicolas Grekas
3a25878e98 [HttpClient] fix typo 2019-12-30 18:19:47 +01:00
Thomas Calvet
f0d227db2f [Console][FormatterHelper] Use helper strlen statically and remove duplicated code 2019-12-29 18:51:53 +01:00
Thomas Calvet
cd40bb8604 [Routing] Fix i18n routing when the url contains the locale 2019-12-29 11:48:40 +01:00
Jaapio
bad07ec557
Fix BC issue in phpDoc Reflection library
The used phpDocumentor library DocBlockReflection contained an BC break
that broke this component. The patch was applied in the recent released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more populair generics notation for arrays.
2019-12-28 22:02:19 +01:00
Robin Chalas
167411c194 [DebugBundle] Drop RemoveWebServerBundleLoggerPass 2019-12-28 20:04:16 +01:00
Robin Chalas
86afefed3b [DebugBundle] Make RemoveWebServerBundleLoggerPass internal 2019-12-28 19:58:08 +01:00
Nicolas Grekas
aa9ccf8825 Merge branch '5.0'
* 5.0:
  [DI] fix merge
2019-12-28 16:31:23 +01:00
Nicolas Grekas
291d1f3a84 [DI] fix merge 2019-12-28 16:31:08 +01:00
Nicolas Grekas
392d0b01f3 Merge branch '5.0'
* 5.0: (24 commits)
  Removing unused variable
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  Add supported schemes doc blocks type
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
  [String][UnicodeString] Remove unneeded flag in chunk regex pattern
  add note about HTTP status code change
  Migrate server:log command away from WebServerBundle
  [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
  [Security] Fix missing defaults for auto-migrating encoders
  bumped Symfony version to 5.0.3
  updated VERSION for 5.0.2
  ...
2019-12-28 16:12:20 +01:00
Alireza Mirsepassi
12d3aa80ec Removing unused variable 2019-12-28 16:11:31 +01:00
Nicolas Grekas
725da2f218 Merge branch '4.4' into 5.0
* 4.4:
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
  add note about HTTP status code change
  Migrate server:log command away from WebServerBundle
  [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
  [Security] Fix missing defaults for auto-migrating encoders
  bumped Symfony version to 4.4.3
  updated VERSION for 4.4.2
  updated CHANGELOG for 4.4.2
2019-12-28 16:09:49 +01:00
Nicolas Grekas
47f7cdc848 Merge branch '4.3' into 4.4
* 4.3:
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 16:00:14 +01:00
Artem Brovko
5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations. 2019-12-28 16:59:49 +02:00