Commit Graph

43982 Commits

Author SHA1 Message Date
Nicolas Grekas
e23fd9ed0c bug #34632 [Console] Fix trying to access array offset on value of type int (Tavafi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix trying to access array offset on value of type int

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

PHP 7.4 throws an error exception when you are trying to access an array by an integer key.
I got this error while I was running a console command:

```
ErrorException: Trying to access array offset on value of type int
at /my/project/vendor/symfony/console/Input/ArrayInput.php:110

Exception trace:
/my/project/vendor/symfony/console/Input/ArrayInput.php:110
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/my/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:179
/my/project/vendor/symfony/console/Command/Command.php:255
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:166
/my/project/vendor/symfony/console/Application.php:934
/my/project/vendor/symfony/console/Application.php:273
/my/project/vendor/symfony/console/Application.php:149
/my/project/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
/my/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
/my/project/artisan:37

```

Commits
-------

069d214210 [Console] Fix trying to access array offset on value of type int
2019-11-28 10:15:15 +01:00
Ali Tavafi
069d214210 [Console] Fix trying to access array offset on value of type int 2019-11-28 10:13:48 +01:00
David Buchmann
c6ed0f0208 more robust initialization from request
Request::getPort is declared as int|string but can actually return null.
2019-11-28 09:59:10 +01:00
Nicolas Grekas
3c3c8bfb9b minor #34663 [Config] Remove extra sprintf arg (ogizanagi)
This PR was merged into the 4.3 branch.

Discussion
----------

[Config] Remove extra sprintf arg

| Q             | A
| ------------- | ---
| Branch?       | 5.0 <!-- see below -->
| Bug fix?      | no
| 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

there is only one placeholder here

(code in previous branches is commented out for 5.0)

Commits
-------

9f19ae185d [Config] Remove extra sprintf arg
2019-11-28 09:36:08 +01:00
Maxime Steinhausser
9f19ae185d [Config] Remove extra sprintf arg 2019-11-28 09:31:09 +01:00
Nicolas Grekas
396da3726b bug #34669 [HttpClient] turn exception into log when the request has no content-type (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] turn exception into log when the request has no content-type

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

Spotted while merging a PR with ext-curl disabled:

```
  [Symfony\Component\HttpClient\Exception\TransportException]
  fopen(): Content-type not specified assuming application/x-www-form-urlencoded
```

This is now a log.

Commits
-------

4c671a4487 [HttpClient] turn exception into log when the request has no content-type
2019-11-28 09:02:16 +01:00
Nicolas Grekas
3f13e8e44c bug #34636 [VarDumper] notice on potential undefined index (sylvainmetayer)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[VarDumper] notice on potential undefined index

Fix the following issue that can happen (Drupal 8 project for context, with the [Twig vardumper](https://www.drupal.org/project/twig_vardumper) module) :

```
Notice: Undefined index: file in Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider->getContext() (line 55 of /var/www/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php).
```

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

Commits
-------

d4c34e00ac [VarDumper] notice on potential undefined index
2019-11-28 08:25:46 +01:00
Sylvain METAYER
d4c34e00ac [VarDumper] notice on potential undefined index 2019-11-28 08:25:37 +01:00
Nicolas Grekas
4c671a4487 [HttpClient] turn exception into log when the request has no content-type 2019-11-27 23:48:43 +01:00
Nicolas Grekas
5cacc5dd69 minor #34608 [Process] add tests for php executable finder if file does not exist (ahmedash95)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead.

Discussion
----------

[Process] add tests for php executable finder if file does not exist

| Q             | A
| ------------- | ---
| Branch?       | master?
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        |

regarding Process component, I just noticed there is no test covers the case when the PHP binary is not valid so I added the test to make sure it works as expected also it increases the coverage of the process component

Commits
-------

2b62dc3fc5 [Process] add tests for php executable finder if file does not exist
2019-11-27 23:47:03 +01:00
Ahmed
2b62dc3fc5 [Process] add tests for php executable finder if file does not exist 2019-11-27 23:46:56 +01:00
Nicolas Grekas
f0a6de2736 bug #34668 [Cache] Make sure we get the correct number of values from redis::mget() (thePanz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Make sure we get the correct number of values from redis::mget()

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

Redis might not be reachable when invoking `redis->mget($ids)`, the call returns `false` instead of an array.
This change makes sure the return value is properly check, including the correctness of the parameters to invoke  `array_combine($ids, $cacheValues);`.
From the documentation:
> Returns the combined array, FALSE if the number of elements for each array isn't equal.

Commits
-------

685c36c3d2 [Cache] Make sure we get the correct number of values from redis::mget()
2019-11-27 19:58:25 +01:00
Emanuele Panzeri
685c36c3d2 [Cache] Make sure we get the correct number of values from redis::mget() 2019-11-27 19:56:02 +01:00
Fabien Potencier
74cfa364c0 minor #34616 [FWBundle] Remove unused parameter (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[FWBundle] Remove unused parameter

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

22a7f40cb8 [FWBundle] Remove unused parameter
2019-11-26 04:46:36 +01:00
Fabien Potencier
877376a8b3 minor #34603 [Intl] [Workflow] fixes English grammar typos (hhamon)
This PR was merged into the 4.3 branch.

Discussion
----------

[Intl] [Workflow] fixes English grammar typos

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

Also related to #34604

Commits
-------

492e1b5afd [Intl] [Workflow] fixes English grammar typos
2019-11-26 04:45:55 +01:00
Fabien Potencier
4daa83e8fc Merge branch '3.4' into 4.3
* 3.4:
  [Filesystem] [Serializer] fixes English grammar typo
  [Monolog Bridge] Fixed accessing static property as non static.
  Improve Symfony description
  [Validator] Add Japanese translation
  Remove some unused methods parameters
  Avoid empty \"If-Modified-Since\" header in validation request
  [Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls
2019-11-26 04:44:44 +01:00
Fabien Potencier
ed101fb75f minor #34604 [Filesystem] [Serializer] fixes English grammar typo (hhamon)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] [Serializer] fixes English grammar typo

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

Commits
-------

7524ac2866 [Filesystem] [Serializer] fixes English grammar typo
2019-11-26 04:40:51 +01:00
Kévin Dunglas
22a7f40cb8
[FWBundle] Remove unused parameter 2019-11-25 23:12:50 +01:00
Hugo Hamon
492e1b5afd [Intl] [Workflow] fixes English grammar typos 2019-11-25 17:40:38 +01:00
Hugo Hamon
7524ac2866 [Filesystem] [Serializer] fixes English grammar typo 2019-11-25 17:36:22 +01:00
Grégoire Pineau
cc400f867e bug #34569 [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method

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

Commits
-------

2ff3496d62 [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method
2019-11-25 15:05:10 +01:00
Fabien Potencier
2beeea93da minor #34575 [Messenger] Adding exception to amqp transport in case amqp ext is not installed (chr-hertel)
This PR was squashed before being merged into the 4.3 branch (closes #34575).

Discussion
----------

[Messenger] Adding exception to amqp transport in case amqp ext is not installed

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

While setting up a new dev environment with symfony messenger and rabbitmq i got this error message:

<img width="725" alt="Bildschirmfoto 2019-11-24 um 18 56 23" src="https://user-images.githubusercontent.com/2852185/69499113-26412e80-0eef-11ea-9e40-11528db2afee.png">

i think it would be great to give an explicit pointer in this case.

but not sure though if the place where i added the exception is the right spot or if we should even add a suggest in `composer.json` of the component

new:
<img width="1247" alt="Bildschirmfoto 2019-11-24 um 19 45 08" src="https://user-images.githubusercontent.com/2852185/69499569-b08b9180-0ef3-11ea-9ceb-3936dbd39cb7.png">

Commits
-------

f15e0e6a43 [Messenger] Adding exception to amqp transport in case amqp ext is not installed
2019-11-25 07:26:49 +01:00
Christopher Hertel
f15e0e6a43 [Messenger] Adding exception to amqp transport in case amqp ext is not installed 2019-11-25 07:26:43 +01:00
Fabien Potencier
3bd5faeaf6 bug #34533 [Monolog Bridge] Fixed accessing static property as non static. (Sander-Toonen)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #34533).

Discussion
----------

[Monolog Bridge] Fixed accessing static property as non static.

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

Commits
-------

aa045d10b9 [Monolog Bridge] Fixed accessing static property as non static.
2019-11-24 19:38:49 +01:00
Sander Toonen
aa045d10b9 [Monolog Bridge] Fixed accessing static property as non static. 2019-11-24 19:38:42 +01:00
Fabien Potencier
0bd02bc743 minor #34459 Improve Symfony description (noniagriconomie)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #34459).

Discussion
----------

Improve Symfony description

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

According to https://symfony.com/stats/downloads :)

Commits
-------

465f092aeb Improve Symfony description
2019-11-24 19:17:52 +01:00
Antoine Makdessi
465f092aeb Improve Symfony description
According to https://symfony.com/stats/downloads :)
2019-11-24 19:17:45 +01:00
Fabien Potencier
e50d80870e bug #34546 [Serializer] Add DateTimeZoneNormalizer into Dependency Injection (jewome62)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead (closes #34546).

Discussion
----------

[Serializer] Add DateTimeZoneNormalizer into Dependency Injection

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

https://github.com/symfony/symfony/pull/30915
I have forgot to add new Normalizer into DI 🤭

#SymfonyHackday

Commits
-------

1a81dd7de8 Add DateTimeZoneNormalizer into Dependency Injection
2019-11-24 19:02:19 +01:00
jewome62
1a81dd7de8 Add DateTimeZoneNormalizer into Dependency Injection 2019-11-24 19:02:12 +01:00
Fabien Potencier
08489ce99f bug #34547 [Messenger] Error when specified default bus is not among the configured (vudaltsov)
This PR was squashed before being merged into the 4.3 branch (closes #34547).

Discussion
----------

[Messenger] Error when specified default bus is not among the configured

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

This is a bug fix because the error occurs during the di compilation anyway.

Commits
-------

dd92d2bb10 [Messenger] Error when specified default bus is not among the configured
2019-11-24 18:55:19 +01:00
Valentin Udaltsov
dd92d2bb10 [Messenger] Error when specified default bus is not among the configured 2019-11-24 18:55:09 +01:00
Fabien Potencier
5066516e07 minor #34564 [Validator] Add Japanese translation (issei-m)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #34564).

Discussion
----------

[Validator] Add Japanese translation

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

Commits
-------

6cea35a108 [Validator] Add Japanese translation
2019-11-24 18:47:30 +01:00
Issei.M
6cea35a108 [Validator] Add Japanese translation 2019-11-24 18:47:24 +01:00
Fabien Potencier
df6c635df2 minor #34561 Remove some unused methods parameters (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove some unused methods parameters

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

This PR removes some useless private method parameters.

Commits
-------

026730e913 Remove some unused methods parameters
2019-11-24 18:40:20 +01:00
Fabien Potencier
32e1be81bf bug #34551 [Security] SwitchUser is broken when the User Provider always returns a valid user (tucksaun)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security] SwitchUser is broken when the User Provider always returns a valid user

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

Since bcfc282d42, if a UserProvider always returns a valid User object (which can happen in some OAuth workflow), switching user is not possible anymore as we hit the `LogicException`.

This patch should be safe as the timing-attack prevention is kept.

Commits
-------

2bf6cd2eea [Security] Fix SwitchUser is broken when the User Provider always returns a valid user
2019-11-24 18:37:20 +01:00
Grégoire Pineau
2ff3496d62 [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method 2019-11-24 18:22:56 +01:00
Thomas Calvet
026730e913 Remove some unused methods parameters 2019-11-23 21:30:33 +01:00
Christophe Coevoet
7d87ebce2c bug #34385 Avoid empty "If-Modified-Since" header in validation request (mpdude)
This PR was squashed before being merged into the 3.4 branch (closes #34385).

Discussion
----------

Avoid empty "If-Modified-Since" header in validation request

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

Just noticed that when a response has been cached that is `public` and has an `maxAge` but does _not_ provide `Last-Modified`, the validation subrequest will have an empty `If-Modified-Since` header value.

Commits
-------

960faef66f Avoid empty \"If-Modified-Since\" header in validation request
2019-11-23 16:08:00 +01:00
Matthias Pigulla
960faef66f Avoid empty \"If-Modified-Since\" header in validation request 2019-11-23 16:07:54 +01:00
Tugdual Saunier
2bf6cd2eea
[Security] Fix SwitchUser is broken when the User Provider always returns a valid user 2019-11-23 15:44:33 +01:00
Robin Chalas
2743e259c6 minor #34523 Fix error message according to the new regex (elementaire)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix error message according to the new regex

Complete https://github.com/symfony/symfony/pull/34448 from @xabbuh

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

7425d2c69d Fix error message according to the new regex
2019-11-23 05:41:06 +01:00
Robin Chalas
814bdebeeb bug #34458 [Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls

| Q             | A
| ------------- | ---
| Branch?       | 3.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

Spotted while working on https://github.com/symfony/symfony/pull/34456.
Not sure it should really qualify as a bugfix, but the `ContextualValidatorInterface::validate` method is expected to return the instance. If [chaining in a validator](https://github.com/symfony/symfony/pull/34456/files#diff-0e6e3106aa637d750d47e86a14cef8d4R43), trying to use this test methods would throw an error, trying to call a method on `null`.

Commits
-------

8d1f32613b [Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls
2019-11-23 05:39:17 +01:00
elementaire
7425d2c69d
Fix error message according to the new regex
Complete https://github.com/symfony/symfony/pull/34448
2019-11-22 15:36:52 +01:00
Fabien Potencier
860f96cd30 minor #34517 [Messenger] compatibility with DoctrineBundle 2 (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] compatibility with DoctrineBundle 2

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34514, doctrine/DoctrineBundle#1062
| License       | MIT
| Doc PR        |

Commits
-------

6ff20f0122 compatibility with DoctrineBundle 2
2019-11-22 15:35:38 +01:00
Christian Flothmann
6ff20f0122 compatibility with DoctrineBundle 2 2019-11-22 14:37:01 +01:00
Thomas Calvet
dfdcbb401e [TwigBridge] Add row_attr to all form themes 2019-11-21 14:34:54 +01:00
Anto
d4f749a465
[Serializer] Fix MetadataAwareNameConverter usage with string group
fixes 34455
2019-11-21 13:47:16 +01:00
Fabien Potencier
996d8a708f bug #34451 [DependencyInjection] Fix dumping multiple deprecated aliases (shyim)
This PR was merged into the 4.3 branch.

Discussion
----------

[DependencyInjection] Fix dumping multiple deprecated aliases

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

Only the last deprecated alias wins, cause the content will not appended

Commits
-------

60b0dae174 [DependencyInjection] Fix dumping multiple deprecated aliases
2019-11-20 06:36:40 +01:00
Maxime Steinhausser
8d1f32613b [Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls 2019-11-19 17:21:35 +01:00
Soner Sayakci
60b0dae174
[DependencyInjection] Fix dumping multiple deprecated aliases 2019-11-19 16:12:52 +01:00