Commit Graph

38082 Commits

Author SHA1 Message Date
Giuseppe Campanelli
040d01e53b [Validator] Add missing translations of nn locale 2020-05-19 18:38:46 +02:00
Nicolas Grekas
af0df4ce14 bug #36833 [HttpKernel] Fix that the Store would not save responses with the X-Content-Digest header present (mpdude)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present

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

Responses fetched from upstream sources might have a `X-Content-Digest` header, for example if the Symfony Cache is used upstream. This currently prevents the `Store` from saving such responses. In general, the value of this header should not be trusted.

As I consider this header an implementation detail of the `Store`, the fix tries to be local to that class; we should not rely on the `HttpCache` or other classes to remove untrustworthy headers for us.

This fixes the issue that when using the `HttpCache` in combination with the Symfony HttpClient, responses that have also been cached upstream in an instance of `HttpCache` are not cached locally. It adds the overhead of re-computing the content digest every time the `HttpCache` successfully re-validated a response.

Commits
-------

d8964fb8b7 [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
2020-05-19 18:37:57 +02:00
Matthias Pigulla
d8964fb8b7 [HttpKernel] Fix that the Store would not save responses with the X-Content-Digest header present 2020-05-19 18:37:51 +02:00
Nicolas Grekas
42c79753eb minor #36860 [Intl] bump icu 67.1 (ro0NL)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Intl] bump icu 67.1

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

mainly some new locales+scripts (see 3a3a9ba)

Commits
-------

29eb271184 [Intl] bump icu 67.1
2020-05-19 18:34:53 +02:00
Roland Franssen
29eb271184 [Intl] bump icu 67.1 2020-05-19 18:34:45 +02:00
Nicolas Grekas
fd584bb9b3 Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix bad detection of unsilenced deprecations
  [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2020-05-19 10:30:42 +02:00
Nicolas Grekas
9d5bb11ec9 [PhpUnitBridge] fix bad detection of unsilenced deprecations 2020-05-19 10:12:21 +02:00
rfaivre
b447433b67 [Security] Unserialize $parentData, if needed, to avoid errors 2020-05-18 23:38:28 +02:00
Fabien Potencier
5f829bdaeb [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM) 2020-05-18 17:28:46 +02:00
Alexander M. Turek
9f8d225aa1 Revert "Change priority of KernelEvents::RESPONSE subscriber"
This reverts commit 6ed624ad16.
2020-05-16 15:57:47 +02:00
vudaltsov
eb8d626c27 Properties $originalName and $mimeType are never null in UploadedFile 2020-05-16 16:15:54 +03:00
Nicolas Grekas
94e8c42736 Merge branch '3.4' into 4.4
* 3.4:
  [VarDumper] fix for change in PHP 7.4.6 (bis)
  [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:07:46 +02:00
Nicolas Grekas
cb7e78c809 bug #36592 [BrowserKit] Allow Referer set by history to be overridden (Slamdunk)
This PR was merged into the 3.4 branch.

Discussion
----------

[BrowserKit] Allow Referer set by history to be overridden

| Q             | A
| ------------- | ---
| Branch?       | 3.4, see https://github.com/symfony/symfony/pull/36591 for 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

4774946fbd [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:06:03 +02:00
Nicolas Grekas
e69673562c [VarDumper] fix for change in PHP 7.4.6 (bis) 2020-05-16 12:04:57 +02:00
Nicolas Grekas
1e9486de89 [VarExporter] fix for change in PHP 7.4.6 2020-05-16 12:04:25 +02:00
Nicolas Grekas
cc519aa5a9 bug #36823 [HttpClient] fix PHP warning + accept status code >= 600 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix PHP warning + accept status code >= 600

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

This fixes the PHP warning reported in the linked issue.

This also relaxes the accepted status codes, with https://www.linkedin.com/company/linkedin/ as an example that returns a non-conformant one (`999`).

These are now handled as 5xx codes, ie they trigger a ServerException.

Commits
-------

c764b5c36e [HttpClient] fix PHP warning + accept status code >= 600
2020-05-16 11:09:03 +02:00
Nicolas Grekas
bce37603cb bug #36824 [Security/Core] fix compat of NativePasswordEncoder with pre-PHP74 values of PASSWORD_* consts (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts

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

Commits
-------

df32171cb2 [Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts
2020-05-16 11:07:52 +02:00
Nicolas Grekas
ae67376ad3 bug #36811 [DependencyInjection] Fix register event listeners compiler pass (X-Coder264)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix register event listeners compiler pass

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

I've wanted to use the simpler event listener registration syntax (https://symfony.com/blog/new-in-symfony-4-4-simpler-event-listeners) in my project and it didn't work so I'm sending this fix.

We use the `KnpPaginatorBundle` bundle which also [calls the `RegisterListenersPass` compiler pass](https://github.com/KnpLabs/KnpPaginatorBundle/blob/v5.2.0/src/DependencyInjection/Compiler/PaginatorConfigurationPass.php#L22) in order to register with the event dispatcher their custom tags for listeners and subscribers (`knp_paginator.listener` and `knp_paginator.subscriber`).

Their compiler pass is `TYPE_BEFORE_REMOVING` and priority zero which is the same type and priority as the pass that gets [added by FrameworkBundle](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php#L125). Since both the type and priority is the same the order of execution is `undefined` (because [that is how regular sort behaves in PHP which is used by default by `krsort`](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php#L264)) and the `RegisterListenersPass` currently removes the `eventAliasesParameter` parameter from the container if it is set (which is [set here](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml#L9)). So what happens in my app is that the Knp compiler pass runs first, the `event_dispatcher.event_aliases` parameter is removed and then the FrameworkBundle registered compiler pass runs and since the aliases are not present anymore the events do not get aliased properly. The event dispatcher service in the compiled container looks like:

```php
$instance->addListener('Symfony\Component\HttpKernel\Event\RequestEvent', ...);
```

instead of the expected

```php
$instance->addListener('kernel.request', ...);
```

This means that my listener never gets called on the kernel request event.

Another potential fix would be to adjust the Knp compiler pass priority, but seeing as that would fix only that bundle (who knows how many bundles out there have the same problem) and that I don't see any drawback in letting the `event_dispatcher.event_aliases` parameter stay in the container I think that this is better to fix here.

Commits
-------

646878d072 Fix register event listeners compiler pass
2020-05-16 11:07:08 +02:00
Nicolas Grekas
fb4c3f920f Merge branch '3.4' into 4.4
* 3.4:
  [VarDumper] fix for change in PHP 7.4.6
  Added regression test for AccountStatusException behavior (ref #36822)
  embed resource name in error message
  [Serializer] fix issue with PHP 8
  [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-16 11:03:35 +02:00
Nicolas Grekas
924822c2e8 [VarDumper] fix for change in PHP 7.4.6 2020-05-16 10:59:45 +02:00
Nicolas Grekas
cec0dfe5b3 minor #36780 [Translator] embed resource name in error message (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] embed resource name in error message

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

Someone reported on Slack that they accidentally stored a translation file with the `.twig` extension and that the error message was quite confusing.

Commits
-------

507a5963e4 embed resource name in error message
2020-05-16 10:35:38 +02:00
Wouter J
08fbfcf5a0 Added regression test for AccountStatusException behavior (ref #36822) 2020-05-15 23:22:25 +02:00
Nicolas Grekas
c764b5c36e [HttpClient] fix PHP warning + accept status code >= 600 2020-05-15 16:28:26 +02:00
Nicolas Grekas
df32171cb2 [Security/Core] fix compat of NativePasswordEncoder with pre-PHP74 values of PASSWORD_* consts 2020-05-15 14:38:59 +02:00
Christian Flothmann
507a5963e4 embed resource name in error message 2020-05-15 09:32:03 +02:00
Nicolas Grekas
65e6812c1d [FrameworkBundle] fix stringable annotation 2020-05-14 20:47:17 +02:00
Fabien Potencier
e5c82c566e bug #36789 Change priority of KernelEvents::RESPONSE subscriber (marcw)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Change priority of KernelEvents::RESPONSE subscriber

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

This PR changes the priority of the `KernelEvents::RESPONSE` subscriber of the `ProfilerListener` so that it is the penultimate to be executed (just before `StreamedResponseListener`).

The reason is that other listeners that were executed after this one CAN change the response (such as `SessionListener` for example). This creates a headache when debugging, with a discrepancy between what is shown in a curl command, and by the Symfony profiler.

Commits
-------

6ed624ad16 Change priority of KernelEvents::RESPONSE subscriber
2020-05-14 11:30:03 +02:00
Marc Weistroff
6ed624ad16 Change priority of KernelEvents::RESPONSE subscriber 2020-05-14 11:29:57 +02:00
Fabien Potencier
315010422f bug #36786 [WebProfiler] Remove 'none' when appending CSP tokens (ndench)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfiler] Remove 'none' when appending CSP tokens

| Q             | A
| ------------- | ---
| Branch?       | 3.4, 4.4, 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36645
| License       | MIT
| Doc PR        | n/a

@nicolas-grekas  asked me to to have a look at this after #36678.

If a user has a CSP policy of `default-src 'none'`, then the WebProfiler copies `'none'` to `script-src` and `style-src` then adds other sources. This creates an invalid policy since `'none'` is only allowed when it's the only item in the source list.

This will probably need to be merged into 3.4 first, I started on 4.4 so I can test in my current symfony project which requires 4.4.

Commits
-------

967bc4a860 [WebProfiler] Remove 'none' when appending CSP tokens
2020-05-13 19:00:16 +02:00
Antonio Pauletich
646878d072 Fix register event listeners compiler pass 2020-05-13 18:27:55 +02:00
Carlos Buenosvinos
d31d1e0111 Missing description in messenger:setup-transports command
making `bin/console` to show an empty description when the rest of the commands have one.
2020-05-12 22:52:55 +02:00
Nicolas Grekas
44b45cbaf1 [Serializer] fix issue with PHP 8 2020-05-12 22:34:06 +02:00
Nathan Dench
967bc4a860 [WebProfiler] Remove 'none' when appending CSP tokens 2020-05-12 17:24:37 +10:00
Fabien Potencier
a8cb3cd2da bug #36743 [Yaml] Fix escaped quotes in quoted multi-line string (ossinkine)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] Fix escaped quotes in quoted multi-line string

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

This PR continues https://github.com/symfony/symfony/pull/19304

This PR fixes incorrect parsing quoted multi-line string which contain escaped quotes, see tests

Commits
-------

2e99caacaf [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-11 09:51:54 +02:00
Tobias Schultze
35e391aaa2 [TwigBundle] FormExtension does not have a constructor anymore since sf 4.0 2020-05-10 16:50:02 +02:00
Nicolas Grekas
333f7187dc [HttpClient] fix testTimeoutIsNotAFatalError (bis) 2020-05-09 19:43:44 +02:00
Nicolas Grekas
00ae470307 [HttpClient] fix testTimeoutIsNotAFatalError 2020-05-09 18:24:06 +02:00
Nicolas Grekas
4ab6ff37bd [HttpClient] improve testTimeoutIsNotAFatalError 2020-05-09 17:57:30 +02:00
Fabien Potencier
6310084f25 bug #36716 [Mime] handle passing custom mime types as string (mcneely)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] handle passing custom mime types as string

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36715
| License       | MIT
| Doc PR        | none
Fix's issue where custom mimetypes were failing

Commits
-------

f3005ec653 Fix for #36715
2020-05-09 14:32:08 +02:00
Paul L. McNeely
f3005ec653
Fix for #36715 2020-05-09 07:22:40 -05:00
Nicolas Grekas
36ccf4c65b [HttpClient] test that timeout is not fatal 2020-05-09 14:08:40 +02:00
Nicolas Grekas
edb517699a [PhpUnitBridge] fix bad test 2020-05-08 14:32:38 +02:00
Nicolas Grekas
da8b9552ad Merge branch '3.4' into 4.4
* 3.4:
  [3.4] CS fixes
2020-05-08 12:54:34 +02:00
Nicolas Grekas
eba09d47e7 [4.4] CS fixes 2020-05-08 12:39:41 +02:00
Nicolas Grekas
02b378f248 [3.4] CS fixes 2020-05-08 12:38:31 +02:00
theravel
9d48eedbdc Queue name is a required parameter 2020-05-08 12:02:31 +02:00
Nicolas Grekas
a60937519b bug #36751 [Mime] fix bad method call on EmailAddressContains (Kocal)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] fix bad method call on `EmailAddressContains`

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

There is no method `Address` on [`MailboxHeader`](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Mime/Header/MailboxHeader.php), but a method `getAddress`.

Commits
-------

227ebd2fe9 [Mime] fix bad method call on "EmailAddressContains"
2020-05-08 11:59:36 +02:00
Nicolas Grekas
2dbfeb9db9 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] display actual target for error in AssetsInstallCommand
  Remove patches for Doctrine bugs and deprecations
  [DI][EventDispatcher] added contract for implementation
2020-05-08 11:58:40 +02:00
Nicolas Grekas
f6ae18e3ac minor #36710 [DI][EventDispatcher] added contract for implementation (bestform)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][EventDispatcher] added contract for implementation

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

As described in the attached issue a comment in the documentation of the `EventSubscriberInterface` would be helpful to make sure users do not use logic based on runtime state in their implementation of `getSubscribedEvents`.

Commits
-------

88e43d4d4c [DI][EventDispatcher] added contract for implementation
2020-05-08 11:57:02 +02:00
Matthias Larisch
f177b3d488 [FrameworkBundle] display actual target for error in AssetsInstallCommand
When assets:install fails because the target directory does not exist, it should display the actual directory it wanted to have instead of the configuration directive. In most cases, the target directory is retrieved from the kernel config and thus differs from the argument.
2020-05-08 11:56:06 +02:00
Grégoire Paris
2f305cdc83 Remove patches for Doctrine bugs and deprecations 2020-05-08 11:45:13 +02:00
Hugo Alliaume
227ebd2fe9
[Mime] fix bad method call on "EmailAddressContains"
There is no method `Address` on `MailboxHeader`, but a method `getAddress`.
2020-05-08 10:53:13 +02:00
Gocha Ossinkine
2e99caacaf [Yaml] Fix escaped quotes in quoted multi-line string 2020-05-07 22:33:48 +05:00
Matthias Derer
88e43d4d4c [DI][EventDispatcher] added contract for implementation
fixes #36708.
2020-05-05 17:06:23 +02:00
Nicolas Grekas
f8bedf4e79 Merge branch '3.4' into 4.4
* 3.4:
  Force doctrine/dbal <=2.10.2 when testing
2020-05-05 15:52:57 +02:00
Nicolas Grekas
d1953d61cd Force doctrine/dbal <=2.10.2 when testing 2020-05-05 15:43:18 +02:00
Nicolas Grekas
6d089ac437 [Console] fix "data lost during stream conversion" with QuestionHelper 2020-05-05 13:09:20 +02:00
Nicolas Grekas
2732dda83c Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix PHP 5.3 compat
  [PhpUnitBridge] Mark parent class also covered in CoverageListener
  prevent notice for invalid octal numbers on PHP 7.4
2020-05-05 09:39:02 +02:00
Nicolas Grekas
f7fc3cf6cb [PhpUnitBridge] fix PHP 5.3 compat 2020-05-05 09:38:03 +02:00
Fabien Potencier
9b8911598b bug #36569 [PhpUnitBridge] Mark parent class also covered in CoverageListener (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Mark parent class also covered in CoverageListener

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

Commits
-------

dcb5653728 [PhpUnitBridge] Mark parent class also covered in CoverageListener
2020-05-05 07:34:36 +02:00
Grégoire Pineau
dcb5653728 [PhpUnitBridge] Mark parent class also covered in CoverageListener 2020-05-05 00:33:45 +02:00
Christian Flothmann
92bc19fd0c prevent notice for invalid octal numbers on PHP 7.4 2020-05-04 18:58:31 +02:00
Nicolas Grekas
b0573cb418 Merge branch '3.4' into 4.4
* 3.4:
  Fix exception messages containing exception messages
2020-05-04 17:32:48 +02:00
Nicolas Grekas
169e49d491 Fix exception messages containing exception messages 2020-05-04 17:12:51 +02:00
Nicolas Grekas
394946de47 Merge branch '3.4' into 4.4
* 3.4:
  [Filesystem] Handle paths on different drives
  [WebProfiler] Do not add src-elem CSP directives if they do not exist
  [Yaml] fix parse error when unindented collections contain a comment
  [3.4][Inflector] Improve testSingularize() argument name
  [PhpUnitBridge] fix PHP 5.3 compat again
  Skip validation when email is an empty object
  fix sr_Latn translation
  [Validator] fix lazy property usage.
  Fix annotation
  [PhpUnitBridge] fix compat with PHP 5.3
  [DX] Show the ParseException message in YAML file loaders
2020-05-04 16:02:18 +02:00
Fabien Potencier
64e5a9dee8 bug #36590 [Console] Default hidden question to 1 attempt for non-tty session (ostrolucky)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Default hidden question to 1 attempt for non-tty session

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

### Problem 1
`validateAttempts()` method repeats validation forever by default, until exception extending `RuntimeException` isn't thrown. This currently happens disregarding if user is in tty session where they can actually type input, or non-tty session. This presents a problem when user code throws custom exceptions for hidden questions -> loop doesn't stop. As far as I can tell this issue is in all Symfony versions, but it was uncovered only after we stopped marking interactive flag to false automatically ourselves. Actually, all 3 problems were already existing problems, just hidden until now.
### Problem 2
Infinite loop problem is related to hidden questions, but this one isn't. If validation fails, another attempt to read & validate happens. This means user will get two prompts: 2x same question with 2 different error messages. One error message coming from validator, second error message about inability to read input (because this loop repeats until this kind of error happens, so last output will always be this error). As an example, output in practice would look like following
```

 What do you want to do:
 >

 [ERROR] Action must not be empty.

 What do you want to do:
 >

  Aborted.

```

So even if loop stops, output is more than expected.

### Problem 3
This is purely cosmetic issue, but currently user gets `stty: stdin isn't a terminal` printed additionally when question helper tries to ask a hidden question without having tty. I have fixed this in same fashion as was already done for [getShell() method](ee7fc5544e/src/Symfony/Component/Console/Helper/QuestionHelper.php (L500)).

### More details
Well root of the first problem is that `\Symfony\Component\Console\Helper\QuestionHelper::getHiddenResponse` is inconsistent. In some cases it does throw `MissingInputException` (which extends `RuntimeException`), in others doesn't. This is because in others, `shell_exec` is used, which won't return `false` even in non-tty sessions. Initially I attempted to fix this and make them consistent by checking for empty result + `isTty` call, but during my testing I found that at least last, `bash -c` method returns `\n` as output both when passing empty input and when passing newline as input. This means we cannot differentiate with this technique when input is really empty, or at least I can't currently tell how, maybe someone does. I had also idea to use proc_open and check if `STDERR` cotains message about stdin not being a terminal, but I realized these functions might not be available. In future we should modernize this method to use less hacky techniques. Other solutions, eg. Inquirer.js or [hoa/console](https://github.com/hoaproject/Console/blob/master/Source/Readline/Readline.php) have much more elegant solutions. Anyway, since I encountered this issue and additionally this doesn't solve Problem 2, I stopped trying to fix this on this level.

### Alternative solution
Alternative solution to problem 1 and 3 would be to fallback to default in case of hidden questions when tty is missing. But this still doesn't solve problem 2 and I can't think about solution right now which would fix problem 2 separately. We also didn't really reach consensus if reading passwords via stdin is desired. I tried this in `Inquirer.js` and this library *does read password from stdin*

Commits
-------

ee7fc5544e [Console] Default hidden question to 1 attempt for non-tty session
2020-05-04 15:57:21 +02:00
Nicolas Grekas
bd952b9c47 bug #36497 [Filesystem] Handle paths on different drives (crishoj)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Filesystem] Handle paths on different drives

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

`makePathRelative` strips and ignores the drive letters given Windows paths on different drives, resulting in a relative path which does not resolve to the desired target.

This PR makes `makePathRelative` notice paths on different drives, and return the full (absolute) target path in case instead.

Commits
-------

00e727ae4e [Filesystem] Handle paths on different drives
2020-05-04 15:48:43 +02:00
Christian Rishøj
00e727ae4e [Filesystem] Handle paths on different drives 2020-05-04 15:48:34 +02:00
Nicolas Grekas
cf0d086d14 bug #36678 [WebProfiler] Do not add src-elem CSP directives if they do not exist (ndench)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfiler] Do not add src-elem CSP directives if they do not exist

| Q             | A
| ------------- | ---
| Branch?       | 3.4, 4.4, 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36643
| License       | MIT
| Doc PR        | n/a

In the latest 3.4.*, 4.4.* and 5.0.* branches the `script-src-elem` and `style-src-elem` directives are added to the Content-Security-Policy header if they don't exist by copying the `default-src`. This causes browsers to ignore the `script-src` and `style-src` directives which likely contain scripts and styles the developer wanted to allow.

As mentioned in the fixed ticket, we shouldn't be adding these directives if they don't exist because the browser will automatically fallback to `script-src` and `style-src` which we have already added `unsafe-inlen` and the `nonce-*` to.

This will need to be merged into 3.4, 4.4 and 5.0, but I was unsure which branch I am meant to base it off to start with. I've put it on 4.4 but can move it to another if required.

Commits
-------

d9c47087c9 [WebProfiler] Do not add src-elem CSP directives if they do not exist
2020-05-04 15:33:45 +02:00
Nicolas Grekas
78a7f4682f bug #36501 [DX] Show the ParseException message in all YAML file loaders (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[DX] Show the ParseException message in all YAML file loaders

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

This PR synchronizes the exception message in the Routing, Validator and Translation YAML file loaders with the DependencyInjection YAML file loader behavior. Adding the ParseException message is a big DX gain because it highlights the problem directly instead of having to scroll down 7 previous exceptions.

I'm targetting 3.4 because DX can be considered as a bug fix AFAIK.

Commits
-------

fc6cf3d3c6 [DX] Show the ParseException message in YAML file loaders
2020-05-04 15:29:28 +02:00
Nathan Dench
d9c47087c9 [WebProfiler] Do not add src-elem CSP directives if they do not exist 2020-05-04 15:18:19 +02:00
Wouter Diesveld
58bb2c52ac [Yaml] fix parse error when unindented collections contain a comment 2020-05-04 14:50:41 +02:00
Fabien Potencier
0a7fa8f35d minor #36647 Execute docker dependent tests with github actions (jakzal)
This PR was merged into the 4.4 branch.

Discussion
----------

Execute docker dependent tests with github actions

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

* redis, memcached, rabbitmq and vulcain dependent tests moved to the github action
* run on PHP 7.1 and 7.4 only
* use the `integration` group for all tests that depend on docker services
* do not exclude the `integration` group on Travis, but make sure tests that depend on docker services are skipped properly

[<img width="1222" alt="image" src="https://user-images.githubusercontent.com/190447/80806323-48339100-8bb2-11ea-95cd-5ce773c74ce6.png">](https://github.com/jakzal/symfony/runs/636461875?check_suite_focus=true)

Commits
-------

d710c1b654 Execute docker dependent tests with github actions
2020-05-04 14:48:54 +02:00
Jakub Zalas
d710c1b654
Execute docker dependent tests with github actions 2020-05-04 12:09:26 +01:00
Fabien Potencier
469d82d6e2 bug #36672 [Validator] Skip validation when email is an empty object (acrobat)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Skip validation when email is an empty object

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

When the value passed to the email validator is an empty object the validator is still called and will mark the value as invalid. The object should be skipped in this case, as it is also done in the `UrlValidator`

bfdbb244fe/src/Symfony/Component/Validator/Constraints/UrlValidator.php (L59-L62)

<!--
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/releases):
 - 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
-------

de5d68ef2a Skip validation when email is an empty object
2020-05-04 09:50:33 +02:00
Olatunbosun Egberinde
1c9162d2ad Update exception.html.php 2020-05-04 09:47:19 +02:00
Thomas Calvet
75405247be [3.4][Inflector] Improve testSingularize() argument name 2020-05-04 09:08:14 +02:00
Thomas Calvet
fb42f98315 [Inflector] Fix testPluralize() arguments names 2020-05-04 09:00:39 +02:00
Nicolas Grekas
065a8cee5f [PhpUnitBridge] fix PHP 5.3 compat again 2020-05-03 23:44:38 +02:00
Jeroen Thora
de5d68ef2a
Skip validation when email is an empty object 2020-05-03 21:36:20 +02:00
Fabien Potencier
a5ae434a92 bug #36505 [Translation] Fix for translation:update command updating ICU messages (artemoliynyk)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] Fix for translation:update command updating ICU messages

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

If `translation:update` command executed with option `--domain=messages`  – it  ignore `messages-intl-icu` file and just create new `messages`

Method `TranslationUpdateCommand::filterCatalogue()` on `MessageCatalogue::all()` method to get all messages for domain
But `MessageCatalogue::all()` method disredard `intl-icu` domains and simply merge all.

[Translation] added $strict parameter for MessageCatalogueInterface::all() to be able to get only defined domain messages
[FrameworkBundle] modified translation:update command to respect intl-icu domain

Commits
-------

567cee5f02 [Translation] Fix for translation:update command updating ICU messages
2020-05-03 10:46:12 +02:00
Marko Kaznovac
0da177a224
fix sr_Latn translation
*negative* translated as positive
2020-05-03 00:06:24 +02:00
Christian Flothmann
aee10cd44a bug #36627 [Validator] fix lazy property usage. (bendavies)
This PR was squashed before being merged into the 3.4 branch (closes #36627).

Discussion
----------

[Validator] fix lazy property usage.

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

This attempts to fix a large regression introduced in #36343, which broke recursing values returned from `getter` Constraints, because they are now wrapped  in in a `LazyProperty`. The `LazyProperty` needs to be evaluated because some checks are done on the type of `$value`, i.e `is_array` etc... in `validateGenericNode`.

I'm concerned that the original PR didn't really add sufficient test coverage for the introduction of `LazyProperty`, and I'm not 100% sure that I've caught all the cases where the `instanceof` check are needed in this PR.

For the tests, I added the `@dataProvider getConstraintMethods` to every test that hit the problem area of code.

~~The only issue is that my fixed has broken the test introduced in #36343, `testGroupedMethodConstraintValidateInSequence`.~~

~~I think I need @HeahDude to help me work through this. Maybe there is a more simple solution, one that doesn't require doing `instanceof LazyPropery` checks in multiple places, because this feels very brittle.~~
EDIT: fixed that test.

Commits
-------

281861e788 [Validator] fix lazy property usage.
2020-05-02 08:43:10 +02:00
Ben Davies
281861e788 [Validator] fix lazy property usage. 2020-05-02 08:43:03 +02:00
Christian Flothmann
a804333b25 minor #36613 [Form] provide a useful message when extension types don't match (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] provide a useful message when extension types don't match

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

Commits
-------

88d836643a provide a useful message when extension types don't match
2020-05-02 08:23:09 +02:00
Nicolas Grekas
4528c1194b bug #36601 [Serializer] do not transform empty \Traversable to Array (soyuka)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] do not transform empty \Traversable to Array

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

Today, using `PRESERVE_EMPTY_OBJECTS` ([introduced in 4.0](f28e826627)), the JSON serialization of:

```php
<?php
$object = [];
$object['foo'] = new \ArrayObject();
$object['bar'] = new \ArrayObject(['notempty']);
$object['baz'] = new \ArrayObject(['nested' => new \ArrayObject()]);
```

Outputs:

```json
{"foo":[],"bar":["notempty"],"baz":{"nested":[]}}
```

Instead of the expected:

```json
{"foo":{},"bar":["notempty"],"baz":{"nested":{}}}
```

This issue comes from the Serializer that transforms `Traversable` to an Array [here](11a707200d/src/Symfony/Component/Serializer/Serializer.php (L159)). Also, the `AbstractObjectNormalizer` [doesn't support Traversable](11a707200d/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php (L134)), but he allows to preserve empty objects.

I propose this patch where the fix doesn't transform a `Traversable` to an Array. I see another way to patch this in which we could allow empty Traversable in the `AbstractObjectNormalizer` (not sure it's better though). See attached [other-fix.patch](https://github.com/symfony/symfony/files/4539865/other-fix.log) to see the alternative patch.

Commits
-------

e5c20293fa Fix serializer do not transform empty \Traversable to Array
2020-05-01 23:09:03 +02:00
Vincent Langlet
67b744929f Fix annotation 2020-05-01 19:30:18 +02:00
Nicolas Grekas
c5e5b2d019 [Debug][ErrorHandler] cleanup phpunit.xml.dist files 2020-05-01 18:55:10 +02:00
Artem Oliynyk
567cee5f02 [Translation] Fix for translation:update command updating ICU messages 2020-04-30 20:05:09 +02:00
Nicolas Grekas
f8d3b0626a bug #36606 [Cache] Fixed not supported Redis eviction policies (SerheyDolgushev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Fixed not supported Redis eviction policies

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

**Steps to reproduce:**
1. Define the following redis service on SymfonyCloud:
```
rediscache:
    type: redis:5.0
    size: S
    configuration:
        maxmemory_policy: allkeys-lru
```
2. Deploy the change

**Expected result:**
No redis cache will be populated

**Actual result:**
Following exception is thrown:
```
[2020-04-28T05:35:58.440403-04:00] php.CRITICAL: Uncaught Error: Return value of Symfony\Component\Cache\Adapter\RedisTagAwareAdapter::doSave() must be of the type array, bool returned {"exception":"[object] (TypeError(code: 0): Return value of Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter::doSave() must be of the type array, bool returned at /app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php:100)"} []
```

Commits
-------

3d6e942da5 [Cache] Fixed not supported Redis eviction policies
2020-04-30 19:47:27 +02:00
Nicolas Grekas
856ba8c98f [PhpUnitBridge] fix compat with PHP 5.3 2020-04-29 17:41:38 +02:00
Fabien Potencier
cd66cd57a0 bumped Symfony version to 4.4.9 2020-04-28 20:52:27 +02:00
Fabien Potencier
f7b9d93cb2 updated VERSION for 4.4.8 2020-04-28 20:47:42 +02:00
Nicolas Grekas
dfc4a71eac [Validator] fix merge 2020-04-28 20:23:58 +02:00
Nicolas Grekas
49b74baab4 Merge branch '3.4' into 4.4
* 3.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Form] apply automatically step=1 for datetime-local input
2020-04-28 19:55:16 +02:00
Christian Flothmann
88d836643a provide a useful message when extension types don't match 2020-04-28 19:46:51 +02:00
Fabien Potencier
f59e0e9c23 updated VERSION for 3.4.40 2020-04-28 19:41:38 +02:00
Serhey Dolgushev
3d6e942da5 [Cache] Fixed not supported Redis eviction policies 2020-04-28 12:13:53 +01:00
soyuka
e5c20293fa Fix serializer do not transform empty \Traversable to Array 2020-04-27 16:07:50 +02:00
Filippo Tessarotto
4774946fbd [BrowserKit] Allow Referer set by history to be overridden (3.4) 2020-04-27 08:55:12 +02:00
Gabriel Ostrolucký
ee7fc5544e
[Console] Default hidden question to 1 attempt for non-tty session 2020-04-27 05:08:14 +02:00
Nicolas Grekas
1bc3ee798d bug #36536 [Cache] Allow invalidateTags calls to be traced by data collector (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Allow invalidateTags calls to be traced by data collector

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

`TraceableTagAwareAdapter` is not used in the fullstack framework since tag aware pools don't have the `cache.pool` tag (it's the decorated adapter that has it). This PR aims to use `TraceableTagAwareAdapter` when a pool is configured with `tags: true`

Commits
-------

28fdb3a879 Allow invalidateTags calls to be traced by data collector
2020-04-26 16:19:08 +02:00
Nicolas Grekas
048e6f3dd8 minor #36571 [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) (Lozik)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36533
| License       | MIT
| Doc PR        | none
<!--
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/releases):
 - 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.
-->
This PR changes the label of the peak memory usage from `MB` into `MiB` in the time and memory panels of the web profiler, as discussed in #36533.

The changed file `Resources/views/Collector/time.html.twig` is completely updated by commit c9433b0090 for v4.3. So for correctly displaying the label in 4.4 (& 5.0), the file `Resources/views/Collector/time.js` needs to be updated.

Commits
-------

89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
2020-04-26 14:49:57 +02:00
Loïc Beurlet
89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) 2020-04-26 14:49:41 +02:00
Christian Flothmann
fb3aaefbf2 add tests for the ConstraintViolationBuilder class 2020-04-26 10:10:12 +02:00
Fabien Potencier
e3dc5effa6 bug #36566 [PhpUnitBridge] Use COMPOSER_BINARY env var if available (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use COMPOSER_BINARY env var if available

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

Commits
-------

6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available
2020-04-25 14:18:34 +02:00
Alessandro Lai
e721cfd65c
Improve dirname usage 2020-04-24 16:08:51 +02:00
Thomas Calvet
6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available 2020-04-24 14:56:41 +02:00
Laurent VOULLEMIER
28fdb3a879 Allow invalidateTags calls to be traced by data collector 2020-04-24 13:56:40 +02:00
Fabien Potencier
fe5eacd3a2 bug #36560 [YAML] escape DEL(\x7f) (sdkawata)
This PR was merged into the 3.4 branch.

Discussion
----------

[YAML] escape DEL(\x7f)

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

Commits
-------

734d97bdcc [YAML] escape DEL(\x7f)
2020-04-24 12:37:21 +02:00
sdkawata
734d97bdcc [YAML] escape DEL(\x7f) 2020-04-24 19:16:04 +09:00
Fabien Potencier
719bb15c38 bug #36539 [PhpUnitBridge] fix compatibility with phpunit 9 (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fix compatibility with phpunit 9

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

See related issue

Commits
-------

e27ed28bae fix compatibility with phpunit 9
2020-04-24 10:28:23 +02:00
Fabien Potencier
259f523010 bug #36555 [Cache] skip APCu in chains when the backend is disabled (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] skip APCu in chains when the backend is disabled

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

I think this should do it.

Commits
-------

5a7208481d [Cache] skip APCu in chains when the backend is disabled
2020-04-24 10:25:10 +02:00
Massimiliano Arione
e27ed28bae
fix compatibility with phpunit 9 2020-04-24 09:55:53 +02:00
Nicolas Grekas
5a7208481d [Cache] skip APCu in chains when the backend is disabled 2020-04-23 23:50:38 +02:00
Nicolas Grekas
2d7b0b8dad bug #36519 [FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias

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

Imagine that `FooInterface` is an alias, but it is deprecated and so has a `class_alias` to `BarInterface`. Currently, `debug:autowiring` will actually print that's the autowiring alias is `BarInterface`, despite there being no such id in the container.

@nicolas-grekas originally (on purpose) made the 2nd argument to `Descriptor::getClassDescription()` be passed by reference *for* this exact feature - 56aab09b01 - but I can't figure out why. This change (which effectively removes the by-reference modifying) made no existing tests fail.

Discovered this because the whole deprecated`Doctrine\Common\Persistence\ManagerRegistry` vs newer `Doctrine\Persistence\ManagerRegistry` causes the issue.

Thanks!

Commits
-------

d34b437ce0 Fixing a bug where class_alias would cause incorrect items in debug:autowiring
2020-04-23 22:17:53 +02:00
Thomas Calvet
fc6cf3d3c6 [DX] Show the ParseException message in YAML file loaders 2020-04-23 16:16:02 +02:00
Fabien Potencier
444e616f6b [Mailer] Add a comment to avoid more wrong PRs on this piece of code 2020-04-23 14:41:43 +02:00
Dimitri Gritsajuk
3c24cfecdd [Form] apply automatically step=1 for datetime-local input 2020-04-22 12:34:32 +02:00
Nicolas Grekas
119ba3b742 bug #36454 [DependencyInjection][ServiceSubscriber] Support late aliases (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][ServiceSubscriber] Support late aliases

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

A service subscriber that references a service that is aliased after optimization passes (after ResolveReferencesToAliasesPass technically) end up being dumped with the real service and not the alias.

I would consider it a bug but @nicolas-grekas told me it's a feature for him, this is why I'm submitting this on master.

@nicolas-grekas, feel free to close this one and open with your solution since you definitely know the subject better.

Commits
-------

24150370c3 [DependencyInjection][ServiceSubscriber] Support late aliases
2020-04-21 23:46:25 +02:00
Nicolas Grekas
15d2b77632 fix merge 2020-04-21 23:19:23 +02:00
Nicolas Grekas
0ed6cfd412 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Fix session.attribute_bag service definition
  Update LdapBindAuthenticationProvider.php
2020-04-21 23:01:55 +02:00
Nicolas Grekas
08ded7fed6 bug #36498 [Security/Core] fix escape for username in LdapBindAuthenticationProvider.php (stoccc)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] fix escape for username in LdapBindAuthenticationProvider.php

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

I think that when we call `ldap_search()` as definitely it will do the `$this->ldap->query()` call, the proper filter applied should be `LdapInterface::ESCAPE_FILTER` as documented in
https://www.php.net/manual/en/function.ldap-escape.php while `LdapInterface::ESCAPE_DN` should be used for `dn` only

This simple change should fix, I'm sorry if I'm wrong.

Commits
-------

4bda68a9a2 Update LdapBindAuthenticationProvider.php
2020-04-21 22:51:56 +02:00
Nicolas Grekas
60245d94aa bug #36500 [Routing][PrefixTrait] Add the _locale requirement (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing][PrefixTrait] Add the _locale requirement

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

Commits
-------

9fd62f79fb [Routing] Add missing _locale requirements
2020-04-21 21:59:53 +02:00
Ryan Weaver
d34b437ce0 Fixing a bug where class_alias would cause incorrect items in debug:autowiring 2020-04-21 14:42:49 -04:00
Thomas Calvet
76072c6424 [FrameworkBundle] Fix session.attribute_bag service definition 2020-04-20 18:42:48 +02:00
Thomas Calvet
9ac1c76fd5 [Routing] Remove unused properties from the Route annotation 2020-04-20 16:41:27 +02:00
Thomas Calvet
9fd62f79fb [Routing] Add missing _locale requirements
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
2020-04-20 14:17:53 +02:00
stoccc
4bda68a9a2
Update LdapBindAuthenticationProvider.php 2020-04-19 23:34:01 +02:00
Nicolas Grekas
95becc4078 bug #36457 [Cache] CacheItem with tag is never a hit after expired (alexander-schranz, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] CacheItem with tag is never a hit after expired

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes/no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36458
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

It seems like a tag cacheItem is never a hit again. Not sure how fix this but the cache component is really hard to debug 🙈 .

It need to be somewhere generally as all TagAware caches are effected:

```
1) Symfony\Component\Cache\Tests\Adapter\FilesystemTagAwareAdapterTest::testRefreshAfterExpires

Failed asserting that false is true.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:194

2) Symfony\Component\Cache\Tests\Adapter\PredisTagAwareClusterAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183

3) Symfony\Component\Cache\Tests\Adapter\RedisTagAwareAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183

4) Symfony\Component\Cache\Tests\Adapter\RedisTagAwareClusterAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183
```

Commits
-------

d082eca7dd Add reproducer to for hit after update expire cacheItem
f815b011c3 [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists
2020-04-19 21:54:45 +02:00
Nicolas Grekas
e0e3cf634e Merge branch '3.4' into 4.4
* 3.4:
  [HttpFoundation] workaround PHP bug in the session module
2020-04-18 22:40:08 +02:00
Nicolas Grekas
0cbca19edc [HttpFoundation] workaround PHP bug in the session module 2020-04-18 22:23:17 +02:00
Alexander Schranz
d082eca7dd Add reproducer to for hit after update expire cacheItem 2020-04-18 16:28:10 +02:00
Nicolas Grekas
f815b011c3 [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists 2020-04-18 16:28:10 +02:00
Nicolas Grekas
80c5060401 Merge branch '3.4' into 4.4
* 3.4:
  [SecurityBundle] fix accepting env vars in remember-me configurations
  [Form] Fixed handling groups sequence validation
  [Cache] Avoid memory leak in TraceableAdapter::reset()
2020-04-18 14:50:46 +02:00
Nicolas Grekas
a347a84453 bug #36483 [SecurityBundle] fix accepting env vars in remember-me configurations (zek)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] fix accepting env vars in remember-me configurations

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

As @wouterj explained we cannot use env variables after #35910 merged.

> Hmm, so I'm guessing this is what happens:
>
> * `lifetime` is now an `integerNode()`
> * For the Config component (which IIRC doesn't know anything about env variables), you're passing a string: `"%env(int:REMEMBER_ME_COOKIE_LIFETIME)%"`
> * This throws an error, although if it wouldn't, the DI component would sucessfully process the string into a integer before it's used by any PHP class.
>
> So we either make Config aware of environment variables (that's probably a huge feature) or we revert the `integerNode()` changes (as you suggested).
>
> @HeahDude am I mislooking something, or would reverting these 2 lines not result in much harm? (only a little less strict config processor)

Commits
-------

46c278316c [SecurityBundle] fix accepting env vars in remember-me configurations
2020-04-18 14:12:43 +02:00
Talha Zekeriya Durmuş
46c278316c [SecurityBundle] fix accepting env vars in remember-me configurations 2020-04-18 14:12:03 +02:00
Nicolas Grekas
0f1a5c452e bug #36343 [Form] Fixed handling groups sequence validation (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed handling groups sequence validation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | FIx https://github.com/symfony/symfony/issues/9939#issuecomment-607459505, Fix #35556
| License       | MIT
| Doc PR        | ~

This is not the same as the original issue fixed by #36245, that was reported in https://github.com/symfony/symfony/issues/9939#issuecomment-607459505.

The form also fails to cascade sequence validation properly because each nested field is validated against the sequence, and one can fail at a step independently from another which could failed in another step. I've added a lot of tests to ensure this is working properly and tested in a website skeleton too.

This PR aims to close #35556 which tries to fix the same issue but afterwards in its implementation as said in https://github.com/symfony/symfony/pull/35556#discussion_r379289230.

Commits
-------

dfb61c204c [Form] Fixed handling groups sequence validation
2020-04-18 14:07:22 +02:00
Jules Pietri
dfb61c204c
[Form] Fixed handling groups sequence validation 2020-04-18 13:27:37 +02:00
Fabien Potencier
17bbaa502a bug #36460 [Cache] Avoid memory leak in TraceableAdapter::reset() (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Avoid memory leak in TraceableAdapter::reset()

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

When we call `ServicesResetter::reset()`, we want to reset the
application to its initial states. We don't want a memory leak :p

Commits
-------

15a8610c0c [Cache] Avoid memory leak in TraceableAdapter::reset()
2020-04-17 05:10:57 +02:00
Thomas Calvet
24150370c3 [DependencyInjection][ServiceSubscriber] Support late aliases 2020-04-16 18:36:56 +02:00
Fabien Potencier
e885860edc Fix From/Sender handling in Emails 2020-04-16 16:49:30 +02:00
Grégoire Pineau
15a8610c0c [Cache] Avoid memory leak in TraceableAdapter::reset() 2020-04-15 20:25:28 +02:00
Nicolas Grekas
14a204636d bug #36408 [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions (soyuka)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions

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

expectExceptionMessageRegExp is deprecated coming phpunit 8.5.3  see https://github.com/sebastianbergmann/phpunit/issues/4133

Not sure if I need to add something else lmk.

Commits
-------

cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
2020-04-15 17:56:18 +02:00
soyuka
cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions 2020-04-15 17:55:41 +02:00
Fabien Potencier
39a7ee1a61 bug #36447 Remove return type for Twig function workflow_metadata() (gisostallenberg)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove return type for Twig function workflow_metadata()

Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.

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

The workflow metadata store can contain not only strings, but setting nested metadata results in an error when workflow_metadata() is used in Twig.
Also see #36391

Commits
-------

55664c5a17 Remove return type for Twig function workflow_metadata()
2020-04-15 11:12:33 +02:00
Jordi Boggiano
68b3b898d8 [Messenger] Make sure redis transports are initialized correctly 2020-04-14 13:52:59 +02:00
Giso Stallenberg
55664c5a17 Remove return type for Twig function workflow_metadata()
Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.
Also see https://github.com/symfony/symfony/issues/36391
2020-04-14 11:16:32 +02:00
Nicolas Grekas
b3333e552d [DI] fix typo 2020-04-14 10:30:58 +02:00
Nicolas Grekas
acb1060754 Merge branch '3.4' into 4.4
* 3.4:
  [DI] fix loading defaults when using the PHP-DSL
  RepeatedType should always have inner types mapped
2020-04-13 12:13:05 +02:00
Nicolas Grekas
f70286333f bug #36411 [Form] RepeatedType should always have inner types mapped (biozshock)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] RepeatedType should always have inner types mapped

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

Always set mapped=true to override inner type mapped setting.
Throw an exception if inner types of RepeatedType has mapped=false

Commits
-------

728cd66a13 RepeatedType should always have inner types mapped
2020-04-13 11:46:34 +02:00
Nicolas Grekas
51e0d3792c [DI] fix loading defaults when using the PHP-DSL 2020-04-13 11:33:40 +02:00
Wouter de Jong
4f6381323c Fixed false-negative fabbot error on exception message 2020-04-13 00:16:27 +02:00
Fabien Potencier
093a71500a Fix tests 2020-04-12 18:56:09 +02:00
Fabien Potencier
311a944a08 Fix test 2020-04-12 18:54:01 +02:00
Fabien Potencier
9f9383b25f Fix code 2020-04-12 18:45:36 +02:00
Fabien Potencier
e4d4428bb3 Fix code 2020-04-12 18:39:58 +02:00
Fabien Potencier
7d2cab1644 Tweak the code to avoid fabbot false positives 2020-04-12 18:14:02 +02:00
Fabien Potencier
11a707200d Merge branch '3.4' into 4.4
* 3.4:
  Tweak the code to avoid fabbot false positives
2020-04-12 16:39:55 +02:00
Fabien Potencier
ad6f75e5c8 Tweak the code to avoid fabbot false positives 2020-04-12 16:33:46 +02:00
Nicolas Grekas
8b84ab6002 [Lock] remove mention of mongodb 2020-04-12 13:06:58 +02:00
Nicolas Grekas
d53973afdb Merge branch '3.4' into 4.4
* 3.4:
  [Routing] µtweaks
2020-04-12 13:06:44 +02:00
Nicolas Grekas
a21c1127dc [Routing] µtweaks 2020-04-12 11:58:27 +02:00
Nicolas Grekas
44212f96d8 Merge branch '3.4' into 4.4
* 3.4:
  Revert "[travis][appveyor] don't cache .phpunit"
  silence E_NOTICE triggered since PHP 7.4
  [Form] Removed legacy check in `ValidationListener`
  do not merge constraints within interfaces
  [Validator] Fixed default group for nested composite constraints
2020-04-12 11:41:03 +02:00
Fabien Potencier
4e6a3bddf5 bug #36434 [HttpKernel] silence E_NOTICE triggered since PHP 7.4 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] silence E_NOTICE triggered since PHP 7.4

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

Commits
-------

c4e2c447ba silence E_NOTICE triggered since PHP 7.4
2020-04-12 11:33:14 +02:00
Christian Flothmann
c4e2c447ba silence E_NOTICE triggered since PHP 7.4 2020-04-12 11:28:02 +02:00
Fabien Potencier
6a27337333 bug #36365 [Validator] Fixed default group for nested composite constraints (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed default group for nested composite constraints

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

Take a breath: when composite constraints are nested in a parent composite constraint without having non composite nested constraints (i.e empty), then the default group is not added, making the validator failing to validate in any group (including default), because there is no group at all, which should never happen.

Commits
-------

117ee34698 [Validator] Fixed default group for nested composite constraints
2020-04-12 09:44:21 +02:00
Fabien Potencier
f84592ac83 bug #36422 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only

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

Commits
-------

a5b884cd94 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only
2020-04-12 09:39:11 +02:00
Fabien Potencier
280674f8bc bug #36417 Force ping after transport exception (oesteve)
This PR was merged into the 4.4 branch.

Discussion
----------

Force ping after transport exception

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

SMTP transport fails for long running processes after tranport exception, if stream is closed all messages will throw a transport exception until $lastMessageTime exceds $pingThreshold.

With this PR, after transport expception the transport will ping the server to check if the connection is still alive.

Commits
-------

7ccbef62f6 Force ping after transport Exception
2020-04-12 09:31:22 +02:00
Fabien Potencier
cd4a4bd3d1 bug #35591 [Validator] do not merge constraints within interfaces (greedyivan)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] do not merge constraints within interfaces

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

This fix disables merge constraints within interfaces.

There is no reason to merge constraints from one interface to another because each class merges the constraints of all its interfaces. Only one check is needed is to eliminate all interfaces that comes from parent class to avoid duplication.

Commits
-------

67f336b808 do not merge constraints within interfaces
2020-04-12 09:28:41 +02:00
Fabien Potencier
db733da440 minor #36428 [Form] Removed legacy check in ValidationListener (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Removed legacy check in `ValidationListener`

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

A left over of #13198, should have been removed in 3.0. The tests don't use `null` anymore, no update needed here, this is just about removing dead code.

Commits
-------

e479e51f7c [Form] Removed legacy check in `ValidationListener`
2020-04-12 09:19:14 +02:00
Jules Pietri
e479e51f7c
[Form] Removed legacy check in ValidationListener 2020-04-11 22:17:48 +02:00
Nicolas Grekas
a5b884cd94 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only 2020-04-11 11:49:39 +02:00
Nicolas Grekas
977276efa4 bug #36377 [HttpClient] Fix scoped client without query option configuration (X-Coder264)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix scoped client without query option configuration

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

The `query` key default value is an [empty array](https://github.com/symfony/symfony/blob/v4.4.7/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php#L30) and because of that it is always set. Processing a configuration for a scoped HTTP client (which has a `scope` and does not have a `base_uri`) results in the configuration being invalid. The error message says that query parameters cannot be aplied to the base URI since it is not defined (which doesn't make sense since the query parameters don't exist because they are empty).

Commits
-------

a07578dba3 [HttpClient] Fix scoped client without query option configuration
2020-04-10 23:11:29 +02:00
Nicolas Grekas
6f197466e5 bug #36387 [DI] fix detecting short service syntax in yaml (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix detecting short service syntax in yaml

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

We do allow interfaces/classes as keys in arguments, yet the short syntax fails to know about those.

This fixes it, allowing one to use:
```
services:
    App\Foo:
        App\BarInterface: '@App\BarClass'
```

As a reminder, by-name is also allowed:
```
services:
    App\Foo: {
        $bar: '@App\BarClass'
    }
```

Commits
-------

bf17165fb1 [DI] fix detecting short service syntax in yaml
2020-04-10 23:06:17 +02:00
Nicolas Grekas
ba58c6ff8e bug #36392 [DI] add missing property declarations in InlineServiceConfigurator (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] add missing property declarations in InlineServiceConfigurator

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

These are accessed by the traits used by the class.

Commits
-------

a6a4442cd9 [DI] add missing property declarations in InlineServiceConfigurator
2020-04-10 23:00:45 +02:00
Nicolas Grekas
2dd5fe67e0 bug #36400 Allowing empty secrets to be set (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

Allowing empty secrets to be set

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

Setting secrets to an empty string is a valid value - you can already do this by consuming from an empty file or `stdin` with no input. But it's *not* currently possible to use the interactive prompt to set a secret to an empty string. This fixes that.

Commits
-------

c9bf0c8683 Allowing empty secrets to be set
2020-04-10 22:51:50 +02:00
Nicolas Grekas
f2d4a2910d bug #36380 [Process] Fixed input/output error on PHP 7.4 (mbardelmeijer)
This PR was merged into the 4.4 branch.

Discussion
----------

[Process] Fixed input/output error on PHP 7.4

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

This PR aims to fix the error from #34945, but i'm unsure if this is the best solution. The issue is that on PHP 7.4 the input/output error may come up.

php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.fread-fwrite

> fread() and fwrite() will now return FALSE if the operation failed. Previously an empty string or 0 was returned. EAGAIN/EWOULDBLOCK are not considered failures. These functions now also raise a notice on failure, such as when trying to write to a read only file resource.

Commits
-------

b98abde65a Supress error from fread when reading a unix pipe
2020-04-10 22:46:28 +02:00
Nicolas Grekas
4be98cd992 Merge branch '3.4' into 4.4
* 3.4:
  [appveyor] bump cache
  [DI] µfix
2020-04-10 22:35:35 +02:00
Mike Milano
b2c9a6ea91 [Twig][Mime] Removed extra quotes in missing package exception message 2020-04-10 22:28:12 +02:00
Nicolas Grekas
015d8d7e86 [DI] µfix 2020-04-10 22:02:31 +02:00
Artem Lopata
728cd66a13 RepeatedType should always have inner types mapped 2020-04-10 21:29:36 +02:00
oesteve
7ccbef62f6 Force ping after transport Exception 2020-04-10 20:51:00 +02:00
Ryan Weaver
c9bf0c8683 Allowing empty secrets to be set 2020-04-09 10:53:24 -04:00
Ivan Grigoriev
67f336b808
do not merge constraints within interfaces 2020-04-09 15:51:11 +03:00
Nicolas Grekas
a6a4442cd9 [DI] add missing property declarations in InlineServiceConfigurator 2020-04-09 10:43:57 +02:00
Nicolas Grekas
bf17165fb1 [DI] fix detecting short service syntax in yaml 2020-04-08 16:17:20 +02:00
Jules Pietri
117ee34698
[Validator] Fixed default group for nested composite constraints 2020-04-08 12:54:36 +02:00
Michel Bardelmeijer
b98abde65a Supress error from fread when reading a unix pipe 2020-04-07 21:12:26 +02:00
Grégoire Pineau
0506f8ce2b Merge remote-tracking branch 'origin/3.4' into 4.4
* origin/3.4:
  [Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
2020-04-07 15:32:43 +02:00
Antonio Pauletich
a07578dba3 [HttpClient] Fix scoped client without query option configuration 2020-04-07 14:53:04 +02:00
Grégoire Pineau
a00a2f1115 [Workflow] Use a strict comparison when retrieving raw marking in MarkingStore 2020-04-07 11:51:42 +02:00
Grégoire Pineau
aebe8ae163 [Workflow] Use a strict comparison when retrieving raw markin in MarkingStore 2020-04-07 11:39:41 +02:00
Nicolas Grekas
f72dd9cafa Merge branch '3.4' into 4.4
* 3.4:
  [PropertyAccess] fix tests
  [WebProfilerBundle] fix test
  remove assertions that can never be reached
  [PropertyAccess] Improve message of unitialized property in php 7.4
  [HttpFoundation] Fixed session migration with custom cookie lifetime
  [Serializer] Remove unused variable
  Allow URL-encoded special characters in basic auth part of URLs
  [Serializer] Fix unitialized properties (from PHP 7.4.2) when serializing context for the cache key
  [Validator] Add missing Ukrainian and Russian translations
  No need to reconnect the bags to the session
  Support for Content Security Policy style-src-elem and script-src-elem in WebProfiler
  [PropertyInfo][ReflectionExtractor] Check the array mutator prefixes last when the property is singular
2020-04-06 12:16:26 +02:00
Nicolas Grekas
547c99eae5 bug #36305 [PropertyInfo][ReflectionExtractor] Check the array mutator prefixes last when the property is singular (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo][ReflectionExtractor] Check the array mutator prefixes last when the property is singular

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

Check the related tickets that have a very descriptive example.

If the property is singular, we should prioritize non array mutator prefixes and do the opposite for plural property. It relies on some guessing but it actually fixes real world scenarios.

Commits
-------

b4df2b9dff [PropertyInfo][ReflectionExtractor] Check the array mutator prefixes last when the property is singular
2020-04-06 12:11:23 +02:00
Nicolas Grekas
995ef18f95 [PropertyAccess] fix tests 2020-04-06 12:01:14 +02:00
Nicolas Grekas
a20110c6b6 [WebProfilerBundle] fix test 2020-04-06 11:49:16 +02:00
Christian Flothmann
112b5de3cf remove assertions that can never be reached 2020-04-06 10:30:32 +02:00
Fabien Potencier
efc93a7e17 minor #36311 [PropertyAccess] Improve message of unitialized property in php 7.4 (lmasforne)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Improve message of unitialized property in php 7.4

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

Improve message of unitialized property in php 7.4 ;
Before
You should either initialize it or make it nullable using "?string" instead.
After
You should either initialize it or make it nullable using "?string $var = null" instead.

Commits
-------

3c8bf2d29d [PropertyAccess] Improve message of unitialized property in php 7.4
2020-04-06 10:09:12 +02:00
Laurent Masforné
3c8bf2d29d [PropertyAccess] Improve message of unitialized property in php 7.4 2020-04-06 10:09:05 +02:00