This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
Simpler example for Apache basic auth workaround
Uses a simpler regex and existing back-reference instead of reading header twice.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | #1813
| License | MIT
Improvement to code documentation, no change to executed code.
Commits
-------
388528da50 Simpler example for Apache basic auth workaround
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix trying to access array offset on value of type int
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
|Tests pass?| yes
| License | MIT
PHP 7.4 throws an error exception when you are trying to access an array by an integer key.
I got this error while I was running a console command:
```
ErrorException: Trying to access array offset on value of type int
at /my/project/vendor/symfony/console/Input/ArrayInput.php:110
Exception trace:
/my/project/vendor/symfony/console/Input/ArrayInput.php:110
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/my/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:179
/my/project/vendor/symfony/console/Command/Command.php:255
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:166
/my/project/vendor/symfony/console/Application.php:934
/my/project/vendor/symfony/console/Application.php:273
/my/project/vendor/symfony/console/Application.php:149
/my/project/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
/my/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
/my/project/artisan:37
```
Commits
-------
069d214210 [Console] Fix trying to access array offset on value of type int
This PR was merged into the 4.3 branch.
Discussion
----------
[Config] Remove extra sprintf arg
| Q | A
| ------------- | ---
| Branch? | 5.0 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | N/A <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | N/A
there is only one placeholder here
(code in previous branches is commented out for 5.0)
Commits
-------
9f19ae185d [Config] Remove extra sprintf arg
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] turn exception into log when the request has no content-type
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted while merging a PR with ext-curl disabled:
```
[Symfony\Component\HttpClient\Exception\TransportException]
fopen(): Content-type not specified assuming application/x-www-form-urlencoded
```
This is now a log.
Commits
-------
4c671a4487 [HttpClient] turn exception into log when the request has no content-type
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Support typehint to deprecated FlattenException in controller
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34661
| License | MIT
| Doc PR |
We should support converting throwable to `FlattenException` with typehint to deprecated class also
Commits
-------
26b4e372dd [HttpKernel] Support typehint to deprecated FlattenException in controller
This PR was merged into the 4.4 branch.
Discussion
----------
Restores preview mode support for Html and Serializer error renderers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34602
| License | MIT
| Doc PR | -
This restores the preview mode support for all error renderers.
Commits
-------
38493b3e4b Add preview mode support for Html and Serializer error renderers
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[FWBundle] Remove error_renderer.serializer if the Serializer isn't available
| 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 | n/a
| License | MIT
| Doc PR | n/a
(Should help for https://github.com/hautelook/AliceBundle/pull/485).
Commits
-------
0b4c21b3d2 [FWBundle] Remove error_renderer.serializer if the Serializer isn't available
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