Commit Graph

45405 Commits

Author SHA1 Message Date
Nicolas Grekas
59b6cfef4c bug #34554 [HttpClient] Fix early cleanup of pushed HTTP/2 responses (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix early cleanup of pushed HTTP/2 responses

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

Commits
-------

0f51da6ec7 [HttpClient] Fix early cleanup of pushed HTTP/2 responses
2019-11-26 10:41:30 +01:00
Nicolas Grekas
127ebeee1f bug #34607 [HttpKernel] Ability to define multiple kernel.reset tags (rmikalkenas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Ability to define multiple kernel.reset tags

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

All info #34606

Commits
-------

6f8dbf1a5f [HttpKernel] Ability to define multiple kernel.reset tags
2019-11-26 10:37:37 +01:00
Rokas Mikalkėnas
6f8dbf1a5f [HttpKernel] Ability to define multiple kernel.reset tags 2019-11-26 10:37:14 +01:00
Fabien Potencier
2dd32b02e9 bug #34599 [Mailer][Mailchimp Bridge] Throwing undefined index _id when setting message id (monteiro)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][Mailchimp Bridge] Throwing undefined index _id when setting message id

| Q             | A
| ------------- | ---
| Branch?       | master for features / 4.4 or 5.0 for bug fixes <!-- 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       | (no ticket created)
| License       | MIT
<!--
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.
-->

When I set the DSN:
`MAILER_DSN=mandrill://KEY@default`

and try to send an email:

```php
$reportEmail = (new Email())
            ->subject('this is a test')
            ->addFrom('test@test.com')
            ->addTo('test-2@test.com')
            ->text('this is just a test.');

$mailer->send($reportEmail);
```

it returns an exception:

<img width="1059" alt="Captura de ecrã 2019-11-25, às 14 31 59" src="https://user-images.githubusercontent.com/74459/69549352-0a8e6480-0f91-11ea-8d6e-ecb1ecb8caa5.png">

Stacktrace:

```
ErrorException:
Notice: Undefined index: _id

  at /Users/mac/Documents/workspace/spotahome/code/opensource/symfony/src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php:64
  at Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillHttpTransport->doSendHttp(object(SentMessage))
     (/Users/mac/Documents/workspace/spotahome/code/opensource/symfony/src/Symfony/Component/Mailer/Transport/AbstractHttpTransport.php:71)
  at Symfony\Component\Mailer\Transport\AbstractHttpTransport->doSend(object(SentMessage))
     (/Users/mac/Documents/workspace/spotahome/code/opensource/symfony/src/Symfony/Component/Mailer/Transport/AbstractTransport.php:71)
  at Symfony\Component\Mailer\Transport\AbstractTransport->send(object(SentMessage), object(DelayedEnvelope))
     (/Users/mac/Documents/workspace/spotahome/code/opensource/symfony/src/Symfony/Component/Mailer/Transport/Transports.php:51)
  at Symfony\Component\Mailer\Transport\Transports->send(object(Email), null)
     (/Users/mac/Documents/workspace/spotahome/code/opensource/symfony/src/Symfony/Component/Mailer/Mailer.php:41)
  at Symfony\Component\Mailer\Mailer->send(object(Email))
     (src/Controller/MailerController.php:20)
  at App\Controller\MailerController->index(object(Mailer))
```

## The fix, how does it work:

According to [documentation](https://mandrillapp.com/api/docs/messages.html), the endpoint `https://mandrillapp.com/api/1.0/messages/send-raw.json` returns an array of results in case of success:

```
[
    {
        "email": "recipient.email@example.com",
        "status": "sent",
        "reject_reason": "hard-bounce",
        "_id": "abc123abc123abc123abc123abc123"
    }
]
```

in case of an error:

```
{
    "status": "error",
    "code": 12,
    "name": "Unknown_Subaccount",
    "message": "No subaccount exists with the id 'customer-123'"
}
```

The fix just sets the right message id.

Commits
-------

fa3f901cf8 mailer: mailchimp bridge is throwing undefined index _id when setting message id in mandrill http transport
2019-11-26 06:03:13 +01:00
Fabien Potencier
dd481a400d minor #34593 [Security] Changed has_role to is_granted for expression in upgrade 4.4 (linaori)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Changed has_role to is_granted for expression in upgrade 4.4

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

A user on slack was looking for a replacement for the `[ROLE1, ROLE2]` notation on `$this->denyAccessUnlessGranted`. After searching for `has_role`, they pointed out that the function has been deprecated as well: 297ac031ee/Core/Authorization/ExpressionLanguageProvider.php (L57-L65)

This PR fixes the upgrade guide to point to the non-deprecated alternative.

Additionally it turns out that the removal of `has_role()` has not been documented in `UPGRADE-5.0.md`

_remake of #34592, there will be another PR for security/CHANGELOG.md in 5.0_

Commits
-------

78ff806b77 has_roles should be is_granted in upgrade files
2019-11-26 06:01:29 +01:00
Hugo Monteiro
fa3f901cf8 mailer: mailchimp bridge is throwing undefined index _id when setting message id in mandrill http transport 2019-11-25 14:55:17 +00:00
Lynn
78ff806b77 has_roles should be is_granted in upgrade files 2019-11-25 15:04:18 +01:00
Grégoire Pineau
0f51da6ec7 [HttpClient] Fix early cleanup of pushed HTTP/2 responses 2019-11-25 13:42:17 +01:00
Fabien Potencier
ec781c927a minor #34583 [DependencyInjection] skip test on incompatible PHP versions (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] skip test on incompatible PHP versions

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

Commits
-------

986cfc6580 skip test on incompatible PHP versions
2019-11-25 11:55:43 +01:00
Christian Flothmann
986cfc6580 skip test on incompatible PHP versions 2019-11-25 11:39:47 +01:00
Fabien Potencier
8f3066f95d bug #34580 [HttpKernel] Don't cache "not-fresh" state (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Don't cache "not-fresh" state

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

Commits
-------

be80db3dc8 [HttpKernel] Don't cache "not-fresh" state
2019-11-25 10:57:36 +01:00
Nicolas Grekas
be80db3dc8 [HttpKernel] Don't cache "not-fresh" state 2019-11-25 10:10:35 +01:00
Fabien Potencier
350e1100d5 bug #34577 [FrameworkBundle][Cache] Don't deep-merge cache pools configuration (alxndrbauer)
This PR was squashed before being merged into the 4.4 branch (closes #34577).

Discussion
----------

[FrameworkBundle][Cache] Don't deep-merge cache pools configuration

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

Prevents deep-merge of cache.pools configuration

Commits
-------

a0d6d30c9f [FrameworkBundle][Cache] Don't deep-merge cache pools configuration
2019-11-25 08:14:59 +01:00
Alexander Bauer
a0d6d30c9f [FrameworkBundle][Cache] Don't deep-merge cache pools configuration 2019-11-25 08:14:53 +01:00
Fabien Potencier
f6c4b67fe3 bug #34515 [DependencyInjection] definitions are valid objects (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] definitions are valid objects

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

Commits
-------

0acaa5cfb3 definitions are valid objects
2019-11-25 08:06:53 +01:00
Fabien Potencier
218eb24197 bug #34536 [SecurityBundle] Don't require a user provider for the anonymous listener (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] Don't require a user provider for the anonymous listener

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

Forgotten when adding the AnonymousFactory in #33503

Commits
-------

0950cfbc65 [SecurityBundle] Don't require a user provider for the anonymous listener
2019-11-25 07:29:03 +01:00
Robin Chalas
0950cfbc65 [SecurityBundle] Don't require a user provider for the anonymous listener 2019-11-24 20:28:56 +01:00
Fabien Potencier
9623414f8b minor #34574 [FrameworkBundle] fix leftover mentioning "secret:" processor (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix leftover mentioning "secret:" processor

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

Commits
-------

f46f3db058 [FrameworkBundle] fix leftover mentioning "secret:" processor
2019-11-24 19:14:59 +01:00
Mickaël
db9754d9fc [Mailer] Add UPGRADE entries about Envelope and MessageEvent 2019-11-24 19:12:58 +01:00
Fabien Potencier
212931e43c minor #34543 Add missing defaultPriorityMethod field in TaggedIteratorArgument (alexandrunastase)
This PR was merged into the 4.4 branch.

Discussion
----------

 Add missing defaultPriorityMethod field in TaggedIteratorArgument

| 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        |  <!-- 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.
-->

#SymfonyHackday

Commits
-------

f5bd421597  Add missing defaultPriorityMethod field in TaggedIteratorArgument
2019-11-24 19:11:43 +01:00
Nicolas Grekas
f46f3db058 [FrameworkBundle] fix leftover mentioning "secret:" processor 2019-11-24 19:10:25 +01:00
Fabien Potencier
6e60fd0113 bug #34502 [FrameworkBundle][ContainerLint] Keep "removing" compiler passes (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][ContainerLint] Keep "removing" compiler passes

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

Removing "removing" compiler passes when debug is off (why only in this case btw?) means that the container is never cleaned (the important thing being the "remove unused definitions" pass), leaving it in a "dirty" state. What is the point of testing a container that is different than the one that will be used anyway? 🤔

Making this truely work btw means that 100% of Symfony's declared services must end up valid whether they are used or not and in all combinations possible. I guess that should be the goal but from what I could test in the last hour, that will be a lot of work. However, there are definitely some fixes to do in our services declarations that we can detect thanks to this "bug".

Commits
-------

59d677182e [FrameworkBundle][ContainerLint] Keep removing compiler passes
2019-11-24 19:08:49 +01:00
Fabien Potencier
0ea13868fa bug #34552 [Dotenv] don't fail when referenced env var does not exist (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Dotenv] don't fail when referenced env var does not exist

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

Commits
-------

8026609dc9 don't fail when referenced env var does not exist
2019-11-24 19:05:55 +01:00
Fabien Potencier
e757512f8f bug #34513 [Validator] remove return type declaration from __sleep() (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] remove return type declaration from __sleep()

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

Commits
-------

bedad35e59 remove return type declaration from __sleep()
2019-11-24 18:43:39 +01:00
Christian Flothmann
8026609dc9 don't fail when referenced env var does not exist 2019-11-23 15:53:46 +01:00
Alexandru Năstase
f5bd421597
Add missing defaultPriorityMethod field in TaggedIteratorArgument 2019-11-23 11:53:09 +01:00
Fabien Potencier
a8a9e69488 bug #34516 [HttpKernel] drop return type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] drop return type declaration

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

The configured memory limit can exceed the range that can be represented
by an integer.

Commits
-------

93685026b0 drop return type declaration
2019-11-22 15:33:57 +01:00
Christian Flothmann
93685026b0 drop return type declaration
The configured memory limit can exceed the range that can be represented
by an integer.
2019-11-22 14:14:59 +01:00
Christian Flothmann
0acaa5cfb3 definitions are valid objects 2019-11-22 13:53:53 +01:00
Christian Flothmann
bedad35e59 remove return type declaration from __sleep() 2019-11-22 13:40:21 +01:00
Thomas Calvet
59d677182e [FrameworkBundle][ContainerLint] Keep removing compiler passes 2019-11-21 23:20:32 +01:00
Samuel ROZE
bfae515d52 bug #34474 [Messenger] Ignore stamps in in-memory transport (tienvx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Ignore stamps in in-memory transport

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

Stamps can be added/removed to/from message during handling. Ignore stamps so that we can ack/reject them correctly.

<!--
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
-------

b435b1aab6 [Messenger] Ignore stamps in in-memory transport
2019-11-21 18:00:24 +01:00
tien.xuan.vo
b435b1aab6 [Messenger] Ignore stamps in in-memory transport 2019-11-21 19:55:17 +07:00
Fabien Potencier
a7fe2b29d2 Bump Symfony version to 4.4.1 2019-11-21 08:13:22 +01:00
Fabien Potencier
625a4dbfda
Merge pull request #34471 from fabpot/release-4.4.0
released v4.4.0
2019-11-21 08:08:41 +01:00
Fabien Potencier
65ec3b47e8 Update VERSION for 4.4.0 2019-11-21 08:08:15 +01:00
Fabien Potencier
90cb32a044 Update CHANGELOG for 4.4.0 2019-11-21 08:07:51 +01:00
Nicolas Grekas
2c1b1bad6e bug #34464 [Form] group constraints when calling the validator (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] group constraints when calling the validator

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

Follow up of https://github.com/symfony/symfony/pull/34081
Spotted during the workshop at SymfonyCon, while trying to fix deprecation notices on symfony-demo:
the Form component currently passes constraints one by one for validation, effectively preventing the validator from taking care of cross-constraints dependencies.

This PR fixes it.

This will prevent ppl from having to fix things like
> Using the "Symfony\Component\Validator\Constraints\Length" constraint with the "min" option without setting the "allowEmptyString" one is deprecated and defaults to true. In 5.0, it will become optional and default to false.

Commits
-------

d15f77f33e [Form] group constraints when calling the validator
2019-11-21 08:01:17 +01:00
Nicolas Grekas
698cc6bb3b [Routing] fix tests 2019-11-20 14:44:34 +01:00
Nicolas Grekas
6f110581df Merge branch '4.3' into 4.4
* 4.3:
  [DependencyInjection] Fix dumping multiple deprecated aliases
2019-11-20 14:27:43 +01:00
Nicolas Grekas
1b2651cefd minor #34433 Remove wrong @group legacy annotations (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove wrong @group legacy annotations

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

These annotations are still found on branch 5.0.
Does this mean they are wrong? Why don't they make 5.0 fail if not?

Commits
-------

8d84ac34a5 Remove wrong @group legacy annotations
2019-11-20 14:26:58 +01:00
Nicolas Grekas
d15f77f33e [Form] group constraints when calling the validator 2019-11-20 13:58:23 +01:00
Nicolas Grekas
8d84ac34a5 Remove wrong @group legacy annotations 2019-11-20 11:44:55 +01:00
Fabien Potencier
996d8a708f bug #34451 [DependencyInjection] Fix dumping multiple deprecated aliases (shyim)
This PR was merged into the 4.3 branch.

Discussion
----------

[DependencyInjection] Fix dumping multiple deprecated aliases

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

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

Commits
-------

60b0dae174 [DependencyInjection] Fix dumping multiple deprecated aliases
2019-11-20 06:36:40 +01:00
Soner Sayakci
60b0dae174
[DependencyInjection] Fix dumping multiple deprecated aliases 2019-11-19 16:12:52 +01:00
Nicolas Grekas
12f00e3e15 Merge branch '4.3' into 4.4
* 4.3:
  allow button names to start with uppercase letter
2019-11-19 13:20:06 +01:00
Fabien Potencier
a7c66dbfb3 bug #34448 [Form] allow button names to start with uppercase letter (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] allow button names to start with uppercase letter

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

Commits
-------

d811b0e9b5 allow button names to start with uppercase letter
2019-11-19 10:59:07 +01:00
Christian Flothmann
d811b0e9b5 allow button names to start with uppercase letter 2019-11-19 08:55:12 +01:00
Fabien Potencier
bf8e444c2b minor #34435 States that the HttpClient provides a Http Async implementation (Taluu)
This PR was merged into the 4.4 branch.

Discussion
----------

States that the HttpClient provides a Http Async implementation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no (not really)
| New feature?  | no (not really)
| Deprecations? | no
| Tickets       | ~
| License       | MIT
| Doc PR        | ~

Add in the composer.json of the HttpClient that it now provides an implementation for the `php-http/async-client-implementation` virtual package, as @Nyholm did the implementation on the HttpPlug bridge in #33743.

Commits
-------

8a460cefef States that the HttpClient provides a Http Async implementation
2019-11-19 06:46:23 +01:00
Baptiste Clavié
8a460cefef
States that the HttpClient provides a Http Async implementation 2019-11-18 13:47:27 +01:00