Commit Graph

46285 Commits

Author SHA1 Message Date
Fabien Potencier
e41a31236a bug #35609 [DoctrineBridge] Fixed submitting ids with query limit or offset (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fixed submitting ids with query limit or offset

| 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       | Fix https://github.com/symfony/symfony/pull/34900#discussion_r375246113 <!-- 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
-------

9bb194098f [DoctrineBridge] Fixed submitting ids with query limit or offset
2020-02-07 08:54:38 +01:00
Fabien Potencier
36ffca37e3 minor #35628 [Security] Improve info UserPasswordEncoderCommand (wimme002)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35628).

Discussion
----------

[Security] Improve info UserPasswordEncoderCommand

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

`php bin/console security:encode-password [password] App\Entity\User`
will result in
`No encoder has been configured for account "AppEntityUser".  `

If a full class path is used, it either has to be passed in as a string or has to be escaped by double slashes.

Commits
-------

3604bb7018 Update UserPasswordEncoderCommand.php
2020-02-07 08:50:00 +01:00
Wim Molenberghs
3604bb7018 Update UserPasswordEncoderCommand.php 2020-02-07 08:49:54 +01:00
Nicolas Grekas
cd2dec3a7f [PhpUnitBridge] cs fix 2020-02-06 18:00:39 +01:00
Fabien Potencier
f46e6cb8a0 [HttpFoundation][FrameworkBundle] fix support for samesite in session cookies 2020-02-06 09:18:51 +01:00
Jules Pietri
9bb194098f [DoctrineBridge] Fixed submitting ids with query limit or offset 2020-02-05 19:57:26 +01:00
Nicolas Grekas
cacb503294 [Bridge/PhpUnit] fix compat with recent versions of phpunit 2020-02-05 19:46:15 +01:00
Nicolas Grekas
c31ce63221 [Bridge/PhpUnit] fix parse error on PHP5 2020-02-05 19:23:47 +01:00
Nicolas Grekas
625ec1b7d7 Merge branch '3.4' into 4.4
* 3.4:
  Replace 403 with 401 in onAuthenticationFailure method
2020-02-05 19:11:18 +01:00
Nicolas Grekas
adacae6f54 minor #35606 [Security] Replace 403 with 401 in onAuthenticationFailure method (alanpoulain)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Replace 403 with 401 in `onAuthenticationFailure` method

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

This comment in `onAuthenticationFailure` was misleading since a 401 status code should probably be returned instead of a 403.

Commits
-------

73bc793be2 Replace 403 with 401 in onAuthenticationFailure method
2020-02-05 19:10:08 +01:00
Alan Poulain
73bc793be2
Replace 403 with 401 in onAuthenticationFailure method 2020-02-05 17:32:02 +01:00
Nicolas Grekas
e2dbff5af3 minor #35601 [PhpUnitBridge] fix getting the vendor/ dir for tests (nicolas-grekas)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[PhpUnitBridge] fix getting the vendor/ dir for tests

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

Commits
-------

341dd5dd1d [PhpUnitBridge] fix getting the vendor/ dir for tests
2020-02-05 13:07:26 +01:00
Nicolas Grekas
341dd5dd1d [PhpUnitBridge] fix getting the vendor/ dir for tests 2020-02-05 13:07:20 +01:00
Nicolas Grekas
b6acfae9dc bug #35597 [PHPunit bridge] Provide current file as file path (greg0ire)
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPunit bridge] Provide current file as file path

I failed to apply perfectly this comment:
https://github.com/symfony/symfony/pull/33820#discussion_r338746158
It should fix one failing test in the bridge.

| Q             | A
| ------------- | ---
| Branch?       |4.4
| Bug fix?      | not for the end user
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a
<!--
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
-------

d5302cb5d2 Provide current file as file path
2020-02-05 10:22:36 +01:00
Grégoire Paris
d5302cb5d2 Provide current file as file path 2020-02-05 10:22:11 +01:00
Nicolas Grekas
abeee5f018 [Mailer] fix merge 2020-02-04 23:28:01 +01:00
Nicolas Grekas
88b4579942 [Mailer] fix typos 2020-02-04 20:55:13 +01:00
Nicolas Grekas
5ae1384e8f [Messenger] fix typo 2020-02-04 20:51:39 +01:00
Nicolas Grekas
b1b64c1361 bug #33960 [DI] Unknown env prefix not recognized as such (ro0NL)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[DI] Unknown env prefix not recognized as such

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

This is a failing test to illustrate the difference between real and fake env vars when using an unknown prefix, followed by the `default` prefix.

```
%env(unknown:default::REAL)%
// Unsupported env var prefix "unknown".

%env(unknown:default::FAKE)%
// null
```

For `default::FAKE` we get `null` at

38b9a27976/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php (L103)

which is then preserved at

38b9a27976/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php (L123)

need inspiration for a patch still :)

Commits
-------

550819a655 [DI] Unknown env prefix not regornized as such
2020-02-04 16:57:32 +01:00
Roland Franssen
550819a655 [DI] Unknown env prefix not regornized as such 2020-02-04 16:57:17 +01:00
Nicolas Grekas
a59ce75722 bug #35342 [DI] Fix support for multiple tags for locators and iterators (Alexandre Parent)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Fix support for multiple tags for locators and iterators

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34462, Fix #35326
| License       | MIT
| Doc PR        | none

Fix PriorityTaggedServiceTrait::findAndSortTaggedServices to work with multiple explicitely tagged services as would be expected by !tagged_locator. Also reorganize PriorityTaggedServiceTrait::findAndSortTaggedServices to be simpler and easier to understand.

Commits
-------

6fc91eb192 [DI] Fix support for multiple tags for locators and iterators
2020-02-04 16:46:39 +01:00
Alexandre Parent
6fc91eb192 [DI] Fix support for multiple tags for locators and iterators 2020-02-04 16:30:04 +01:00
Nicolas Grekas
84d32aca73 bug #33820 [PhpUnitBridge] Fix some errors when using serialized deprecations (l-vo)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[PhpUnitBridge] Fix some errors when using serialized deprecations

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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
| License       | MIT
| Doc PR        | n/a

This PR attempts to fix conflicts that arose in #31478

Creating as a draft for now as I think having separate test methods no longer make sense (`isSelf()` and `isIndirect()` have been replaced with `getType()`). @l-vo please review and confirm I did not loose anything valuable from your original contribution.

Commits
-------

056d59824f [PhpUnitBridge] Fix some errors when using serialized deprecations
2020-02-04 15:16:59 +01:00
Laurent VOULLEMIER
056d59824f [PhpUnitBridge] Fix some errors when using serialized deprecations 2020-02-04 15:16:53 +01:00
Fabien Potencier
3750988c42 bug #35553 Fix HTTP client config handling (julienfalque)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix HTTP client config handling

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

Defining a `key` parameter in the `query` option of a scoped HTTP client triggers an error:
```
Undefined index: value
```
This PR fixes this issue but an edge case still remains with YAML and PHP config. If one wants to define parameters `key=foo`, `value=bar` and nothing else, the query will actually be `foo=bar` instead of `key=foo&value=bar`. Not sure how to fix this case without breaking the tests I added here.

Commits
-------

963d0cce86 Fix HTTP client config handling
2020-02-04 11:40:26 +01:00
Fabien Potencier
eaec5d67ae bug #35588 [ErrorHandler] Escape variable in Exception template (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Escape variable in Exception template

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

Commits
-------

629d21b800 Escape variable in Exception Template
2020-02-04 11:28:16 +01:00
Nicolas Grekas
f312e3cda6 Merge branch '3.4' into 4.4
* 3.4:
  cs fix
2020-02-04 11:21:54 +01:00
Nicolas Grekas
c2e0aab7be cs fix 2020-02-04 10:59:34 +01:00
Jérémy Derussé
629d21b800
Escape variable in Exception Template 2020-02-04 10:53:50 +01:00
Fabien Potencier
03181ee843 minor #35586 Fix CS (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix CS

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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        |  n/a

Commits
-------

de8348a033 Fix CS
2020-02-04 10:33:59 +01:00
Fabien Potencier
de8348a033 Fix CS 2020-02-04 10:32:40 +01:00
Fabien Potencier
3ee39e7468 Merge branch '3.4' into 4.4
* 3.4:
  Fix CS
2020-02-04 10:01:01 +01:00
Fabien Potencier
2e27353a19 minor #35584 Fix CS (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix CS

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- 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

Commits
-------

a3e49f30c7 Fix CS
2020-02-04 09:15:25 +01:00
Fabien Potencier
a3e49f30c7 Fix CS 2020-02-04 09:04:52 +01:00
Fabien Potencier
cb16fe7432 Merge branch '3.4' into 4.4
* 3.4:
  [Translation] Add missing use statement
  [Translation][Debug] Add installation and minimal example to README
  [Validator] try to call __get method if property is uninitialized
  Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-04 08:40:16 +01:00
Fabien Potencier
647a6fe9c6 bug #35583 Add missing use statements (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Add missing use statements

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

Commits
-------

cd27b9d06f Add missing use statements
2020-02-04 08:38:29 +01:00
Fabien Potencier
cd27b9d06f Add missing use statements 2020-02-04 08:35:15 +01:00
Fabien Potencier
ce29631cd8 [Translation] Add missing use statement 2020-02-04 08:22:30 +01:00
Fabien Potencier
45f5564906 bug #35582 Missing use statement 4.4 (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Missing use statement 4.4

| 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       | <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

00baa290e8 [Translation] Add missing use statement
2020-02-04 08:19:53 +01:00
Fabien Potencier
00baa290e8 [Translation] Add missing use statement 2020-02-04 08:15:38 +01:00
Fabien Potencier
28eedb8cef bug #34123 [Form] Fix handling of empty_data's \Closure value in Date/Time form types (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix handling of empty_data's \Closure value in Date/Time form types

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

Basically this would solve the posibility to pass a `\Closure` to the `empty_data` option for Date/Time form types.

> https://symfony.com/doc/current/reference/forms/types/form.html#empty-data
> If a form is compound, you can set empty_data as an array, object or **closure**. See the [How to Configure empty Data](https://symfony.com/doc/current/form/use_empty_data.html) for a Form Class article for more details about these options.

Also related to https://github.com/symfony/symfony/pull/29182

Commits
-------

4939f0e323 Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-03 18:31:42 +01:00
Nicolas Grekas
c29989d69e bug #35537 [Config][XmlReferenceDumper] Prevent potential \TypeError (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config][XmlReferenceDumper] Prevent potential \TypeError

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

`$key` can be null and `setName()` is now typed with `string`. Fallbacking on an empty string restores the behavior (and output) of < 5.0.

However, that shows that's a case we don't handle (yet) properly. But that's another task 😃

Commits
-------

e8ba15ed27 [Config][XmlReferenceDumper] Prevent potential \TypeError
2020-02-03 18:14:20 +01:00
Thomas Calvet
e8ba15ed27 [Config][XmlReferenceDumper] Prevent potential \TypeError 2020-02-03 18:10:04 +01:00
Fabien Potencier
435f4d5403 bug #35227 [Mailer] Fix broken mandrill http send for recipients with names (vilius-g)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead (closes #35227).

Discussion
----------

[Mailer] Fix broken mandrill http send for recipients with names

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

As specified in https://mandrillapp.com/api/docs/messages.JSON.html#method=send-raw, Mandrill API expects array of email addresses for `to` parameter.

Commits
-------

fbfe1ed423 [Mailer] Fix broken mandrill http send for recipients with names
2020-02-03 18:02:27 +01:00
Vilius Grigaliūnas
fbfe1ed423 [Mailer] Fix broken mandrill http send for recipients with names 2020-02-03 18:00:21 +01:00
Fabien Potencier
7dc5d64b37 bug #35430 [Translation] prefer intl domain when adding messages to catalogue (Guite)
This PR was squashed before being merged into the 4.4 branch (closes #35430).

Discussion
----------

[Translation] prefer intl domain when adding messages to catalogue

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

This PR ensures that when adding translations to a catalogue using the `add(array $messages, string $domain = 'messages')` method internally the intl icu domain is checked first.

Otherwise it could happen that existing messages in e.g. `messages+intl-icu` are not updated but the same keys are added to `messages`.

This is a follow-up of #35370, now targeting the `4.4` branch.

Commits
-------

b72b7d3413 [Translation] prefer intl domain when adding messages to catalogue
2020-02-03 17:51:48 +01:00
Guite
b72b7d3413 [Translation] prefer intl domain when adding messages to catalogue 2020-02-03 17:51:41 +01:00
Fabien Potencier
a4544c2571 Fix CS 2020-02-03 17:40:51 +01:00
Fabien Potencier
87c11c2b4f minor #35555 [DX][TwigBridge] Show both missing packages for NotificationMail in the same error message (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[DX][TwigBridge] Show both missing packages for NotificationMail in the same error message

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

I ran `composer req twig` expecting to be ready to use the notification mail feature. After that, it required 2 page refreshes in the browser and 2 composer commands to be ready. This PR merges both missing packages into one error message, to improve developer experience.

Commits
-------

f462285381 Show both missing packages in the same error message
2020-02-03 17:40:04 +01:00
Fabien Potencier
327ee1a956 Fix CS 2020-02-03 17:31:58 +01:00