This PR was squashed before being merged into the 4.3 branch.
Discussion
----------
[VarDumper] notice on potential undefined index
Fix the following issue that can happen (Drupal 8 project for context, with the [Twig vardumper](https://www.drupal.org/project/twig_vardumper) module) :
```
Notice: Undefined index: file in Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider->getContext() (line 55 of /var/www/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php).
```
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | None
| License | MIT
| Doc PR | N/A
Commits
-------
d4c34e00ac [VarDumper] notice on potential undefined index
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead.
Discussion
----------
[Process] add tests for php executable finder if file does not exist
| Q | A
| ------------- | ---
| Branch? | master?
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets |
| License | MIT
| Doc PR |
regarding Process component, I just noticed there is no test covers the case when the PHP binary is not valid so I added the test to make sure it works as expected also it increases the coverage of the process component
Commits
-------
2b62dc3fc5 [Process] add tests for php executable finder if file does not exist
This PR was merged into the 5.0 branch.
Discussion
----------
[DoctrineBridge] Removed legacy checks in DoctrineChoiceLoader
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | ~
| License | MIT
| Doc PR | ~
<!--
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
-------
20d2cca7f0 [DoctrineBridge] Removed legacy checks in DoctrineChoiceLoader
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Make sure we get the correct number of values from redis::mget()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Redis might not be reachable when invoking `redis->mget($ids)`, the call returns `false` instead of an array.
This change makes sure the return value is properly check, including the correctness of the parameters to invoke `array_combine($ids, $cacheValues);`.
From the documentation:
> Returns the combined array, FALSE if the number of elements for each array isn't equal.
Commits
-------
685c36c3d2 [Cache] Make sure we get the correct number of values from redis::mget()
* 4.4: (38 commits)
reset the kernel cache after each test
[HttpKernel] Ability to define multiple kernel.reset tags
[Routing] Continue supporting single colon in object route loaders
[FWBundle] Remove unused parameter
[Intl] [Workflow] fixes English grammar typos
[Filesystem] [Serializer] fixes English grammar typo
mailer: mailchimp bridge is throwing undefined index _id when setting message id in mandrill http transport
has_roles should be is_granted in upgrade files
[HttpClient] Fix early cleanup of pushed HTTP/2 responses
skip test on incompatible PHP versions
[HttpKernel] Don't cache "not-fresh" state
[FrameworkBundle][Cache] Don't deep-merge cache pools configuration
[Messenger] Adding exception to amqp transport in case amqp ext is not installed
[SecurityBundle] Don't require a user provider for the anonymous listener
[Monolog Bridge] Fixed accessing static property as non static.
Improve Symfony description
[Mailer] Add UPGRADE entries about Envelope and MessageEvent
[FrameworkBundle] fix leftover mentioning "secret:" processor
Add DateTimeZoneNormalizer into Dependency Injection
[Messenger] Error when specified default bus is not among the configured
...
* 4.3:
[FWBundle] Remove unused parameter
[Intl] [Workflow] fixes English grammar typos
[Filesystem] [Serializer] fixes English grammar typo
[Messenger] Adding exception to amqp transport in case amqp ext is not installed
[Monolog Bridge] Fixed accessing static property as non static.
Improve Symfony description
Add DateTimeZoneNormalizer into Dependency Injection
[Messenger] Error when specified default bus is not among the configured
[Validator] Add Japanese translation
[Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method
Remove some unused methods parameters
Avoid empty \"If-Modified-Since\" header in validation request
[Security] Fix SwitchUser is broken when the User Provider always returns a valid user
Fix error message according to the new regex
compatibility with DoctrineBundle 2
[Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls
This PR was merged into the 4.4 branch.
Discussion
----------
[Routing] Continue supporting single colon in object route loaders
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/34612
| License | MIT
| Doc PR | -
https://github.com/symfony/symfony/pull/32582#discussion_r304824139 was a bad idea. The new `ObjectLoader` class is used directly on 4.4 since we detagged the old service (and the old one). So we need to support the old notation on it. It changes the exception message but it should be alright.
Commits
-------
3c796e120c [Routing] Continue supporting single colon in object route loaders
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] reset the kernel cache after each test
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
5b5927b93b reset the kernel cache after each test
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
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
This PR was merged into the 5.0 branch.
Discussion
----------
[Security] Changed has_role to is_granted for expression in upgrade 5.0
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 -->
Changes for #34593 that can only be applied on 5.0+
Commits
-------
2f1336e79f has_roles should be is_granted in security upgrade file
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
This PR was merged into the 4.3 branch.
Discussion
----------
[Intl] [Workflow] fixes English grammar typos
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | ~
| License | MIT
| Doc PR | ~
Also related to #34604
Commits
-------
492e1b5afd [Intl] [Workflow] fixes English grammar typos
This PR was merged into the 4.3 branch.
Discussion
----------
[Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34489
| License | MIT
| Doc PR |
Commits
-------
2ff3496d62 [Workflow] Apply the same logic of precedence between the apply() and the buildTransitionBlockerList() method
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
This PR was merged into the 5.0 branch.
Discussion
----------
Drop WebServerBundle directory
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
066babf4fd Drop WebServerBundle directory
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
This PR was squashed before being merged into the 4.3 branch (closes#34575).
Discussion
----------
[Messenger] Adding exception to amqp transport in case amqp ext is not installed
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
While setting up a new dev environment with symfony messenger and rabbitmq i got this error message:
<img width="725" alt="Bildschirmfoto 2019-11-24 um 18 56 23" src="https://user-images.githubusercontent.com/2852185/69499113-26412e80-0eef-11ea-9e40-11528db2afee.png">
i think it would be great to give an explicit pointer in this case.
but not sure though if the place where i added the exception is the right spot or if we should even add a suggest in `composer.json` of the component
new:
<img width="1247" alt="Bildschirmfoto 2019-11-24 um 19 45 08" src="https://user-images.githubusercontent.com/2852185/69499569-b08b9180-0ef3-11ea-9ceb-3936dbd39cb7.png">
Commits
-------
f15e0e6a43 [Messenger] Adding exception to amqp transport in case amqp ext is not installed
This PR was merged into the 5.0 branch.
Discussion
----------
[DoctrineBridge] Fixed cs in DoctrineType
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | ~
| License | MIT
| Doc PR | ~
<!--
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.
-->
My bad, it could have been part of #34571, but I thought it was needed in an older branch.
Commits
-------
e3b2164bdf [DoctrineBridge] Fixed cs in DoctrineType