This PR was merged into the 3.4 branch.
Discussion
----------
PHPUnit's assertContains() performs strict comparisons
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #37564
| License | MIT
| Doc PR | N/A
In PHPUnit 9.3, `assertContains()` performs a strict comparison which causes a few test failures in our test suite. This PR should fix them.
Commits
-------
9f4dec59a4 PHPUnit's assertContains() performs strict comparisons now.
This PR was merged into the 3.4 branch.
Discussion
----------
[ClassLoader][Routing] Fix namespace parsing on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
The way namespace declarations are parsed has changed in php 8 (see php/php-src#5827). This PR should fix the corresponding issues in the ClassLoader and Routing components.
Note that Doctrine Annotations suffers from the same issue (doctrine/annotations#339). I had to run the Routing tests locally with doctrine/annotations#344 applied.
Commits
-------
3d293b298f [ClassLoader][Routing] Fix namespace parsing on php 8.
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] added telegram options
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| License | MIT
I have added `TelegramOptions` model for sending a telegram message with options like the example I have used `SlackOptions`.
Testing notes:
1) Create telegram bot https://core.telegram.org/bots#creating-a-new-bot
2) Open telegram and join to the created chat
3) Send a message to telegram
for testing, I used the scripts
[scripts.zip](https://github.com/symfony/symfony/files/4499901/scripts.zip)
Commits
-------
3ba8d8f135 [Notifier] added telegram options
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Validator] Add missing translations for german and vietnamese
| 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 -->
| 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/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
-------
f4bd34a1a8 [Validator] Add missing translations for german and vietnamese
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Add days before expiration in "about" command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (with RFC)
| Deprecations? | no
| Tickets | Slack discussion + see RFC below
| License | MIT
| Doc PR |
Maybe this can be usefull in the `bin/console about` output.
Following a small discussion on Slack
<details>
<summary>See discussion </summary>
<img width="910" alt="sf_slack" src="https://user-images.githubusercontent.com/13205768/89516646-029dea00-d7d9-11ea-8ff5-eed5ae72fc77.png">
</details>
---
Symfony 5.1 output:
<img width="681" alt="sf51" src="https://user-images.githubusercontent.com/13205768/89515902-067d3c80-d7d8-11ea-8676-1f90dd0a3418.png">
---
Symfony 5.foo_bar output:
With:
```php
// symfony/http-kernel/Kernel.php
const END_OF_MAINTENANCE = '08/2020'; // this month
const END_OF_LIFE = '09/2020'; // next month
```
<img width="680" alt="sf51_fake" src="https://user-images.githubusercontent.com/13205768/89516056-375d7180-d7d8-11ea-9345-83db200a693d.png">
---
## RFC
Is there a way in Symfony land packages to have such info or/and in Composer in general? the EOL of a package version.
Like for example the https://github.com/FriendsOfPHP/security-advisories `Security Advisories` feature,
but for `End Of Life Advisories` where packages maintainers can add their packages, and this data can be read by `composer` or an other command
~Or maybe directly inside the `composer.json`, like an `"eol": "true"` // and `false` by default if not defined~ (not possible)
Thanks
Commits
-------
0b0a1f6f8e Add days before expiration in "about" command
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Make sure we pass a numeric array of arguments to call_user_func_array()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
On php 8, the unit tests fail with the following error:
```
ArgumentCountError: array_merge() does not accept unknown named parameters
```
This PR should fix the issue.
Commits
-------
67102c32e6 [Console] Make sure we pass a numeric array of arguments to call_user_func_array().
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Modernized deprecated PHPUnit assertion calls
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #37564
| License | MIT
| Doc PR | N/A
Some assertions have been renamed in PHPUnit 9. PhpUnitBridge should already have polyfills in place for those methods, so it should be save to use them.
Commits
-------
ab417f7040 Modernized deprecated PHPUnit assertion calls
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] The message of "class not found" errors has changed in php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
The error message that php emits if an unknown class is accessed has changed in php 8. Two tests were failing because of this. But since those tests weren't really about missing classes, I tried to find a more resilient way to implement them.
Commits
-------
8bd861bbc6 [Console] The message of "class not found" errors has changed in php 8.
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
Remove outdated references from base_js.html.twig file
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? |no
| Deprecations? | no
| License | MIT
It looks like TwigBundle/Resources/views/base_js.html.twig file has been removed.
Commits
-------
65fe98ec66 Remove outdated references from base_js.html.twig file
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Change notifier recipient handling
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#35558 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | tbd.
According to @wouterj's reasoning in #35558 I did the following to merge the `AdminRecipient` with the `Recipient` class:
- introduced a `EmailRecipientInterface` with `getEmail(): string` methods
- introduced a `RecipientInterface` that is extended by `EmailRecipientInterface` and `SmsRecipientInterface`
- changed `Recipient` class which now holds an email and a phone number property and implements the `EmailRecipientInterface` and the `SmsRecipientInterface`
- changed `NoRecipient` class which now implements the `RecipientInterface`
- removed the `AdminRecipient` and fixed all related type-hints
- introduced an `EmailRecipient` and `SmsRecipient`
- changed the type-hint of the `$recipient` argument in `NotifierInterface::send()`, `Notifier::getChannels()`, `ChannelInterface::notifiy()` and `ChannelInterface::supports()` to `RecipientInterface`
- changed the type hint of the `$recipient` argument in the `as*Message()` of the `EmailNotificationInterface` and `SmsNotificationInterface` which now uses the introduced interfaces
- changed the type hint of the `$recipient` argument in the static `fromNotification()` factory methods in `EmailMessage` and `SmsMessage` which now uses the introduced interfaces
- changed `EmailChannel` to only support recipients which implement the `EmailRecipientInterface`
- changed `SmsChannel` only supports recipients which implement the `SmsRecipientInterface`
Commits
-------
588607bdd1 [Notifier] Change notifier recipient handling
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] add EventSourceHttpClient to consume Server-Sent Events
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | na
| License | MIT
| Doc PR | symfony/symfony-docs#...
<details>
<summary>First implementation</summary>
This patch implements the [w3c Server-Sent Events specification](https://www.w3.org/TR/eventsource/#eventsource) on top of symfony's http client. It provides an `EventSource` class that allows you to interact of server sent events.
Comparing to the Javascript implementation, we won't be able to use the same API. Indeed, in php listeners need to be setup before we connect to the HTTP stream.
I'm not fond of adding a dependency to EventDispatcher from HTTP Client, therefore I'm all ears if you have better solutions.
About event parsing, I wanted to avoid using regular expression and it uses smart data split. Note that I had to concatenate an internal buffer and only handle the data when a newline is found to cover long chunks. This is an alternative to this [react php eventsource](https://github.com/clue/reactphp-eventsource). Note that this implementation is closer to the specification in some cases that are still to be covered by tests (`retry`, `data:value` without space after colon is valid etc.).
</details>
This is an implementation of the [Server-Sent Events specification](https://html.spec.whatwg.org/multipage/server-sent-events.html) based on symfony's HTTP Client. After a few suggestions on the first implementation (see details above), I've implemented a chunk generator with this kind of API:
```php
$client = new EventSourceHttpClient($client, 10);
$source = $client->connect('GET', "http://localhost:8080/events");
while($source) {
foreach ($client->stream($source, 2) as $r => $chunk) {
if ($chunk->isTimeout()) {
dump([
'timeout' => [
'retry' => 1 + count($r->getInfo('previous_info') ?? [])
],
]);
continue;
}
if ($chunk->isLast()) {
dump([
'eof' => [
'retries' => count($r->getInfo('previous_info') ?? [])
],
]);
$source = null;
return;
}
dump($chunk);
}
}
```
TODO:
- [x] validate implementation (~~don't use EventDispatcher ?~~, need to be implemented as `stream` instead of `message`)
- [x] default timeout value
- [x] implement retry/reconnection
- [x] tests (do test with super long chunk, retry, bad http content-type response)
- [ ] update changelog
- [ ] document
Commits
-------
12ccca3cd4 [HttpClient] add EventSourceHttpClient to consume Server-Sent Events
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Fix SentMessage implementation
| Q | A
| ------------- | ---
| Branch? | master
| 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 #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
#36611 broke the Notifier when used with Messenger.
/cc @jeremyFreeAgent
Commits
-------
92c28de41b [Notifier] Fix SentMessage implementation
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Make Freemobile config more flexible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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 #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
As Freemobile only supports French phone numbers, let's support French numbers without the international code.
Commits
-------
4dfde6ae7c [Notifier] Make Freemobile config more flexible
* 5.1:
fail properly when the required service is not defined
Fix typo
[Finder] Fix GitIgnore parser when dealing with (sub)directories and take order of lines into account
Update UPGRADE-5.0.md
Added the missing reset tag to mailer.logger_message_listener
Fix invalid option sslmode
Updated README for the Mailer component
fix error with custom function and web profiler routing tab
* 4.4:
fail properly when the required service is not defined
Fix typo
[Finder] Fix GitIgnore parser when dealing with (sub)directories and take order of lines into account
Update UPGRADE-5.0.md
Added the missing reset tag to mailer.logger_message_listener
Updated README for the Mailer component
fix error with custom function and web profiler routing tab
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Serializer] Fix that it will never reach DOMNode
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
| Doc PR |
When providing the DOMNode object, the is_object check will return true. This way it will never reach the DOMNode check.
So i moved this check to above the is_object check.
Commits
-------
38787ac785 [Serializer] Fix that it will never reach DOMNode
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] class Security implements AuthorizationCheckerInterface
The class has the method of AuthorizationCheckerInterface already.
| 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 | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | <!-- required for new features -->
The class Security has the method for interface AuthorizationCheckerInterface already. By implementing the interface, Security can be passed to methods typehinted with AuthorizationCheckerInterface.
Commits
-------
cea6ebda5b [Security] class Security implements AuthorizationCheckerInterface
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Messenger] add redeliveredAt in RedeliveryStamp construct
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
---
this would allows one to correctly unserialize a RedeliveryStamp with a custom serializer not using the php serialize function
Commits
-------
64d26836da [Messenger] add redeliveredAt in RedeliveryStamp construct
This PR was merged into the 5.2-dev branch.
Discussion
----------
[EventDispatcher] Minor: Avoid not needed null check in dispatch()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
| Doc PR | -
Just found a not needed null check in the heavyly called EventDispatcher::dispatch() method - the $eventName get's always a string now - no null anymore, as it gets the class name instead.
Commits
-------
0d36c11f28 [EventDispatcher] Avoid not needed null check in dispatch()
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator] Add Isin validator constraint
Co-Authored-By: Yannis Foucher <33806646+YaFou@users.noreply.github.com>
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#36362
| License | MIT
| Doc PR | symfony/symfony-docs#13960
Rebase of https://github.com/symfony/symfony/pull/36368
I asked him by mail and he didn't have time to finish the PR and allowed me to do it.
Commits
-------
8e1ffc8b99 Feature #36362 add Isin validator constraint
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Mailer] Prevent MessageLoggerListener from leaking in env=prod
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| License | MIT
I was trying to send a batch of emails with `--env=prod` when I noticed that `MessageLoggerListener` was still collecting all the messages and leaking the memory. I tried to do `$this->getApplication()->reset()`, but it didn't work because `MessageLoggerListener` was not tagged (now fixed in #37705).
In this PR I propose to move the declaration of `MessageLoggerListener` to `mailer_debug.php` since the only service depending on it is `mailer.data_collector` from `mailer_debug.php`. If a developer needs to collect sent emails, a custom listener could be implemented on the project side.
- [x] deprecate the service
- [x] add a new one to `mailer_debug.php`
- [ ] add a line to CHANGELOG.md
- [ ] add a line to UPGRADE-5.2.md
Commits
-------
e226775d97 [Mailer] Prevent MessageLoggerListener from leaking in env=prod
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] fix saving no-expiry items with ArrayAdapter
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37667
| License | MIT
| Doc PR |
0 is a special value that means "infinity".
Commits
-------
bdec105a72 [Cache] Fix#37667
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[DependencyInjection] Resolve parameters in tag arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#35337
| License | MIT
| Doc PR | None, yet, will follow if this is accepted
Arguably this could be a BC break if people are actively relying on parameters not being resolved in tag parameters, although I can't come up with a sensible use case for that scenario.
Commits
-------
3dba1fe7bf [DependencyInjection] Resolve parameters in tag arguments
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Console] added info method to symfony style
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
It would be nice to have an info method as part of the SymfonyStyle class. This would prevent having to use the \<INFO\> tag, and it is consistent with other methods like warning and error (similar to the types available in monolog)
Commits
-------
4cf1a1e8e6 fixed docblock
204cd739d3 added info method to symfony style
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Deprecate some public services to private
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | -
Now that we can deprecate public services to private, here is a first pass on the FWB. I think all those services don't need to be public, ie we never need to access them directly in Symfony's code (except in some tests that I had to modify accordingly). I think most of theses services needed to be public before we hooked the AbstractController with a service subscriber. There are definitely more of them that can be deprecated (ie: created workflows and state machines are public but don't need to be ?) but let's start with the easy ones.
Commits
-------
87868baacb [FrameworkBundle] Deprecate some public services to private
This PR was merged into the 5.2-dev branch.
Discussion
----------
Added a FrenchInflector for the String component
I read in [this blog post](https://symfony.com/blog/new-in-symfony-5-1-deprecated-the-inflector-component) this sentence
> Symfony Inflector component converts words between their singular and plural forms (**for now, only in English**)
So I created a FrenchInflector class implementing the InflectorInterface from the String component. This inflector uses regular expressions and it is tested in the FrenchInflectorTest with a lot of the french exceptions.
| Q | A
| ------------- | ---
| Branch | master
| Bug fix | no
| New feature | yes
| Deprecations | no
| License | MIT
| Doc PR | Not yet
Changelog has been updated, but I'm not sure I did it in the good paragraph.
I don't know if I should update the symfony/symfony-docs, but I have created an example and I could create a PR with it, if you want.
```php
<?php
use Symfony\Component\String\Inflector\FrenchInflector;
$inflector = new FrenchInflector();
$result = $inflector->singularize('dents'); // ['dent']
$result = $inflector->singularize('souris'); // ['souris']
$result = $inflector->singularize('messieurs'); // ['monsieur']
$result = $inflector->pluralize('cinquante'); // ['cinquante']
$result = $inflector->pluralize('pou'); // ['poux']
$result = $inflector->pluralize('cheval'); // ['chevaux']
```
**fabbot.io** is detecting a typo, but this is not. The patch done by fabpot suggests to replace the french 'embarras' word by 'embarrass'. I shall not remove or replace it, because "embarras" is an invariant word.
Commits
-------
d903d9a757 Added a FrenchInflector for the String component French inflector implements InflectorInterface, it uses regexp and it is tested in the FrenchInflectorTest
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Fix error with custom function and web profiler routing tab
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36985
| License | MIT
| Doc PR | no
Here is a simple solution for #36985 as it only concerns WebProfilerBundle.
Due to the limitation in the routing tab as explained in the footnote, the route in my repo did not match in profiler (no query string in the new context) but there is no more syntax error.
Commits
-------
b35c81becb fix error with custom function and web profiler routing tab
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Add the name of the env to RuntimeException
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR
if you have the name of the env in the exception message it is much easier to find the error
from -> https://github.com/symfony/dependency-injection/pull/20
Commits
-------
00ab757cbb Add the name of the env to RuntimeException
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Updated README for the Mailer component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#13945
I think it's worth adding a second example showcasing the twig integration for 2 reasons:
* If you're used to use this component in the framework, I think it's likely you want Twig integration in standalone apps.
* The integration actually lives in `symfony/twig-bridge`, it won't be very easy to catch while reading the component code - unless you're very comfortable with the Symfony architecture.
Commits
-------
696560c690 Updated README for the Mailer component
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Finder] Fix GitIgnore parser when dealing with (sub)directories and take order of lines into account
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/issues/37424
| License | MIT
The new regex is made per positive `.gitignore` line. Which is a match group followed by a negative lookbehind with all the negations that were on lines after that line. This also fixes some other bugs that didn't match the `.gitignore` spec and two incorrect tests. I think it's likely that there are more edge cases this PR may not cover, but I haven't found them yet.
See the issue for more info.
Commits
-------
609dcf6b08 [Finder] Fix GitIgnore parser when dealing with (sub)directories and take order of lines into account
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] Use NullToken while checking authorization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37523
| License | MIT
| Doc PR | tbd
This allows voters to grant access to unauthenticated users. E.g. some objects can be viewed by anyone, in this case the voter has to be able to grant access to unauthenticated users.
This *does break* the interface PHPdoc of `TokenInterface`: `getUser()` returns `null` instead of `string|UserInterface`. This is only true when using the new system, so not a real BC break. I think the only thing we can do to "guide" users is to add some custom handling for type errors related to `null` and `UserInterface` methods ("Did you forgot to check for `null` in the Voter?"). Is this something I should add to this PR?
Commits
-------
e37091541c Use NullToken while checking authorization
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Router] allow to use \A and \z as regex start and end
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | —
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Some people are using `\A` and `\z` as alternative for `^` and `$` for route requirements.
E.g.: UUID pattern in ramsey/uuid (many routes broke after updating the lib):
569e93ac4e (diff-23c8536f7d61e7d839fd1c93ce0dd354L30-R31)
References:
https://www.rexegg.com/regex-anchors.html#Ahttps://www.rexegg.com/regex-anchors.html#z
P.S.: It is my first PR into Symfony. Maybe I should fix something, just let me know.
Commits
-------
f752eeeaa6 [Router] allow to use \A and \z as regex start and end
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Fix invalid option sslmode in AmazonSqs bridge
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | />
| License | MIT
| Doc PR | /
The sslmode option allows people to use AmazonSqs with non-offical endpoint like the [asyncaws/testing-sqs](https://hub.docker.com/r/asyncaws/testing-sqs) docker image
By fixing precedence of DNS options in https://github.com/symfony/symfony/pull/37269 I introduced a bug that trigger an exception `Unknown option found: [sslmode]`. I apologize for this
This PR adds `sslmode` in list of allowed options
Commits
-------
afbd51b368 Fix invalid option sslmode
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Update StopwatchPeriod.php
Adding `__toString()`, analogous to [`StopwatchEvent`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Stopwatch/StopwatchEvent.php#L242)
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | none
Commits
-------
d3c2911f46 Update StopwatchPeriod.php
This PR was merged into the 5.2-dev branch.
Discussion
----------
Fix getTranslationNodeVisitor() return type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37686
| License | MIT
| Doc PR | -
When constructing the `TranslationExtension` with any `NodeVisitorInterface` other than `TranslationNodeVisitor`, you will get a type error when calling `getTranslationNodeVisitor()`. This PR fixes that by extracting a new `TranslationNodeVisitorInterface`.
Commits
-------
c1344257f1 Fix getTranslationNodeVisitor() return type
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Routing] Allow inline definition of requirements and defaults for host
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/14007
This PR extends the support of inline routing requirements and defaults to the host part, which can also contain parameters.
Commits
-------
1501476d52 [Routing] Allow inline definition of requirements and defaults for host
* 5.1:
reduce column length for MySQL 5.6 compatibility
Minor improvement
Removed redundant strtolower in ConsumeMessagesCommand
getContainer cannot return null anymore
HttpClient profiler error
Fix RedisStore constructor signature
Bump Symfony version to 5.1.4
Update VERSION for 5.1.3
Update CHANGELOG for 5.1.3
Bump Symfony version to 4.4.12
Update VERSION for 4.4.11
Update CHANGELOG for 4.4.11
Bump Symfony version to 3.4.44
updated VERSION for 3.4.43
update CONTRIBUTORS for 3.4.43
updated CHANGELOG for 3.4.43
Fix author for class CachePoolClearerCacheWarmer
This PR was merged into the 5.1 branch.
Discussion
----------
Fix author for class CachePoolClearerCacheWarmer
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/pull/35109#discussion_r363985644
| License | MIT
| Doc PR | symfony/symfony-docs#...
Commits
-------
b3d0812976 Fix author for class CachePoolClearerCacheWarmer
* 4.4:
reduce column length for MySQL 5.6 compatibility
Minor improvement
Removed redundant strtolower in ConsumeMessagesCommand
Fix RedisStore constructor signature
Bump Symfony version to 4.4.12
Update VERSION for 4.4.11
Update CHANGELOG for 4.4.11
Bump Symfony version to 3.4.44
updated VERSION for 3.4.43
update CONTRIBUTORS for 3.4.43
updated CHANGELOG for 3.4.43
This PR was merged into the 5.1 branch.
Discussion
----------
HttpClient profiler error
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix
| License | MIT
| Doc PR | symfony/symfony-docs
When no error occurs making http request, the span was red, it is wierd
Commits
-------
5199f1f9f3 HttpClient profiler error
This PR was merged into the 4.4 branch.
Discussion
----------
Allows RedisClusterProxy instance in Lock RedisStore
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37476
| License | MIT
| Doc PR | /
This PR allow clients instance of RedisClusterProxy created by the StoreFactory in #28691 /cc @nicolas-grekas
Commits
-------
8ef63cd6bc Allows RedisClusterProxy instance in Lock RedisStore
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] Fix bad testRetryTransportError in AsyncDecoratorTraitTest
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Issues in the test:
1. `TransportExceptionInterface` is not `use`d (imported)
2. The catch block will not be executed (even the above 1 is fixed) because
the exception (of `chunked-broken`) will be thrown only when `getContent()` is called
The header is OK, status is 200, and we only asserted `getStatusCode()`
So this test made no sense.
Commits
-------
585536a688 [HttpClient] Fix bad testRetryTransportError in AsyncDecoratorTraitTest
This PR was merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge] Bump doctrine/data-fixtures
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Discovered while working on #37639: DoctrineBridge is locked to an old an unmaintained branch of `doctrine/data-fixtures`. This is going to be a problem as soon as we want to support `doctrine/persistence` 2.
Commits
-------
4b611015d5 [DoctrineBridge] Bump doctrine/data-fixtures.
* 5.1:
Connect to RedisCluster with password auth
Fix PHPUnit 8.5 deprecations.
Fix EmailHeaderSame to make use of decoded value
Allow same middleware to be used multiple times with different arguments
* 5.0:
Connect to RedisCluster with password auth
Fix PHPUnit 8.5 deprecations.
Fix EmailHeaderSame to make use of decoded value
Allow same middleware to be used multiple times with different arguments
* 4.4:
Connect to RedisCluster with password auth
Fix PHPUnit 8.5 deprecations.
Fix EmailHeaderSame to make use of decoded value
Allow same middleware to be used multiple times with different arguments
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Fix EmailHeaderSame to make use of decoded value
Fixes#35062
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? |no
| Deprecations? | no
| Tickets | Fix#35062
| License | MIT
Commits
-------
8a3f50746d Fix EmailHeaderSame to make use of decoded value
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Allow same middleware to be used multiple times with different arguments
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37568
| License | MIT
| Doc PR | -
Middleware service names now take into account arguments as well to allow the same middleware to be used multiple times with different arguments:
```yaml
framework:
messenger:
buses:
messenger.bus.default:
middleware:
- doctrine_ping_connection: ['main']
- doctrine_ping_connection: ['logs']
```
Commits
-------
d10e43d085 Allow same middleware to be used multiple times with different arguments
* 5.1:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Removed @internal from Composite
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Messenger] fix ignore account & endpoint options amazon sqs connection
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 5.0:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 4.4:
fix merge
Require PHPUnit 9.3 on PHP 8
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[Serializer] Support multiple levels of discriminator mapping
Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
[SCA] Minor fixes on tests
[WebProfilerBundle] modified url generation to use absolute urls
[Mailer] Fix reply-to functionality in the SendgridApiTransport
[Mime] Fix compat with HTTP requests
ticket_36879 - Fix mandrill raw http request setting from email/name
* 3.4:
[Cache] fix catching auth errors
Fix CS
[FrameworkBundle] set default session.handler alias if handler_id is not provided
Fix CS
Readability update
Fix checks for phpunit releases on Composer 2 (resolves#37601)
[SCA] Minor fixes on tests
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
Require PHPUnit 9.3 on PHP 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
The first version of PHPUnit to support PHP 8.0 is PHPUnit 9.3.
---
Depends on https://github.com/symfony/symfony/pull/37607. Related to https://github.com/composer/composer/pull/9054.
Commits
-------
54b13c04c9 Require PHPUnit 9.3 on PHP 8
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] fix ignored account & endpoint options amazon sqs connection
| Q | A
| ------------- | ---
| Branch? | 5.1<!-- 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 | Fix#37598 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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/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
-------
fc90a3b7c6 [Messenger] fix ignore account & endpoint options amazon sqs connection
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] set default session.handler alias if handler_id is not provided
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37245
| License | MIT
| Doc PR |
Without a configured [`handler_id`](https://symfony.com/doc/current/session.html#configuration), the `session.handler` alias is not created, and somes services depend on this alias specialy.
Related to the reported issue above (affected version 4.4.9), the `ServiceHandlerInterface` is an alias of `session.handler`, when execute :
- `bin/console debug:container session.handler` : The alias is not defined, so the `ContainerDebugCommand` look for a service containing the `session.handler` as part of his name (ContainerDebugCommand::findServiceIdsContaining() is called and returns by default `session.handler.native_file`)
- `bin/console debug:container SessionHandlerInterface` : The service is defined as an alias of `session.handler`, when calling `ContainerBuilder::getDefinition('session.handler')` the exception occured as the alias is not defined.
# Implemented solution
Create a default `session.handler` when the param `handler_id` is not provided (I choosed `session.handler.native_file` rather than `NullSessionHandler`).
# Affected versions
From [`3.4`](https://github.com/symfony/framework-bundle/blob/3.4/DependencyInjection/FrameworkExtension.php#L879) to [`5.1`](https://github.com/symfony/framework-bundle/blob/5.1/DependencyInjection/FrameworkExtension.php#L955)
Commits
-------
46c8c3791b [FrameworkBundle] set default session.handler alias if handler_id is not provided
This PR was merged into the 3.4 branch.
Discussion
----------
Fix checks for phpunit releases on Composer 2
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37601
| License | MIT
| Doc PR | n/a
`simple-phpunit` has a core assumption that any version of PHPUnit without a stable release will only have one dev version returned by Composer. Per https://github.com/symfony/symfony/issues/37601, it's possible for Composer 2 to list **more than one dev version**. This breaks that assumption and therefore prevents the installation of 9.3.* ([which is needed for testing on PHP 8](https://github.com/sebastianbergmann/phpunit/pull/4374#issuecomment-657029594)).
The fix implemented here is to remove any versions containing `dev-` or `-dev` from the list of possible versions to see if any stable versions remain.
Commits
-------
2bb3f08fba Fix checks for phpunit releases on Composer 2 (resolves#37601)
The password was already hidden in POST parameters, but still remained visible in raw content
[HttpKernel] added password hiding in request data collector raw content
The password was already hidden in POST parameters, but still remained visible in raw content
[HttpKernel] added password hiding in request data collector raw content
The password was already hidden in POST parameters, but still remained visible in raw content
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[PhpUnitBridge] Polyfill new phpunit 9.1 assertions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37320
| License | MIT
| Doc PR | n/a
This PR adds the following new assertions that was added to PhpUnit 9.1:
- Implement **`assertIsNotReadable()`** as alternative for `assertNotIsReadable()`
- Implement **`assertIsNotWritable()`** as alternative for `assertNotIsWritable()`
- Implement **`assertDirectoryDoesNotExist()`** as alternative for `assertDirectoryNotExists()`
- Implement **`assertDirectoryIsNotReadable()`** as alternative for `assertDirectoryNotIsReadable()`
- Implement **`assertDirectoryIsNotWritable()`** as alternative for `assertDirectoryNotIsWritable()`
- Implement **`assertFileDoesNotExist()`** as alternative for `assertFileNotExists()`
- Implement **`assertFileIsNotReadable()`** as alternative for `assertFileNotIsReadable()`
- Implement **`assertFileIsNotWritable()`** as alternative for `assertFileNotIsWritable()`
- Implement **`assertMatchesRegularExpression()`** as alternative for `assertRegExp()`
- Implement **`assertDoesNotMatchRegularExpression()`** as alternative for `assertNotRegExp()`
Commits
-------
51c0bf0d0d [PhpUnitBridge] Polyfill new phpunit 9.1 assertions
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Fix mandrill raw http request setting from email/name
| Q | A
| ------------- | ---
| Branch? | 4.4, 5.0, 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36879
| License | MIT
| Doc PR | None
As describe in https://github.com/symfony/symfony/issues/36879 there is a bug in sending raw http request to mandrill it will not set from email/name correct.
As you can see i make sure to set `from_email` and `from_name` correct now and changed the unit test to check correct you can see the doc that the format is correct https://mandrillapp.com/api/docs/messages.curl.html#method-send-raw
Commits
-------
6128dd0b75 ticket_36879 - Fix mandrill raw http request setting from email/name
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpFoundation] Added File::getContent()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
---
This is a very simple PR but I think it increases the DX when working
with uploaded files: I looked at for this method and I did not found it.
So I had to check witch method returns the "pathname" or to remember I
can cast the object to string to get its pathname.
It's a small detail, but IMHO it's better with it.
About file_get_contents vs stream: let's be simple here. If one want a
stream, they can use the code they always used for it :)
Commits
-------
50d5167a66 [HttpFoundation] Added File::getContent()
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Mailer] Fix reply-to functionality in the SendgridApiTransport
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
When sending a message using the `SendgridApiTransport`, the reply-to address was being ignored. In other transports, the reply to can be set using headers, but SendGrid requires that certain fields be added explicitly to the API payload. This is already handled for From, To, Cc, Bcc, and Subject, but was not handled for Reply-To. This change extracts the reply to address from the `Email` object and adds it to the payload.
Note that the `Email` object allows for multiple Reply-To addresses, but SendGrid only supports a single one, so I am just using the first element of the array.
I also fixed a link in a comment to SendGrid's documentation explaining the reserved headers that are not allowed.
Commits
-------
2cf25d1055 [Mailer] Fix reply-to functionality in the SendgridApiTransport
* 5.1:
[DependencyInjection][Config] Use several placeholder unique prefixes for dynamic placeholder values
[Mime] Keep Sender full address when used by non-SMTP transports
Update MimeTypes.php
* 5.0:
[DependencyInjection][Config] Use several placeholder unique prefixes for dynamic placeholder values
[Mime] Keep Sender full address when used by non-SMTP transports
Update MimeTypes.php
* 4.4:
[DependencyInjection][Config] Use several placeholder unique prefixes for dynamic placeholder values
[Mime] Keep Sender full address when used by non-SMTP transports
Update MimeTypes.php
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Keep Sender full address when used by non-SMTP transports
| 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 #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
refs #36178
The `Envelope` is an SMTP concept. The Sender is used in the `MAIL FROM` SMTP command, where only an address is supported. But we are also supporting non-SMTP transports, where the Sender might also be used as the `From` header, where a full mailbox is supported.
To take into account the 2 usages, this PR keeps the full mailbox in the Envelope and let the SMTP class only use the address (which was already the case anyway).
Commits
-------
1ca9be77aa [Mime] Keep Sender full address when used by non-SMTP transports
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Mime] switching source of mime types from Apache to "MIME-db"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37412
| License | MIT
| Doc PR | no
Commits
-------
ebea452f57 [Mime] switching source of mime types from Apache to "MIME-db"
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Remove some magic from TypeValidator logic and OptionsResolver type verify logic
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
Following discussion on https://twitter.com/Ocramius/status/1260236117129015297
The changes in this PR could ensure that types that can be verified by the TypeValidator is limited and there is no way to magically use it.
For example you can break it by defining you own function like:
```php
function is_usercollection {
return true;
}
```
that will validate any value that have the validator type as 'UserCollection'.
Another example would be defining `is_lower` or `ctype_int` that would also break the implementation.
Commits
-------
e8c9049a5a Remove some magic from TypeValidator logic and OptionsResolver type verify logic
* 5.1:
[Cache] Use the default expiry when saving (not when creating) items
Fix typo
Fix DBAL deprecation
[Form] Fix ChoiceType translation domain
Add Tagalog translations for new form messages
[Form] Add missing vietnamese translations
sync translations from master
[OptionsResolver] Fix force prepend normalizer
add vietnamese translation for html5 color validation
* 5.0:
[Cache] Use the default expiry when saving (not when creating) items
Fix typo
Fix DBAL deprecation
[Form] Fix ChoiceType translation domain
Add Tagalog translations for new form messages
[Form] Add missing vietnamese translations
sync translations from master
[OptionsResolver] Fix force prepend normalizer
add vietnamese translation for html5 color validation
* 4.4:
[Cache] Use the default expiry when saving (not when creating) items
Fix typo
Fix DBAL deprecation
[Form] Fix ChoiceType translation domain
Add Tagalog translations for new form messages
[Form] Add missing vietnamese translations
sync translations from master
[OptionsResolver] Fix force prepend normalizer
add vietnamese translation for html5 color validation
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Use the default expiry when saving (not when creating) items
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37263
| License | MIT
| Doc PR |
This PR is for align expiration handling in ChainAdapter with ChainCache as proposed in #37263.
Commits
-------
49e9f3229c [Cache] Use the default expiry when saving (not when creating) items
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Form] Fix ChoiceType translation domain
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? |no
| Tickets | Fix #...
| License | MIT
| Doc PR | symfony/symfony-docs#...
When using
```
->add('foo', ChoiceType::class, [
'label' => 'label',
'translation_domain' => false,
'choices' => [
'choice.no' => false,
'choice.yes' => true,
],
'choice_translation_domain' => 'messages',
'expanded' => true,
'required' => false,
'placeholder' => false,
]);
```
I discovered that the choices was not translated.
Seems like it's because the subForm is using the `translation_domain` instead of the `choice_translation_domain`.
Commits
-------
2effda79ea [Form] Fix ChoiceType translation domain
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] sync translations from master
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
acea9be6d3 sync translations from master
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Add Tagalog translations for new form messages
| Q | A
| ------------- | ---
| Branch? | 3.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 |
| License | MIT
| Doc PR |
This PR adds Tagalog translations for the new form messages @xabbuh added in https://github.com/symfony/symfony/pull/37552.
~~As I'm not aware of any Filipinos that regularly review Symfony pull requests, I'm going to ask my mother to proof-read this first before I remove the "WIP" label from the title. :)~~
Commits
-------
1809b7c5eb Add Tagalog translations for new form messages
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Mime] allow non-ASCII characters in local part of email
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/34932
| License | MIT
| Doc PR | -
This fixes https://github.com/symfony/symfony/issues/34932 by allowing non-ASCII characters in the local part of emails.
I tried this using 3 different smtp servers (gmail, mailgun and local postfix) and for me this just works in case there are non-ASCII characters in the local part of emails. Emails are correctly delivered.
PHPMailer does this in the same way: https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L1411
This is also in line with the behavior of Swiftmailer (< 6.1) **before** this commit that introduced the `IdnAddressEncoder`: 6a87efd39b (diff-e5f85d26733017e183b2633ae3c433f0R31)
I'm not an expert when it comes to SMTP and all the different RFCs out there 😕 But for me this exception seems not needed.
Maybe @c960657 can help here?
Commits
-------
d057dffcd6 [Mime] allow non-ASCII characters in local part of email
* 5.1:
cs fix
add german translation of the html5 color validation
Fix PHP 8 deprecations
ensure compatibility with PHP 8 stack traces
clean up HHVM instructions
sync translations from master branch
silently ignore uninitialized properties when mapping data to forms
* 5.0:
cs fix
add german translation of the html5 color validation
Fix PHP 8 deprecations
ensure compatibility with PHP 8 stack traces
clean up HHVM instructions
sync translations from master branch
silently ignore uninitialized properties when mapping data to forms
* 4.4:
cs fix
add german translation of the html5 color validation
Fix PHP 8 deprecations
ensure compatibility with PHP 8 stack traces
clean up HHVM instructions
sync translations from master branch
silently ignore uninitialized properties when mapping data to forms
* 3.4:
cs fix
add german translation of the html5 color validation
sync translations from master branch
silently ignore uninitialized properties when mapping data to forms
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] silently ignore uninitialized properties when mapping data to forms
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36492
| License | MIT
| Doc PR |
Commits
-------
b4616c810c silently ignore uninitialized properties when mapping data to forms
A public method declared in a trait can be used by a class without
importing the trait itself when the trait is already imported by one
of the parent classes from the inheritance chain.
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[PhpUnitBridge] Fix expectDeprecation() in isolation
| Q | A
| ------------- | ---
| Branch? | 5.1
| 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 #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Tests like
```
/**
* Do not remove this test in the next major version.
*
* @group legacy
* @runInSeparateProcess
*/
public function testOneInIsolation()
{
$this->expectDeprecation('foo');
@trigger_error('foo', E_USER_DEPRECATED);
}
```
will fail due to:
```
Testing Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest
R 1 / 1 (100%)R
Time: 111 ms, Memory: 6.00 MB
There were 2 risky tests:
1) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions
/Users/alex/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php:38
2) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions
OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Risky: 2.
```
Commits
-------
e7e2ee75d3 Expect deprecations in isolation
* 5.1:
[String] Added a help message when translation-contracts is not installed
Add: ExcludeList usage for PHPUnit 9.4
[Cache] Fix compat wth DBAL v3
[String] throw when Alpine is used and translit fails
* 5.0:
[String] Added a help message when translation-contracts is not installed
Add: ExcludeList usage for PHPUnit 9.4
[Cache] Fix compat wth DBAL v3
[String] throw when Alpine is used and translit fails
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[ErrorHandler] Allow override of the default non-debug template
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes - a very tiny one
| Deprecations? | no
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Add new feature to allow the default hardcoded non-debug template to be overridden when `symfony/error-handler`used as a component in other projects.
Currently, when used as a component, its not possible (that I could see) to override the standard default template of `views/error.html.php` therefore the look and feel, and text is hard coded. There is much written on how to customise the error pages when using the full symfony stack, but not when using individual `symfony/error-handler` component on its own.
This PR is related to the use of `symfony/error-handler` as a component in other projects - specifically the Joomla Content Management System, where, in non debug mode, a generic template **needs to be translatable, and customisable** even though most of the time when the error occurs will bt at boot time and not much available to it. https://github.com/joomla/joomla-cms/issues/29968
This PR allows the use of code such as
```php
<?php
require 'vendor/autoload.php';
use Symfony\Component\ErrorHandler\ErrorHandler;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
ErrorHandler::register();
HtmlErrorRenderer::setTemplate('/path/to/custom/mine.php');
throw new Exception('myException is this', 500);
```
and then for further customisation of the "look and feel" to be done in `mine.php`
Due to the unique way the error handler component is init'ed, the use of static calls has been employed rather than any DI approach, I hope this is ok.
Commits
-------
6e1d16b44d [ErrorHandler] Allow override of the default non-debug template
* 5.1:
minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
fix handling null as empty data
[Security\Http] Skip remember-me logout on empty token
Missing return in loadValuesForChoices method
No need to create an issue when creating a PR
Use ">=" for the "php" requirement
[HttpClient] Fix promise behavior in HttplugClient
[Console] Fixes question input encoding on Windows
* 5.0:
minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
fix handling null as empty data
No need to create an issue when creating a PR
Use ">=" for the "php" requirement
[HttpClient] Fix promise behavior in HttplugClient
[Console] Fixes question input encoding on Windows
* 4.4:
minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
fix handling null as empty data
No need to create an issue when creating a PR
[Console] Fixes question input encoding on Windows
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Contracts] Add missing "extra.thanks" entries in composer.json
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Something we forgot and that might help give some more visibility to symfony/contracts.
Commits
-------
bd04f0cce6 [Contracts] Add missing "extra.thanks" entries in composer.json
* 3.4:
[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
fix handling null as empty data
No need to create an issue when creating a PR
[Console] Fixes question input encoding on Windows
This PR was merged into the 3.4 branch.
Discussion
----------
[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? |no
| Deprecations? | no
| Tickets | Fix#37294
| License | MIT
| Doc PR |
Passes current Process unit tests.
On Windows systems, a new set of sf_proc_## files are generated in the system temp directory for each WindowsPipes object. These files are removed when the WindowsPipes object is destroyed.
This avoids receiving a permission denied error when attempting to write to sf_proc_## files between multiple sites running as different users, when the users do not have permissions to modify each others files.
Changes
- [Process] WindowsPipes always creates new sf_proc_## files in constructor
- [Process] WindowsPipes removes its sf_proc_## files in destructor
Commits
-------
220be89f5c [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] fix handling null as empty data
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37493
| License | MIT
| Doc PR |
Commits
-------
b5aa55dab9 fix handling null as empty data
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fixes question input encoding on Windows
| Q | A
| ------------- | ---
| Branch? | 3.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 | Fix#35842, Fix#36324, Fix#37495 and Fix#37278 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | no <!-- 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/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.
-->
To ask a question to a user, the [QuestionHelper](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/QuestionHelper.php) use [`fgets`](https://www.php.net/manual/en/function.fgets.php). However, special characters are not supported on Windows with this function (like accents: `é`, `à`, `ö`). The solution is to set a special encoding with [`sapi_windows_cp_get`](https://www.php.net/manual/en/function.sapi-windows-cp-get).
> Before
```php
$stream = fopen('php://stdin', 'r');
$input = fgets($stream);
echo $input;
// input: "Bonjour à tous"
// output: 'Bonjour \ tous" or "Bonjour tous"
```
> After
```php
// Check if the function exists because it only exists on Windows
if(function_exists('sapi_windows_cp_set')) {
sapi_windows_cp_get(437);
}
$stream = fopen('php://stdin', 'r');
$input = fgets($stream);
echo $input;
// input: "Bonjour à tous"
// output: 'Bonjour à tous"
```
*Thanks to @bnjmnfnk for the solution 😉*
Commits
-------
4288df4f74 [Console] Fixes question input encoding on Windows
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpClient] Fix promise behavior in HttplugClient
| Q | A
| ------------- | ---
| Branch? | 4.4 & up <!-- 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 | Fix#37488 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- 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/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.
-->
## The Problem
Promises have 2 important methods: `then` and `wait`.
To implement Httplug's promise interface, we built `HttplugPromise` on top of Guzzle promise.
However, when an error occurred (Httplug `NetworkException` thrown) while init the request/before actually sending the request,
`HttplugClient::sendAsyncRequest` will return a `Http\Promise\RejectedPromise`, which is a dummy implementation.
If the `then` callable returns a promise-like object, `Http\Promise\RejectedPromise` will treat it as plain value.
Guzzle promise will try to resolve the promise-like value, which is an object that has `then` method on it.
bbf3b200bc/src/Promise.php (L116)
To fix this, I edited `src/Symfony/Component/HttpClient/HttplugClient.php`.
Next, let me explain why to edit `src/Symfony/Component/HttpClient/Response/HttplugPromise.php`.
After the previous fix, when a Guzzle promise returned by the `then` callable, things will work.
However, If I return a `HttplugPromiseInterface`, it doesn't work, because Guzzle promise `wait` the return value (result)
only if it's a Guzzle promise.
bbf3b200bc/src/Promise.php (L63)
To fix this, I referenced the `wait` code of Guzzle promise and edited our `HttplugPromise`.
## How this fix make sense
So, why to return a promise from the `then` callable?
This let us change the promise chain according to current promise's result (fulfilled/rejected).
For example, we can retry an HTTP request if it failed.
Please take a look at my test code.
Commits
-------
147b6adc39 [HttpClient] Fix promise behavior in HttplugClient
* 5.1:
[HttpClient][CurlHttpClient] Fix http_version option usage
[HttpClient] fix parsing response headers in CurlResponse
[PropertyAccess] Remove inflector component
[Console] Do not check for "stty" using "exec" if that function is disabled
[Console] always use stty when possible to ask hidden questions
* 5.0:
[HttpClient][CurlHttpClient] Fix http_version option usage
[HttpClient] fix parsing response headers in CurlResponse
[Console] Do not check for "stty" using "exec" if that function is disabled
[Console] always use stty when possible to ask hidden questions
* 4.4:
[HttpClient][CurlHttpClient] Fix http_version option usage
[HttpClient] fix parsing response headers in CurlResponse
[Console] Do not check for "stty" using "exec" if that function is disabled
[Console] always use stty when possible to ask hidden questions
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] always use stty when possible to ask hidden questions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36565, replaces #36590
| License | MIT
| Doc PR | -
The current code doesn't make much sense: we check `hasSttyAvailable()`, and if the answer is `false`, we still use `stty` directly.
This PR relies on `stream_isatty` and equivalent fallback checks to decide if the password can be hidden or not.
Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/37469/files?w=1).
Commits
-------
055b605e30 [Console] always use stty when possible to ask hidden questions
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix parsing response headers in CurlResponse
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This fixes rare notices that look like:
`Argument 2 passed to Symfony\Component\HttpClient\Chunk\DataChunk::__construct() must be of the type string, null given`
I'm unable to provide a test case since I'm unable to provide a simple reproducer.
It happens that curl can call the header-function with multiple lines at once apparently, while most of the time it does so with one at a time.
Commits
-------
eb70fb2f26 [HttpClient] fix parsing response headers in CurlResponse
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Workflow] Added Function (and Twig extension) to retrieve a specific transition
You can now easily retrieve a specific transition. Useful when you want the metadata of a specific transition.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | hmmmm, should I create a ticket first ?
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13907
I needed to get the metadata of a transition, but in order to do that, you need the transition object. So here is a PR to easily get the transition object
Commits
-------
0eebe74259 [Workflow] Added Function (and Twig extension) to retrieve a specific transition
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] Add MockResponse::getRequestMethod() and getRequestUrl() to allow inspecting which request has been sent
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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/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.
-->
---
As same as the `MockResponse` class has `getRequestOptions()` when doing a request; I've added:
* `getRequestUrl()` - returns the URL used when doing the request
* `getRequestMethod()` - returns the HTTP method used when doing the request
With these two getters, we would be able to assert that the method and URL passed to the `HttpClient` were well generated. I've tried to assert the URL generated in a unit test of a class with a `SymfonyHttpClient` injected and it wasn't possible. Calling `$mock->getInfo('url')` returns `null`.
Example, if we have a class with `HttpClientInterface` injected like this:
```php
final class SymfonyHttpUserClient
{
private HttpClientInterface $httpClient;
private string $baseUri;
public function __construct(
HttpClientInterface $httpClient,
string $baseUri
) {
$this->httpClient = $httpClient;
$this->baseUri = $baseUri;
}
public function getById(string $userId): void
{
$this->httpClient->request(
'GET',
$this->baseUri . $customerId
);
}
}
```
And if we want to do a unit test of `SymfonyHttpUserClient` right now we are not able to check if the URL of the request was well-formed passing a `MockResponse`. Also, we weren't able to assert the HTTP method (maybe this piece is not so critical to assert in the unit test).
```php
class SymfonyHttpUserClientTests extends TestCase
{
public function testGetById(): void
{
$baseUri = 'https://user-api.test/api/v1/users/';
$mockResponse = new MockResponse();
$symfonyHttpUserClient = new SymfonyHttpUserClient(
new MockHttpClient(
[$mockResponse],
$baseUri
),
$baseUri
);
// test get by id:
$symfonyHttpUserClient->getById('some-user-id');
// cannot be asserted right now:
$this->assertSame($mockResponse->getInfo('url'), $baseUri . 'some-user-id'); // fail
$this->assertSame($mockResponse->getInfo('http_method'), 'GET'); // fail
// it could be with the new getters:
$this->assertSame($mockResponse->getRequestUrl(), $baseUri . 'some-user-id');
$this->assertSame($mockResponse->getRequestMethod(), 'GET');
}
}
```
This only happens if the class has injected the HttpClient and if it is used inside void methods with no being able to return the response. If the class returns the response, `url` and `http_method` are available with `$response->getInfo()` call. But this response object is a new one, is not the mock passed by argument when you instance the MockHttpClient.
Var dumps of `getInfo` array:
```
$response->getInfo() from MockClient:
..array(10) {
["start_time"]=>
float(1587109014.7985)
["user_data"]=>
NULL
["http_code"]=>
int(200)
["response_headers"]=>
array(0) {
}
["error"]=>
NULL
["canceled"]=>
bool(false)
["redirect_count"]=>
int(0)
["redirect_url"]=>
NULL
["http_method"]=>
string(3) "GET"
["url"]=>
string(47) "https://user-api.test/api/v1/users/some-user-id"
}
$mock->getInfo()
array(4) {
["http_code"]=>
int(200)
["response_headers"]=>
array(0) {
}
["error"]=>
NULL
["canceled"]=>
bool(false)
}
```
This is a minor change, I opened the PR with `4.4` as base branch; but not sure if it should be opened with `5.0` as base branch or even `master` taking account is a feature (add two new getters in MockResponse class). Let me know if I didn't follow right the instructions (first PR on Symfony project 😃)
Thanks!
Commits
-------
7a250d80c1 [HttpClient] Add MockResponse::getRequestMethod() and getRequestUrl() to allow inspecting which request has been sent
This PR was merged into the 5.2-dev branch.
Discussion
----------
Move event alias mappings to their components
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
For a small console tool, I wanted to use the Console, EventDispatcher and DI components standalone. In order to make use of aliased events, I had to copy over the mapping information from FrameworkBundle, which was a bit unfortunate.
With this PR, I'd like to suggest to store all alias mappings on the `*Events` classes of each component instead. This change will make the mapping reusable outside of the full-stack framework.
Note: I've bumped the dependencies of FrameworkBundle/SercurityBundle in order to gain access to the moved mapping information. If any of the bumps is too heavy, please tell me and I'll implement a fallback instead.
Commits
-------
28e6f6f72c Move event alias mappings to their components.
* 5.1:
[ErrorHandler] fix throwing from __toString()
Removed comments and requirements relative to php <5.5 (not supported anymore)
Fix caching of parent locales file in translator
fix validating lazy properties that evaluate to null
* 5.0:
[ErrorHandler] fix throwing from __toString()
Removed comments and requirements relative to php <5.5 (not supported anymore)
Fix caching of parent locales file in translator
fix validating lazy properties that evaluate to null
* 4.4:
[ErrorHandler] fix throwing from __toString()
Removed comments and requirements relative to php <5.5 (not supported anymore)
Fix caching of parent locales file in translator
fix validating lazy properties that evaluate to null
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] Fix caching of parent locales file in translator
| Q | A
| ------------- | ---
| Branch? | 4.4 (this is the lowest maintained branch with this code)
| 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 |
The `parentLocales` property was probably meant as a cache for the content of the `parents.json` file but instead the content is stored in a local variable and the property stays `null`. This means the file is read on each call to `computeFallbackLocales`.
This PR update the code to what was probably meant to be.
(Ref https://github.com/symfony/symfony/pull/28070)
Commits
-------
02c9ac68a4 Fix caching of parent locales file in translator
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Console ProgressBar: Change redraw default value to 25fps
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
`ProgressBar` has a default value of `0.1` for `$minSecondsBetweenRedraws` which works out to 10 fps, so below the threshhold at which the human eye perceives it as a moving image instead of a series of individual images. Of course, the console's progress bar is not really an animation tool, but it seems like a low-hanging fruit to change the redraw frequency to something that can be perceived as a fluid motion. So I'm proposing to change `$minSecondsBetweenRedraws` to `0.016666666666667`, i.e. 60 fps, which is a fairly typical refresh rate for computer screens, so redrawing more often than that would be pointless. It means of course to redraw six times more often than currently, but i guess performance is not such a big concern here, right?
Commits
-------
b1c38bada7 Console ProgressBar: Change redraw default value to 25fps
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] skip test if guesser is not supported
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
fixes tests on AppVeyor
Commits
-------
3b77abea65 skip test if guesser is not supported
This PR was merged into the 5.1 branch.
Discussion
----------
[Security] Added missing license headers
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
See 3be6ce121b
Seems like the fabbot reviews (and I) missed quite a lot of these in my big security PR.
Commits
-------
ea81b61e5f Added missing license headers
* 5.1:
Fix test that fails on old distros
Fix: compatibility with phpunit 9.3
[DoctrineBridge] work around Connection::ping() deprecation
[MimeType] Duplicated MimeType due to PHP Bug
[HttpClient] fix casting TraceableResponse to php streams
[DI] fix parsing of argument type=binary in xml
fix guessing form types for DateTime types
fix handling typed properties as constraint options
Fix the 'supports' method argument type of the security voter
Use the driverConnection executeUpdate method
This PR was merged into the 5.1 branch.
Discussion
----------
[HttpClient] fix casting TraceableResponse to php streams
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37393
| License | MIT
| Doc PR | -
We'd better replace these checks by an `instanceof` one, but that'd be for master.
Commits
-------
5733289278 [HttpClient] fix casting TraceableResponse to php streams
* 5.0:
Fix test that fails on old distros
Fix: compatibility with phpunit 9.3
[DoctrineBridge] work around Connection::ping() deprecation
[MimeType] Duplicated MimeType due to PHP Bug
[DI] fix parsing of argument type=binary in xml
fix guessing form types for DateTime types
fix handling typed properties as constraint options
Fix the 'supports' method argument type of the security voter
Use the driverConnection executeUpdate method
* 4.4:
Fix test that fails on old distros
Fix: compatibility with phpunit 9.3
[DoctrineBridge] work around Connection::ping() deprecation
[MimeType] Duplicated MimeType due to PHP Bug
[DI] fix parsing of argument type=binary in xml
fix guessing form types for DateTime types
fix handling typed properties as constraint options
Use the driverConnection executeUpdate method
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fix compatibility with phpunit 9.3
| Q | A
| ------------- | ---
| Branch? | master for features / 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 -->
In PHPUnit 9.3 some Classes were moved or renamed, to make the PhpunitBridge compatible with PhpUnit 9.3 it necessary to call the new Loader instead of the Registry.
<!--
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
-------
de71a12f3b Fix: compatibility with phpunit 9.3
This PR was merged into the 4.4 branch.
Discussion
----------
[DoctrineBridge] work around Connection::ping() deprecation
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Follows e603a2e233
Commits
-------
9ccf043c7c [DoctrineBridge] work around Connection::ping() deprecation
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[MimeType] Duplicated MimeType due to PHP Bug
| Q | A
| ------------- | ---
| Branch? | 5.1
| 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 #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
## Issue:
Currently there is a PHP bug https://bugs.php.net/bug.php?id=77784 that is causing several MimeTypes to be given as duplicated:
```
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
```
Instead of:
```
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
```
This Patch will fix the Issues by checking if a returned MimeType is duplicated and return appropriate MimeType.
This patch should be reverted if the PHP Bug is ever fixed.
Commits
-------
7cb29c8b4b [MimeType] Duplicated MimeType due to PHP Bug
This PR was merged into the 5.1 branch.
Discussion
----------
[Notifier] Notifier 5.2 is incompatible with 5.1 bridges
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
#36611 introduced a breaking change that made the Notifier 5.2 incompatible with all Notifier bridges 5.0-5.1. Because of this, the tests are currently failing on Travis. This PR attempts to fix this.
Commits
-------
1b6bbc2e71 [Notifier] Notifier 5.2 is incompatible with 5.1 bridges.
This PR was merged into the 4.4 branch.
Discussion
----------
Directly use the driverConnection executeUpdate method
executeUpdate & executeQuery methods do not throw a TableNotFoundException. No need for the try/catch as it is done for executeQuery
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/issues/37355
| License | MIT
As explained in https://github.com/symfony/symfony/issues/37355, when doing a write operation, one should avoid using the `executeQuery` method of a Connection, as Doctrine's MasterSlaveConnection can pick a slave instance (usually read-only) for these operations.
Commits
-------
eec12ecd23 Use the driverConnection executeUpdate method
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Notifier][Slack] Error trown when having more than 10 fields specified #36346
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | Fix#36346 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
As written in [docs](https://api.slack.com/reference/block-kit/blocks#section) of Section block, for fields we have to had maximum 10 items specified.
Commits
-------
68b2490ee2 [Notifier][Slack] Error trown when having more than 10 fields specified #36346
This PR was merged into the 5.2-dev branch.
Discussion
----------
[TwigBundle] Deprecate the public "twig" service to private
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | -
I think the `twig` service don't need to be public anymore - we never need to access it directly in Symfony's code.
Commits
-------
f64cbada89 [TwigBundle] Deprecate the public "twig" service to private
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Form] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4, 4.4, 5.0 or 5.1 for bug fixes <!-- see below -->
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Part of #37186
| License | MIT
| Doc PR | -
Commits
-------
9e2e8eeb29 [Form] Move configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpFoundation] add `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Inspired by https://github.com/symfony/psr-http-message-bridge/pull/80
/cc @drupol
Related to #9009, #29664, #26220 but also https://github.com/api-platform/core/issues/509 and https://www.drupal.org/project/drupal/issues/2984272
/cc @dunglas @alexpott
Commits
-------
dd81e32ec1 [HttpFoundation] add `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names
* 5.1:
[HttpClient] Support for cURL handler objects.
[HttpClient] unset activity list when creating CurlResponse
Fixed typo in test name
[DI] Fix call to sprintf in ServicesConfigurator::stack()
add .body wrapper element
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
[VarDumper] Support for cURL handler objects.
Check whether path is file in DataPart::fromPath()
[DI][FrameworkBundle] Remove whitelist occurrences
Avoid accessibility errors on debug toolbar
Resolve event bubbling logic in a compiler pass
update cookie test
* 5.0:
[HttpClient] Support for cURL handler objects.
[HttpClient] unset activity list when creating CurlResponse
Fixed typo in test name
add .body wrapper element
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
[VarDumper] Support for cURL handler objects.
Check whether path is file in DataPart::fromPath()
[DI][FrameworkBundle] Remove whitelist occurrences
Avoid accessibility errors on debug toolbar
update cookie test
* 4.4:
[HttpClient] Support for cURL handler objects.
[HttpClient] unset activity list when creating CurlResponse
Fixed typo in test name
add .body wrapper element
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
[VarDumper] Support for cURL handler objects.
Check whether path is file in DataPart::fromPath()
[DI][FrameworkBundle] Remove whitelist occurrences
Avoid accessibility errors on debug toolbar
* 3.4:
Fixed typo in test name
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
[VarDumper] Support for cURL handler objects.
[DI][FrameworkBundle] Remove whitelist occurrences
Avoid accessibility errors on debug toolbar
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
| Q | A
| ------------- | ---
| Branch? | 3.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 | Fix#36068 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | no
<!--
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.
-->
`.mp3` files are more common than `.mpga` files.
Commits
-------
76a744ad91 [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
This PR was merged into the 5.0 branch.
Discussion
----------
[BrowserKit] update cookie test for cookie values with double quotes
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | no
| New feature? | noâ
| Deprecations? | no
| Tickets | Fix#37161
| License | MIT
| Doc PR | symfony/symfony-docs#
Provide a test for cookie values with double quotes
Commits
-------
a50c660823 update cookie test
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Return SentMessage from the Notifier message handler
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | see https://github.com/symfony/symfony/pull/36611#issuecomment-648448026 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR |
Commits
-------
5855d112b7 [Notifier] Return SentMessage from the Notifier message handler
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Support for cURL handler objects
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37378
| License | MIT
| Doc PR | N/A
Commits
-------
39c1a6373b [VarDumper] Support for cURL handler objects.
This PR was merged into the 4.4 branch.
Discussion
----------
add .body wrapper element
This change makes the notification email responsive.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | none
| License | MIT
There was a wrapper missing from the foundation template.
This wrapper applies all `table.body table.container` styles from the foundation stylesheet
including font's and the responsive rules that were missing.
Commits
-------
5b74bbd288 add .body wrapper element
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Add Notifier SentMessage
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13624
Like Mailer, Notifier returns now a SentMessage that contains the messageId (returned by the provider in the response). It contains also the body of the response as array to have more info about price, number of sms sent, status and so on.
- [x] apply to bridges
Commits
-------
5a6f0537ec Add Notifier SentMessage
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] allow configuring trusted proxies using semantic configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | -
| Tickets | -
| License | MIT
| Doc PR | -
On top of the improved DX this should provide, this PR (and #37351) will allow [removing the corresponding lines](https://github.com/symfony/recipes/pull/790) from `index.php` & recipes.
Using values:
```yaml
framework:
trusted_proxies: '127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
#or
trusted_proxies: '%env(TRUSTED_PROXIES)%'
```
`trusted_headers` is similar but is an array of headers to trust.
```yaml
framework:
# that's the defaults already
trusted_headers: ['x-forwarded-all', '!x-forwarded-host', '!x-forwarded-prefix']
```
Commits
-------
af9dd52752 [FrameworkBundle] allow configuring trusted proxies using semantic configuration
This PR was merged into the 5.1 branch.
Discussion
----------
[Security] Resolve event bubbling of logout + new events in a compiler pass
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37292
| License | MIT
| Doc PR | -
This PR proposes to create a compiler pass that registers listeners on the main `event_dispatcher` on the firewall-specific event dispatcher during compile time. This allows to still specify listener priorities while listening on a bubbled-up event (instead of a fix moment where the event bubbling occurs). It probably also improves performance, as it doesn't use duplicated event dispatching logic to provide event bubbling.
Nothing changes on the user side. I proposed this as a bugfix, as it fixes the bug mentioned in #37292 (not being able to use listener priorities). I did remove a class, which was introduced in 5.1 and is very internal. I think it's safe, but we can also keep it and remove in master.
Commits
-------
f962c26061 Resolve event bubbling logic in a compiler pass
This PR was merged into the 5.2-dev branch.
Discussion
----------
[DI] deprecate Definition/Alias::setPrivate()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | -
Right now, there is a very subtle difference between `setPublic()` and `setPrivate()` that dates back to the FC/BC layer we created to turn services private by default.
We kept this difference to help third party bundles provide support for a wide range of versions of Symfony, but since 5.2 will be released at the same time as 3.4 will enter EOM, we should remove this behavior and deprecate `setPrivate()` to signal the change.
This is what this PR does.
Commits
-------
1bea690f4d [DI] deprecate Definition/Alias::setPrivate()
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] allow enabling the HTTP cache using semantic configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Right now, using the HTTP cache requires tweaking the `public/index.php` file [as explained in the doc](https://symfony.com/doc/current/http_cache.html).
This PR removes this requirement by allowing one to do this instead:
```yaml
framework:
http_cache: true
```
Commits
-------
56b993ac2e [FrameworkBundle] allow enabling the HTTP cache using semantic configuration
This PR was merged into the 3.4 branch.
Discussion
----------
Avoid accessibility errors on symfony web debug toolbar
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | symfony/symfony-docs#...
When for example using the [axe](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd) to test the website for accessibility. Axe will fail because a div element without a role or a parent [landmark](https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html) is rendered. To avoid this errors I think we should define it as a specific region.
Commits
-------
223b405168 Avoid accessibility errors on debug toolbar
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] changed configuration file for messenger from xml to php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37186
| License | MIT
Use `messenger.php` instead of `messenger.xml` and `messenger_debug.php` instead of `messenger_debug.php`
Commits
-------
571a49873e [FrameworkBundle] changed configuration file for messenger from xml to php
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] convert config/serializer.xml to php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Part of #37186
| License | MIT
Hello!
This PR contains a new configuration file `serializer.php` instead of `serializer.xml`.
Commits
-------
62e9788599 make priority integers & fix test checking definition to be private
25df2de0a6 [FrameworkBundle] convert config/serializer.xml to php
* This removes duplicate event dispatching logic on event bubbling, which
probably improves performance.
* It allows to still specify listener priorities while listening on a
bubbled-up event (instead of a fix moment where the event bubbling occurs)
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] Let security factories add firewall listeners
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| License | MIT
| Doc PR | n/a
Hello there, I'm the author of `scheb/two-factor-bundle`, which extends Symfony's security layer with two-factor authentication. I've been closely following the recent changes by @wouterj to rework the security layer with "authenticators" (great work!). While I managed to make my bundle work with authenticators, I see some limitations in the security layer that I'd like to address to make such extensions easier to implement.
With the new authenticator-based security system, it is no longer possible to add a authentication listener to the firewall. The only way to do it is a dirty compiler pass, which extends the argument on the `security.firewall.map.context.[firewallName]` service (like I do in: ed2ce9804b/src/bundle/DependencyInjection/Compiler/AccessListenerCompilerPass.php). This is quite ugly and hacky, so I believe there should be an easier and clean way to add firewall-level listeners. This PR adds an interface, which may be implemented by security factories and lets them add additional listeners to the firewall.
Why would you want to do that? There are certain use-cases that require extra logic to handle a request within the firewall. For example in my bundle, I need to handle the intermediate state between login and the completion of two-factor authentication. So ideally, I'm able to execute some code from the firewall right before `Symfony\Component\Security\Http\Firewall\AccessListener`. In the old security system, I could handle this in my authentication listener, which I had to implement anyways. With the new authenticator-based system this option is gone. In the ideal world, I could add a firewall listener and tell it to execute between `LogoutListener` and `AccessListener`.
This is a draft, so I'd like to hear your opinion on this :)
There's another issue, regarding the order of execution, which I'm addressing with #37337.
Commits
-------
0a4fcea8db Add interface to let security factories add their own firewall listeners
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] Add attributes on Passport
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | not yet
see https://github.com/symfonycorp/connect/pull/95
/cc @wouterj
Commits
-------
440ada3c5f [Security] Add attributes on Passport
This PR was merged into the 5.1 branch.
Discussion
----------
[SecurityBundle] Fix UserCheckerListener registration with custom user checker
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37365
| License | MIT
| Doc PR | -
The user checker listener was wrongly registered on the global event dispatcher, as it can be customized per firewall. This PR fixes that + correctly uses the configured user checker instead of always trying to use `UserCheckerInterface`.
Commits
-------
d63f59036c Fix UserCheckerListener registration with custom user checkers
* 5.1:
[SecurityBundle] Drop cache.security_expression_language definition if invalid
[DI] disable preload.php on the CLI
collect all transformation failures
* 5.0:
[SecurityBundle] Drop cache.security_expression_language definition if invalid
[DI] disable preload.php on the CLI
collect all transformation failures
* 4.4:
[SecurityBundle] Drop cache.security_expression_language definition if invalid
[DI] disable preload.php on the CLI
collect all transformation failures
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Part pf #37186
| License | MIT
| Doc PR | -
Commits
-------
1132d404b0 Move configuration to PHP
This PR was merged into the 3.4 branch.
Discussion
----------
Added Unit tests for php 8 union types
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
The missing test cases for #37340.
Commits
-------
2ca8ecdb74 Added Unit tests for php 8 union types.
* 5.1: (28 commits)
[DI] fix
Use "composer/package-versions-deprecated" when possible
Fix
Small update in our internal terminology
Fix support for PHP8 union types
[VarDumper] fix typo
[Lock][Messenger] Fix precedence of DSN options for 5.1
Fix support for PHP8 union types
[FrameworkBundle] preserve dots in query-string when redirecting
[3.4] Fix support for PHP8 union types
[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
[3.4] Small update in our internal terminology
[Cache] fix compat with DBAL v3
Remove unnecessary null check
[HttpFoundation] Allow `null` in InputBag@set
[HttpClient] Convert CurlHttpClient::handlePush() to instance method
Fix package rename when releasing
bumped Symfony version to 5.1.3
updated VERSION for 5.1.2
updated CHANGELOG for 5.1.2
...
This PR was merged into the 5.1 branch.
Discussion
----------
[5.1] Fix support for PHP8 union types
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Same as #37340 for 5.1
Commits
-------
dd1b61703f Fix support for PHP8 union types
* 5.0:
[VarDumper] fix typo
Fix support for PHP8 union types
[FrameworkBundle] preserve dots in query-string when redirecting
[3.4] Fix support for PHP8 union types
[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
[3.4] Small update in our internal terminology
[Cache] fix compat with DBAL v3
[HttpClient] Convert CurlHttpClient::handlePush() to instance method
[VarDumper] Fix CliDumper coloration
[DI] tighten detection of local dirs to prevent false positives
[FrameworkBundle] preserve dots in query-string when redirecting
Fix precendence in 4.4
bumped Symfony version to 3.4.43
updated VERSION for 3.4.42
update CONTRIBUTORS for 3.4.42
updated CHANGELOG for 3.4.42
* 4.4:
[VarDumper] fix typo
Fix support for PHP8 union types
[FrameworkBundle] preserve dots in query-string when redirecting
[3.4] Fix support for PHP8 union types
[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
[3.4] Small update in our internal terminology
[Cache] fix compat with DBAL v3
[HttpClient] Convert CurlHttpClient::handlePush() to instance method
[VarDumper] Fix CliDumper coloration
[DI] tighten detection of local dirs to prevent false positives
[FrameworkBundle] preserve dots in query-string when redirecting
Fix precendence in 4.4
bumped Symfony version to 3.4.43
updated VERSION for 3.4.42
update CONTRIBUTORS for 3.4.42
updated CHANGELOG for 3.4.42
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Fix precedence of DSN options for 4.4
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/pull/37218#discussion_r438779225
| License | MIT
| Doc PR | N/A
This PR fix précédence of DSN options over constructor options in all component on branch 4.4
Commits
-------
992205a759 Fix precendence in 4.4
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[Lock][Messenger] Fix precedence of DSN options for 5.1
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/pull/37218#discussion_r438779225
| License | MIT
| Doc PR | N/A
This PR fix précédence of DSN options over constructor options in all component on branch 5.1
Commits
-------
9670e9ff06 [Lock][Messenger] Fix precedence of DSN options for 5.1
This PR was merged into the 4.4 branch.
Discussion
----------
[4.4] Fix support for PHP8 union types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Same as #37340 for 4.4
Commits
-------
da68e66a99 Fix support for PHP8 union types
* 3.4:
[3.4] Fix support for PHP8 union types
[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
[3.4] Small update in our internal terminology
[Cache] fix compat with DBAL v3
[VarDumper] Fix CliDumper coloration
[DI] tighten detection of local dirs to prevent false positives
[FrameworkBundle] preserve dots in query-string when redirecting
bumped Symfony version to 3.4.43
updated VERSION for 3.4.42
update CONTRIBUTORS for 3.4.42
updated CHANGELOG for 3.4.42
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] tighten detection of local dirs to prevent false positives
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36510 and #37150
| License | MIT
| Doc PR | -
Commits
-------
b746dd900c [DI] tighten detection of local dirs to prevent false positives
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
Currently the coloring of composer output is forced in some calls, forced not to be colored in one other call and left for auto in the others.
This change would make it uniform, depending on the --colors option of phpunit provided (or not provided) in the call
Commits
-------
968d6c4276 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Fix CliDumper coloration on light arrays
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
When `AbstractDumper::DUMP_LIGHT_ARRAY` is used with the `CliDumper`, the first line (opening bracket) is not colored. When an empty array is dumped (with or without `AbstractDumper::DUMP_LIGHT_ARRAY`) the array is not colored too. This PR aims to fix that.
Commits
-------
7af3469771 [VarDumper] Fix CliDumper coloration
This PR was merged into the 5.1 branch.
Discussion
----------
Fix package rename when releasing
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix when upgrading my local project to use the package instead of my old code :)
| License | MIT
---
Related to
a89a2a8893 (diff-bd586be86489d3e4725496bf5d4caf23) friendly ping @fabpot
The package is released at https://packagist.org/packages/symfony/free-mobile-notifier
And thus this needed to be fixed t give proper hint to devs
Thanks
Commits
-------
7a93222259 Fix package rename when releasing
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Part of #37186
| License | MIT
| Doc PR | -
Commits
-------
955ab04d96 [HttpClient] Move configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
Adding a keyword for Packagist
Thank you @javiereguiluz for the suggestion.
https://github.com/symfony/symfony/pull/37273
| Q | A
| ------------- | ---
| Branch? | N/A
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
So project will appear here:
https://packagist.org/search/?tags=terminal
Commits
-------
aeef1e19bb Adding a keyword for Packagist
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[AssetBundle] Move xml service configuration to php
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4, 4.4, 5.0 or 5.1 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- 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/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
-------
74650610ff [AssetBundle] Move xml service configuration to php
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[DebugBundle] Move xml service configuration to php
| 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 | #37186
| License | MIT
| Doc PR | -
Move DebugBundles xml service configuration to php.
Commits
-------
7355c95fb0 [DebugBundle] Move xml service configuration to php
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[SecurityBundle] Move configuration from XML to PHP
| 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 | #37186 <!-- 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/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.
-->
Move security configuration from XML to PHP for `collectors`, `console` and `guard`
Commits
-------
417636fb61 [Security] Move configuration of guard to PHP
79764a9e85 [Security] Move configuration of console to PHP
2176ed23b1 [Security] Move configuration of collectors to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[request] Move configuration to PHP
| 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 | Part of #37186
| 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/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
-------
ca72bbbf4d [request] Move configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move XML service configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Move the FrameworkBundle service configuration to PHP.
Commits
-------
679486257d [FrameworkBundle] Move XML service configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Routing] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | [#37186](https://github.com/symfony/symfony/issues/37186)
| License | MIT
Moving routing configurations in FrameworkBundle to PHP
Commits
-------
268edd8e71 [Routing] Move configuration to PHP
* 5.1:
[Console] Reset question validator attempts only for actual stdin (bis)
Fix CookieClearingLogoutListener DI configuration
[HttpFoundation] use InputBag for Request::$request only if data is coming from a form
Make PhpDocExtractor compatible with phpDocumentor v5
fixed prototype block prefixes hierarchy of the CollectionType
Reset question validator attempts only for actual stdin
fixed block prefixes hierarchy of the CollectionType
bumped Symfony version to 5.0.11
updated VERSION for 5.0.10
updated CHANGELOG for 5.0.10
bumped Symfony version to 4.4.11
updated VERSION for 4.4.10
updated CHANGELOG for 4.4.10
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[WebProfilerBundle] Move xml service configuration to php
| 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 | #37186 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | -
Move WebProfilerBundles xml service configuration to php.
Commits
-------
c17429ff76 [WebProfilerBundle] Move xml service configuration to php
* 5.0:
Make PhpDocExtractor compatible with phpDocumentor v5
Reset question validator attempts only for actual stdin
bumped Symfony version to 5.0.11
updated VERSION for 5.0.10
updated CHANGELOG for 5.0.10
bumped Symfony version to 4.4.11
updated VERSION for 4.4.10
updated CHANGELOG for 4.4.10
* 4.4:
Make PhpDocExtractor compatible with phpDocumentor v5
Reset question validator attempts only for actual stdin
bumped Symfony version to 4.4.11
updated VERSION for 4.4.10
updated CHANGELOG for 4.4.10
This PR was merged into the 5.1 branch.
Discussion
----------
[HttpFoundation] use InputBag for Request::$request only if data is coming from a form
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37100
| License | MIT
| Doc PR | -
Commits
-------
786ba109d0 [HttpFoundation] use InputBag for Request::$request only if data is coming from a form
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move translation service configuration from xml to php #37186
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | #37186
| License | MIT
| Doc PR | -
Move translation service configuration from xml to php
Commits
-------
e4bc48f334 [FrameworkBundle] Move translation service configuration from xml to php #37186
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move mailer configuration to php
| 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 | Part of #37186
| License | MIT
Move mailer configuration file to php
Commits
-------
eb88f8856b [FrameworkBundle] Move mailer configuration to php
This PR was merged into the 4.4 branch.
Discussion
----------
Reset question validator attempts only for actual stdin
| Q | A
| ------------- | ---
| Branch? | 4/4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#37046
| License | MIT
| Doc PR |
Let's see what CI says. Works for me locally with phpunit and when running such command manually
Commits
-------
8fe7be4212 Reset question validator attempts only for actual stdin
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] Make PhpDocExtractor compatible with phpDocumentor v5
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36049
| License | MIT
| Doc PR | N/A
Version 5 of phpDocumentor introduced some changes to the `getTagsByName()` method that break the `PhpDocExtractor`.
More specific, it now returns an instance of `InvalidTag` instead of `null` when parsing an invalid tag.
Commits
-------
b1f8e5a80a Make PhpDocExtractor compatible with phpDocumentor v5
Version 5 of phpDocumentor introduced some changes to the
`getTagsByName()` method that break the `PhpDocExtractor`.
More specific, it now returns an instance of `InvalidTag` instead of
`null` when parsing an invalid tag.
* 5.1:
[Security] Run functional tests also for the authenticator system
Fix register csrf protection listener
bumped Symfony version to 5.1.2
updated VERSION for 5.1.1
updated CHANGELOG for 5.1.1
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator][FrameworkBundle] Move configurations from XML to PHP
| 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 | Part of #37186 <!-- prefix each issue number with "Fix #", if any -->
| 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/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.
-->
Move `src/Symfony/Bundle/FrameworkBundle/Resources/config/validator*.xml` configurations to PHP
Commits
-------
46de8900f0 [FrameworkBundle] Move Validator configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move session configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37186
| License | MIT
Move session configuration file to php
Commits
-------
de8f07d5bd [FrameworkBundle] Move session configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Remove default transport property in Transports class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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 | tbd. <!-- required for new features -->
At the moment the `Transports` class uses the first element of the injected transports array as the default transport: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Notifier/Transport/Transports.php#L35
If you try to send a message that doesn't define a transport (`!$message->getTransport()`) the default transport is used. I see two main drawbacks with this solution that I try to fix with this PR:
1. There is no check if the given message is supported by the default transport. What means that the transport is going to fail with an Exception, if it's not supporting the given message. E.g. the `SlackTransport` only supports `ChatMessage`s with nullable options or options from type `SlackOptions`. So as a default transport the `SlackTransport` can't handle all types of `ChatMessage`s.
2. Why should we only send the message using the default transport if there are more possible transports which are probably supported?
I did the following to fix the mentioned drawbacks:
- removed the default transport property
- added a check to make sure the transport defined by the message supports it
- send the message to **all** supported transports, in case the given message does not define a transport
- added a test
Commits
-------
5c167b08d3 [Notifier] Remove default transport property in Transports class
* 5.1:
[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
switch the context when validating nested forms
remove unused param from validator service config
Fix typo
[HttpKernel] Fix regression where Store does not return response body correctly
rework form validator tests
Update AbstractController.php
* 5.0:
[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
switch the context when validating nested forms
remove unused param from validator service config
Fix typo
[HttpKernel] Fix regression where Store does not return response body correctly
rework form validator tests
Update AbstractController.php
* 4.4:
[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
switch the context when validating nested forms
remove unused param from validator service config
Fix typo
[HttpKernel] Fix regression where Store does not return response body correctly
rework form validator tests
Update AbstractController.php
* 3.4:
switch the context when validating nested forms
Fix typo
[HttpKernel] Fix regression where Store does not return response body correctly
rework form validator tests
Update AbstractController.php
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] switch the context when validating nested forms
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37072
| License | MIT
| Doc PR |
Commits
-------
38135de549 switch the context when validating nested forms
This PR was merged into the 5.2-dev branch.
Discussion
----------
[APP_CACHE_DIR] Ensure a split per environment when using that new variable
| Q | A
| ------------- | ---
| Branch | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13819
All the explanation here: https://github.com/symfony/symfony-docs/pull/13819
Commits
-------
06b793f59e Ensure a split per environment
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Lock] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes-ish
| Deprecations? | no
| Tickets | #37186
| License | MIT
| Doc PR | n/a
Change lock config file from XML to PHP.
Commits
-------
7882cd5527 [Lock] Move configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move web configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
9000e72a23 add missing abstract_arg to fix replace arguments
8a81abeb6f [FrameworkBundle] Move web configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[SecurityBundle] convert templating configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
0c36a4b8d9 [SecurityBundle] convert templating configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move profiling collectors configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37186
| License | MIT
Moving profiling collectors configuration in framework bundle to PHP.
Commits
-------
3a0db4cf4d [FrameworkBundle] Move profiling collectors configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[DI][Framework] Use PHP instead of XML for test config
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Partially #37186
| License | MIT
See #37186
Commits
-------
36cc98228e [DI][Framework] Use PHP instead of XML for test config
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move profiling configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | #37186
| License | MIT
Moving profiling configuration in framework bundle to PHP.
Commits
-------
20b5d245c7 [FrameworkBundle] Move profiling configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Ssi] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
| Doc PR | n/a
Commits
-------
5a4d667369 [Ssi] Move configuration to PHP
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move debug configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| 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/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
-------
a226a52d65 [FrameworkBundle] Move debug configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Move security-csrf configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Moving security-csrf configuration in framework bundle to PHP.
Commits
-------
a2d6581345 [FrameworkBundle] Move security-csrf configuration to PHP
This PR was merged into the 4.4 branch.
Discussion
----------
Remove non-existing arg and param from serializer service config
| 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 |
Leftover from #22741
Commits
-------
d179d71f45 Remove non-existing arg and param from serializer service config
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection][CheckTypeDeclarationsPass] Always resolve parameters
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37166
| License | MIT
| Doc PR | -
> Only array parameters are not inlined when dumped.
This is true only when the XML debug container is used, not on a live container that can contain unresolved parameters in the `%my_param%` form. That was my mistake. We have to resolve to get the parameter type.
`$value = [];` was just an improvement to avoid useless parameter resolve btw.
Commits
-------
da0e2c36ef [DependencyInjection][CheckTypeDeclarationsPass] Always resolve parameters
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[DependencyInjection] Apply ExpressionLanguageProviderPass to router.default
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/issues/37042
| License | MIT
Using a `chain_router` usually replaces the `router` and add the `router.default` to it's chain.
This would `addExpressionLanguageProvider` to the default router only as the chain router is not expected to have `addExpressionLanguageProvider` as it is not part of the router interface.
Commits
-------
215ad1f93d [DependencyInjection] Apply ExpressionLanguageProviderPass to router.default
This PR was merged into the 5.1 branch.
Discussion
----------
[String] Fix ellipsis of truncate when not using cut option
| Q | A
| ------------- | ---
| Branch? | 5.1 <!-- 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 -->
[Since 5.1](https://symfony.com/blog/new-in-symfony-5-1-string-improvements#keep-the-last-word-when-truncating), we can use a cut option on truncate.
But with this option, we don't have the expected behavior when the entire chain is returned.
Currently:
`u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum...'`
Instead of:
`u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum'`
Thanks to @jmsche for his help.
Commits
-------
a2ee6c6cf4 [String] Fix ellipsis of truncate when not using cut option
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[PropertyInfo] Move configuration to PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
| Doc PR | n/a
Commits
-------
5dab6ffc4b [PropertyInfo] Move configuration to PHP
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Framework] Convert config/error_renderer.xml to php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
213091e8d2 [Framework] Convert config/error_renderer.xml to php
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Convert config/secrets.xml to .php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
6ec97116a3 Convert config/secrets.xml to .php
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util
| Q | A
| ------------- | ---
| Branch? | master <!-- 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
/cc @stof :)
Commits
-------
164ca90d89 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Convert config/mime_type.xml to .php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
fa92490fcb Convert config/mime_type.xml into mime_type.php
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] make DNS resolution lazy with NativeHttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Neither a bug nor a feature but still an improvement. This aligns the behavior of NativeHttpClient with the other adapters.
Commits
-------
d3a450353d [HttpClient] make DNS resolution lazy with NativeHttpClient
This PR was merged into the 5.1 branch.
Discussion
----------
[Routing] Keeping routes priorities after add a name prefix to the collection
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37089
| License | MIT
| Doc PR | -
Commits
-------
10105267b5 kept routes priorities after add a name prefix to the collection
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[Lock] Fixed reading locks from replica set secondary nodes
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37139
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13775
Force lock existence query to use `readPreference=primary` in case the given mongo connection is using any of the following `readPreference`s:
* primaryPreferred
* secondary
* secondaryPreferred
* nearest
Any of the above would fail if a secondary node is queried during a lock release.
Commits
-------
ebf7eaf503 [Lock] Fixed reading locks from replica set secondary nodes
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Mime] Add DKIM support
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#36014 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | not yet
```php
$dkimSigner = new DkimSigner($pk, 'example.com', 'sf');
$signedEmail = $dkimSigner->sign($email);
```
You can also pass options:
```php
$dkimSigner = new DkimSigner($pk, 'example.com', 'sf');
$signedEmail = $dkimSigner->sign($email, (new DkimOptions())
->bodyCanon('relaxed')
->headerCanon('relaxed')
->headersToIgnore(['Message-ID'])
->toArray()
);
```
Commits
-------
6dc533821c [Mime] Add DKIM support
This PR was merged into the 5.2-dev branch.
Discussion
----------
Use PHP instead of XML as the prefered service/route configuration in core
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes-ish <!-- 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
In Symfony 6, I (we?) would want to promote usage of configuration written in PHP instead of YAML. For third-party bundles and core, we should do the same, replacing XML with PHP. Doing so would remove the need for the XML lib for core.
The biggest advantage is auto-completion with any modern IDE without explicit support for Symfony, and probably one less thing to learn (how to configure things in YAML/XML).
Be warned that it does NOT concern semantic configuration which is much harder.
This PR does the work for the Twig bundle as an example. Once we agreed on the CS, the same should then be done for other core bundles both for service configuration and route configuration.
Embeds #36775 until it is merged.
Commits
-------
0aedd54fc1 [Twig] Move configuration to PHP
This PR was squashed before being merged into the 4.4 branch (closes#37177).
Discussion
----------
[Ldap] fix refreshUser() ignoring extra_fields
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? |no
| Tickets | -
| License | MIT
| Doc PR | -
While #31532 introduced `extra_fields` in general, #32824 later added `LdapUser` & `LdapUserProvider` and ignored `extra_fields` on `refreshUser()`.
This PR fixes `refreshUser()` and adds a test which makes sure, that the refreshed ldap user doesn't lose its default values.
Commits
-------
cb8f12996c [Ldap] fix refreshUser() ignoring extra_fields
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Console] Add support for true colors
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#26576, Fix#19844 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | -
This PR adds support for true colors in the Console component.
Instead of adding many ways to add more colors than the current "default" ones, I've opted to only add true color support via Hex CSS colors. If you have something else (RGB, HSV, ...), you need to first convert it to a CSS color. I've also decided to not support the ANSI 256 colors as most terminals support true colors nowadays.
If true colors are not supported by the terminal, we fall back to the "nearest" default color.
`<fg=green;bg=blue>` is now equivalent to `<fg=#00ff00;bg=#00f>`.
The `Color` class is usable outside of the Console framework as well:
```php
$color = new Color('black', 'white');
echo $color->apply("foo");
echo "\n";
$color = new Color('red', 'yellow');
echo $color->apply("foo");
echo "\n";
$color = new Color('#000000', '#ffffff');
echo $color->apply("foo");
$color = new Color('#000', '#fff', ['underscore', 'reverse']);
echo $color->apply("bar");
echo "\n";
```
Rainbow time!
```php
function rainbowColor($i) {
$h = (int) ($i / 43);
$f = (int) ($i - 43 * $h);
$t = (int) ($f * 255 / 43);
$q = 255 - $t;
if ($h == 0) {
return new Color('', sprintf('#FF%02x00', $t));
} elseif ($h == 1) {
return new Color('', sprintf('#%02xFF00', $q));
} elseif ($h == 2) {
return new Color('', sprintf('#00FF%02x', $t));
} elseif ($h == 3) {
return new Color('', sprintf('#00%02xFF', $q));
} elseif ($h == 4) {
return new Color('', sprintf('#%02x00FF', $t));
} elseif ($h == 5) {
return new Color('', sprintf('#FF00%02x', $q));
}
}
for ($i = 0; $i < 128; $i++) {
echo rainbowColor($i)->apply(' ');
}
echo "\n";
for ($i = 255; $i >= 128; $i--) {
echo rainbowColor($i)->apply(' ');
}
echo "\n";
```
![image](https://user-images.githubusercontent.com/47313/81796170-59af5e00-950d-11ea-8203-18c13ae8a07e.png)
Commits
-------
d066514cf1 [Console] Add support for true colors
This PR was merged into the 5.2-dev branch.
Discussion
----------
[ExpressionLanguage] add details for error messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36847
| License | MIT
| Doc PR |
Hello!
This PR contains a more detail error messages for [ExpressionLanguage], which include info about affected node and attribute.
My English is poor. Please, spell check in error texts.
Commits
-------
5852a8cedd [ExpressionLanguage] add details for error messages
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[PropertyInfo] Support using the SerializerExtractor with no group check
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| 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 -->
It seems there is no way currently to leverage the new `@Ignore` annotation metadata without using serializer groups in third party code.
Indeed the only way to access the serializer's metadata is through the PropertyInfo component since metadata are marked as `@internal` in the Serializer component itself. However, the PropertyInfo component doesn't allow accessing them without using a groups constraint.
This PR proposes a fix by interpreting `serializer_groups = null` as no groups constraint.
This feature would be useful in NelmioApiDocBundle, see https://github.com/nelmio/NelmioApiDocBundle/issues/1595.
Commits
-------
4190bfaf48 [PropertyInfo] Support using the SerializerExtractor with no group check
This PR was merged into the 5.1 branch.
Discussion
----------
[PhpUnitBridge] Fix ExpectDeprecationTrait::expectDeprecation() conflict
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37133
| License | MIT
| Doc PR | -
ExpectDeprecationTrait::expectDeprecation() must be compatible with TestCase::expectDeprecation(). I'm personally against a renaming on our side because this name is the best.
Commits
-------
ea5bb242fd [PhpUnitBridge] Fix ExpectDeprecationTrait::expectDeprecation() conflict
This PR was merged into the 5.2-dev branch.
Discussion
----------
[DependencyInjection] Display alternatives when a service is not found in CheckExceptionOnInvalidReferenceBehaviorPass
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I often see the mistake of using `@my_service` instead of `my_service` in bundles configurations in YAML (on entries that are then turned into references). Since we don't currently display alternatives, the message content is just that the service don't exist which is hard to understand for new users of the framework.
Commits
-------
6b8f181f1a [DependencyInjection] Display alternatives when a service is not found in CheckExceptionOnInvalidReferenceBehaviorPass
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] added the reply-to addresses to the API SES transport request.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
The transport was not sending the reply-to addresses to the SES API when using SendEmail API method.
Commits
-------
ee752f90ed [Mailer] added the reply-to addresses to the API SES transport request.
This PR was merged into the 5.1 branch.
Discussion
----------
[DI] Add check around class_alias for generated proxy classes
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | nofiles -->
| Tickets | Fix#37059
| License | MIT
| Doc PR |
Here is the [requested](https://github.com/symfony/symfony/issues/37059#issuecomment-638633262) fix.
I'd like to note that I consider this kind of a workaround. I don't know why the issue only started to appear with Symfony 5.1 and not before. There might be some other problem hidden somewhere else.
Commits
-------
c8b7459115 Add class_alias for generated proxy classes
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] use fromString when creating a new Address
| 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
When creating an Address, there are two ways right now in 4.4: `Address::create()` which takes an email or an instance of Address and `Address::fromString()` which takes an email or an email+name.
In 4.4, I propose to make `create` supports everything possible. And in 5.2, I will probably propose to deprecate `fromString()`.
Commits
-------
de68787693 [Mime] use fromString when creating a new Adress
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] fix forward compatibility with Doctrine DBAL 2.11+
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The methods will be deprecated in 2.11 (see doctrine/dbal#4019), but the forward compatibility layer is only present in 3.0 (see doctrine/dbal#4007).
Commits
-------
bca4f9970b fix forward compatibility with Doctrine DBAL 2.11+
This PR was merged into the 5.2-dev branch.
Discussion
----------
Provides a way to override cache and log folders from the ENV
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
When using Docker and especially on Mac OS X, performances are terrible when using a "mount" on the host inside the container. (which happens by default)
To optimize the performances, one of the tricks is to change where the application is going to write the cache and the logs.
This PR provides a new env variables `APP_CACHE_DIR` and `APP_LOG_DIR` which can be set to change where will be saved the caches and the logs.
I know we can do it per project BUT:
- I think that is a good addition to Symfony
- it would allow project like eZ Platform and eZ Launchpad to automate that optimization
https://github.com/ezsystems/ezplatform/pull/543
Let me know
Commits
-------
5fa5d36153 Provides a way to override cache and log folders form the ENV
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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 | not yet
The configuration allows to set global `sender` and `recipients`, but for the *envelope*.
If you want to set some global headers, it was not possible (a default `from` header for instance, of a `bcc`).
That's implemented in this PR.
Commits
-------
805e9e62c1 [FrameworkBundle][Mailer] Add a way to configure some email headers from semantic configuration
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#31885, fix#32367
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13736
This PR allows processing the stream of chunks.
```php
<?php
$client = new class() implements HttpClientInterface {
use AsyncDecoratorTrait;
public function request(string $method, string $url, array $options): ResponseInterface
{
return new AsyncResponse($method, $url, $options, static function (ChunkInterface $chunk, AsyncContext $context) {
// do what you want with chunks, e.g. split them
// in smaller chunks, group them, skip some, etc.
yield $chunk;
});
}
};
```
Some ideas:
- custom retry/redirect logic
- align chunk boundaries with server-sent events and yield augmented chunks that know about messages (see #36692)
- play some OAuth dance before issuing the real request
- do some live transclusion
- be creative :)
Any custom logic should fit into the `$passthru` filter iterator (the last constructor argument of `AsyncResponse`). There, one has access to an `AsyncContext` DTO, which allows controlling the stream, eg. to replace the current request/response, to change the passthru filter itself, etc.
The surrounding logic will catch badly behaving filters to ease spotting some mistakes (eg. never forwarding an "isLast()" chunk, or yielding extra chunks after an "isLast()" one, etc.)
For the record:
- When the chunk passthru issues many internal requests in order to complete the external one, the info of each internal request is accessible via the `previous_info` entry. I considered merging all internal `response_headers` info under the main one since that's possible, but I'm not sure it's worth the added complexity. Please tell me if you think we should do it.
- A future iteration/PR might add support for time-based events. Right now, implementing a pause in the stream involves calling `usleep()`, but this doesn't play really well with async. Implementing small pauses and summing them up to the target pause might be good enough - we'll need to give it a try to know better.
Commits
-------
766a1c6287 [HttpClient] add AsyncDecoratorTrait to ease processing responses without breaking async
* 5.1:
fix forward compatibility with Doctrine DBAL 2.11+
[SecurityBundle] Fix the session listener registration under the new authentication manager
allow cursor to be used even when STDIN is not defined
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[SecurityBundle] Fix the session listener registration under the new authentication manager
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37119
| License | MIT
| Doc PR | N/A
Fixes the logic that adds session listeners for firewalls to properly add them only for statefull firewalls. Adds tests to confirm that it is only added to statefull ones. Also remove unused abstract field on session listener
Commits
-------
936ae9df75 [SecurityBundle] Fix the session listener registration under the new authentication manager
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Contracts] Add missing "extra.thanks" entries in composer.json
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Something we forgot and that might help give some more visibility to symfony/contracts.
Commits
-------
bd04f0cce6 [Contracts] Add missing "extra.thanks" entries in composer.json
* 5.1: (36 commits)
Fixed left-over debug statement
set column length for mysql 5.6 compatibility
[Mime] Remove unused var
[HttpClient] fix monitoring timeouts when other streams are active
[PhpUnitBridge] fix syntax on PHP 5.3
[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
properly cascade validation to child forms
[PropertyAccess] Fix getter call order BC
[PhpUnitBridge] fix undefined var on version 3.4
Fix invalid char in SQS Headers
Move ajax clear event listener initialization on loadToolbar
[HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
Fix CS
FrameworkBundle Serializer issue
register event listeners depending on the installed packages
take into account the context when preserving empty array objects
Only register CSRF protection listener if CSRF is available
[VarExporter] tfix: s/markAsSkipped/markTestSkipped/
Also check PUBLIC_ACCESS for authenticated tokens
Fix enabled_locales behavior
...
This PR was merged into the 5.1 branch.
Discussion
----------
[PropertyAccess] Fix getter call order BC
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37052
| License | MIT
| Doc PR | -
Property Accessor breaks BC due to a change in the order of calling the getters, see #37052
Commits
-------
8cf80688c7 [PropertyAccess] Fix getter call order BC
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger/DoctrineBridge] set column length for mysql 5.6 compatibility
MySQL 5.6 does not support more than 191 characters when an index is used and when using utf8mb4 as charset.
As a workaround, I define the length of the queue_name field.
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37116
| License | MIT
Commits
-------
d12190687b set column length for mysql 5.6 compatibility
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger/AmazonSqsBridge] Fixed left-over debug statement
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? |
| Deprecations? | no
| Tickets | Related to #37038
| License | MIT
| Doc PR |
I noticed whats properly a left-over debugging statement that blocks the code from further execution. /cc @jderusse can you check this (thanks).
Commits
-------
8b827e46f6 Fixed left-over debug statement
* 5.0:
[Mime] Remove unused var
[HttpClient] fix monitoring timeouts when other streams are active
[PhpUnitBridge] fix syntax on PHP 5.3
[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
properly cascade validation to child forms
[PhpUnitBridge] fix undefined var on version 3.4
Move ajax clear event listener initialization on loadToolbar
[HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
take into account the context when preserving empty array objects
[VarExporter] tfix: s/markAsSkipped/markTestSkipped/
bumped Symfony version to 5.0.10
updated VERSION for 5.0.9
updated CHANGELOG for 5.0.9
bumped Symfony version to 4.4.10
updated VERSION for 4.4.9
updated CHANGELOG for 4.4.9
bumped Symfony version to 3.4.42
updated VERSION for 3.4.41
update CONTRIBUTORS for 3.4.41
updated CHANGELOG for 3.4.41
* 4.4:
[Mime] Remove unused var
[HttpClient] fix monitoring timeouts when other streams are active
[PhpUnitBridge] fix syntax on PHP 5.3
[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
properly cascade validation to child forms
[PhpUnitBridge] fix undefined var on version 3.4
Move ajax clear event listener initialization on loadToolbar
[HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
take into account the context when preserving empty array objects
[VarExporter] tfix: s/markAsSkipped/markTestSkipped/
bumped Symfony version to 4.4.10
updated VERSION for 4.4.9
updated CHANGELOG for 4.4.9
bumped Symfony version to 3.4.42
updated VERSION for 3.4.41
update CONTRIBUTORS for 3.4.41
updated CHANGELOG for 3.4.41
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix monitoring timeouts when other streams are active
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d2a53f0bda [HttpClient] fix monitoring timeouts when other streams are active
* 3.4:
[PhpUnitBridge] fix syntax on PHP 5.3
[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
properly cascade validation to child forms
[PhpUnitBridge] fix undefined var on version 3.4
bumped Symfony version to 3.4.42
updated VERSION for 3.4.41
update CONTRIBUTORS for 3.4.41
updated CHANGELOG for 3.4.41
MySQL 5.6 does not support more than 191 characters when an index is used and when using utf8mb4 as charset.
As a workaround, I define the length of the queue_name field.
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
SCA: file_exists -> is_dir|is_file in foundation and kernel
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
Inspired by #36556 and replaces file_exists with is_dir|is_file alternative in order to leverage built-in cache advantages.
Commits
-------
0c467691b2 SCA: file_exists -> is_dir|is_file in foundation and kernel
This PR was merged into the 5.2-dev branch.
Discussion
----------
[String] use base58 by default in ByteString::fromRandom()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This is the list from the [bitcoin alphabet](https://en.wikipedia.org/wiki/Base58): it's been designed to avoid characters that look ambiguous when printed.
Commits
-------
b36baa77bb [String] use base58 by default in ByteString::fromRandom()
This PR was merged into the 5.1 branch.
Discussion
----------
[DependencyInjection] Improve missing package/version deprecation
| Q | A
| ------------- | ---
| Branch? | 5.1
| 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 |
After updating to symfony 5.1 I've got some deprecations related to the missing package/version attributes/options for `deprecated` on services.
But currently it's not clear which bundle/part of the code is triggering the deprecations. The only way for me to track down where they were coming from was by setting a xdebug breakpoint in the `XmlFileLoader` and check the `$file` variable.
So it seemed like a good idea to include the file path in the deprecation message, that way it will be easier for users to know if their code or a bundle (and which) is triggering this deprecation.
Before:
<img width="871" alt="Screenshot 2020-05-31 at 13 51 03" src="https://user-images.githubusercontent.com/1374857/83351609-d0d65600-a345-11ea-9785-3237a3ec2360.png">
After:
<img width="907" alt="Screenshot 2020-05-31 at 13 50 10" src="https://user-images.githubusercontent.com/1374857/83351606-cfa52900-a345-11ea-9617-60d07e46234b.png">
Commits
-------
f603317363 [DependencyInjection] Improve missing package/version deprecation
This PR was merged into the 5.1 branch.
Discussion
----------
[SecurityBundle] Only register CSRF protection listener if CSRF is available
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | yes
| Tickets | Fix#37033
| License | MIT
| Doc PR | -
I know we're not allowed to add new deprecations in already released versions. However, I don't think anyone is using SecurityBundle's compiler passes except from Symfony itself - so I don't think anyone is affected by this deprecation. The alternatives would be:
* Add a new compiler pass in 5.1 that conditionally registers the CSRF listener
* Do this exact change in 5.2 and...
* accept a `null` argument in the listener for 5.1
* or add this to the `RegisterCsrfTokenClearingLogoutHandlerPass` class in 5.1
Commits
-------
2d738b30de Only register CSRF protection listener if CSRF is available
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37064
| License | MIT
Commits
-------
69547d9cfc [HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
This PR was merged into the 5.1 branch.
Discussion
----------
[FrameworkBundle] Extension Serializer issue
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | ???
| License | MIT
| Doc PR |
Hi,
When creating a new Symfony project and requiring `symfony/serializer` we have an issue with required service.
Here is a simple reproducer:
![image](https://user-images.githubusercontent.com/944409/83497176-6266d480-a4ba-11ea-98cb-7e354be0a273.png)
This bug was introduced by https://github.com/symfony/symfony/pull/31390
Commits
-------
ab5628f0f4 FrameworkBundle Serializer issue
This PR was merged into the 5.1 branch.
Discussion
----------
[ExpressionLanguage] reset the internal state when the parser is finished
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
d58eb020d0 reset the internal state when the parser is finished
This PR was merged into the 5.1 branch.
Discussion
----------
[Validator] simplify the tests
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
cfc6fc8527 simplify the tests
This PR was merged into the 5.1 branch.
Discussion
----------
[Security] Fixed PUBLIC_ACCESS in authenticated sessions
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Found while testing https://github.com/scheb/2fa/pull/8, sorry for not spotting it before the stable release 😞
Currently, authenticated users are denied access for pages that have `PUBLIC_ACCESS` set, as this attribute is only checked when no token was set. It should be checked for both cases.
Commits
-------
0ac530f460 Also check PUBLIC_ACCESS for authenticated tokens
This PR was merged into the 5.1 branch.
Discussion
----------
[Validator] use "allowedVariables" to configure the ExpressionLanguageSyntax constraint
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fixsymfony/symfony-docs#13669
| License | MIT
| Doc PR |
Commits
-------
4807dab305 [Validator] use "allowedVariables" to configure the ExpressionLanguageSyntax constraint
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Security] Fixed AbstractToken::hasUserChanged()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36989
| License | MIT
| Doc PR | -
This PR completely reverts #35944.
That PR tried to fix a BC break (ref #35941, #35509) introduced by #31177. However, this broke many authentications (ref #36989), as the User is serialized in the session (as hinted by @stof). Many applications don't include the `roles` property in the serialization (at least, the MakerBundle doesn't include it).
In 5.2, we should probably deprecate having different roles in token and user, which fixes the BC breaks all together.
Commits
-------
f297beb42c [Security] Fixed AbstractToken::hasUserChanged()
* 5.1:
Fix abstract method name in PHP doc block
Various cleanups
[HttpClient] fix issues in tests
Fixes sprintf(): Too few arguments in form transformer
[Console] Fix QuestionHelper::disableStty()
[Validator] Use Mime component to determine mime type for file validator
validate subforms in all validation groups
Update Hungarian translations
Add meaningful message when Process is not installed (ProcessHelper)
[Messenger] Change the default notify timeout value for PostgreSQL
[PropertyAccess] Fix TypeError parsing again.
[TwigBridge] fix fallback html-to-txt body converter
[Security/Http] fix merge
[ErrorHandler] fix setting $trace to null in FatalError
[Form] add missing Czech validators translation
[Validator] add missing Czech translations
never directly validate Existence (Required/Optional) constraints
* 5.0:
Fix abstract method name in PHP doc block
Various cleanups
[HttpClient] fix issues in tests
Fixes sprintf(): Too few arguments in form transformer
[Console] Fix QuestionHelper::disableStty()
[Validator] Use Mime component to determine mime type for file validator
validate subforms in all validation groups
Update Hungarian translations
Add meaningful message when Process is not installed (ProcessHelper)
[PropertyAccess] Fix TypeError parsing again.
[TwigBridge] fix fallback html-to-txt body converter
[Security/Http] fix merge
[ErrorHandler] fix setting $trace to null in FatalError
[Form] add missing Czech validators translation
[Validator] add missing Czech translations
never directly validate Existence (Required/Optional) constraints
* 4.4:
Fix abstract method name in PHP doc block
Various cleanups
[HttpClient] fix issues in tests
Fixes sprintf(): Too few arguments in form transformer
[Console] Fix QuestionHelper::disableStty()
[Validator] Use Mime component to determine mime type for file validator
validate subforms in all validation groups
Update Hungarian translations
Add meaningful message when Process is not installed (ProcessHelper)
[PropertyAccess] Fix TypeError parsing again.
[TwigBridge] fix fallback html-to-txt body converter
[Form] add missing Czech validators translation
[Validator] add missing Czech translations
never directly validate Existence (Required/Optional) constraints
This PR was merged into the 3.4 branch.
Discussion
----------
Fix abstract method name in PHP doc block
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
d6966c3147 Fix abstract method name in PHP doc block
* 3.4:
Fixes sprintf(): Too few arguments in form transformer
[Console] Fix QuestionHelper::disableStty()
validate subforms in all validation groups
Update Hungarian translations
Add meaningful message when Process is not installed (ProcessHelper)
[PropertyAccess] Fix TypeError parsing again.
[Form] add missing Czech validators translation
[Validator] add missing Czech translations
never directly validate Existence (Required/Optional) constraints
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] never directly validate Existence (Required/Optional) constraints
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36637#36723
| License | MIT
| Doc PR |
Using `Optional` or `Required` like "regular" constraints does not make any sense, but doing so didn't break before #36365. I suggest to ignore them for now and deprecate using them outside the `Collection` constraint in 5.2.
Commits
-------
d333aae187 never directly validate Existence (Required/Optional) constraints
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix QuestionHelper::disableStty()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no>
| Tickets | -
| License | MIT
| Doc PR | -
We broke it when adding `Terminal::hasSttyAvailable()`.
Let's fix it on 3.4 and move it to terminal on master, as suggested in #36977
Commits
-------
5d93b61278 [Console] Fix QuestionHelper::disableStty()
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccess] Fix TypeError parsing again
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Apparently, the format of `TypeError`s has changed again in php8. While investigating, I noticed our error message parsing is not handling anonymous classes well, so I've added some test cases for them.
I chose a fuzzier regular expression to parse the expected return type from the error message. Additionally, I'm checking the stack trace if the caught `TypeError` is really caused by the accessor call.
Commits
-------
03b4e98630 [PropertyAccess] Fix TypeError parsing again.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] validate subforms in all validation groups
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36852
| License | MIT
| Doc PR |
Commits
-------
b819d94d14 validate subforms in all validation groups
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Change the default notify timeout value for PostgreSQL
| Q | A
| ------------- | ---
| Branch? | 5.1 <!-- see below -->
| Bug fix? | yes-ish
| 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
The default value of 0 means that notify is kind of disable and that incurs many SQL requests. 10 minutes is kind of arbitrary but seems to be a good balance between waiting for a message (blocking) and trying again later in case of an issue.
Commits
-------
d9decf9da2 [Messenger] Change the default notify timeout value for PostgreSQL
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBridge] fix fallback html-to-txt body converter
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Right now, the content of the `<head>` and `<style>` are dumped as text. This fixes it.
Of course, use `league/html-to-markdown` if you need a better parser.
Commits
-------
6f59d60508 [TwigBridge] fix fallback html-to-txt body converter
* 5.1:
Handle fetch mode deprecation of DBAL 2.11.
Fixed security-* package dependencies
Fixed handling of CSRF logout error
[WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
[DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
* 5.0:
Handle fetch mode deprecation of DBAL 2.11.
Fixed handling of CSRF logout error
[WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
[DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
* 4.4:
Handle fetch mode deprecation of DBAL 2.11.
Fixed handling of CSRF logout error
[WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
[DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add missing translations for cs locale (Czech)
| 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 -->
| License | MIT
Is it enough to submit this only against 3.4 to have it included also in 5.1 version?
Commits
-------
3d18c1c185 [Validator] add missing Czech translations
* 5.1:
[Contracts/Deprecation] fix composer.json for PHP 8
bumped Symfony version to 5.1.0
updated VERSION for 5.1.0-RC2
updated CHANGELOG for 5.1.0-RC2
This PR was merged into the 5.1 branch.
Discussion
----------
Fix extra SQL support in Doctrine migrations
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
/cc @weaverryan
Commits
-------
1d1f3e1cd4 Fix extra SQL support in Doctrine migrations
* 5.1:
Allow email message to have "To", "Cc", or "Bcc" header to be valid
[FrameworkBundle] Removed detection of Serializer < 3.2
Update pull request template for 5.1.
[Security/Core] fix PHP8 deprecation
* 5.0:
Allow email message to have "To", "Cc", or "Bcc" header to be valid
[FrameworkBundle] Removed detection of Serializer < 3.2
Update pull request template for 5.1.
[Security/Core] fix PHP8 deprecation
* 4.4:
Allow email message to have "To", "Cc", or "Bcc" header to be valid
[FrameworkBundle] Removed detection of Serializer < 3.2
Update pull request template for 5.1.
[Security/Core] fix PHP8 deprecation
* 5.1:
[FrameworkBundle] Fix MicroKernelTrait for php 8
[DependencyInjection] Fixed tests for wither with static return type.
[HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc().
Don't call method_exists() with non-objects.
[Lock] skip tests when ext-mongo is not installed
[HttpClient] Adjust AmpResponse to the stricter trait handling in php 8.
[FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8
This PR was merged into the 5.1 branch.
Discussion
----------
[HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc()
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
This should fix the remaining red php 8 test of the HttpFoundation suite.
Commits
-------
12f734d8b3 [HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc().
This PR was merged into the 5.1 branch.
Discussion
----------
[FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
In PHP 8, abstract methods on traits are now enforcing that their using classes match the signature.
But this is not the semantics we need in this trait: we want to allow ppl to use a different type of configurators, to provide extensibility of the DSL each provide.
This makes nightly job fail with fatal error currently.
There is no other options here.
/cc @nikic FYI
Commits
-------
4473f454ca [FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8
* 5.1:
[travis] display deprecations in nightly jobs
Parse and render anonymous classes correctly on php 8
Enable APCu for the php 8 build.
[Process] Fix failing test on php 8.
[HttpKernel] fix test
Make PHP 8 green on Travis
Revert "[Cache] allow DBAL v3"
[PropertyAccessor] Added missing property path on php 8.
Don't execute tests with DBAL 2.x on php 8.
* 5.0:
Parse and render anonymous classes correctly on php 8
Enable APCu for the php 8 build.
[Process] Fix failing test on php 8.
[HttpKernel] fix test
Make PHP 8 green on Travis
Revert "[Cache] allow DBAL v3"
[PropertyAccessor] Added missing property path on php 8.
Don't execute tests with DBAL 2.x on php 8.
* 4.4:
Parse and render anonymous classes correctly on php 8
Enable APCu for the php 8 build.
[Process] Fix failing test on php 8.
[HttpKernel] fix test
Make PHP 8 green on Travis
Revert "[Cache] allow DBAL v3"
[PropertyAccessor] Added missing property path on php 8.
Don't execute tests with DBAL 2.x on php 8.
This PR was merged into the 4.4 branch.
Discussion
----------
Parse and render anonymous classes correctly on php 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The format of the value that `get_class()` returns for anonymous classes has changed in php 8. This PR attempts to detect both formats, with the help of the PHP80 polyfill where possible.
Commits
-------
9d702fd94b Parse and render anonymous classes correctly on php 8
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyAccessor] Added missing property path on php 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
This PR adds the property path to the exception message to fix failing tests on php 8.
Commits
-------
6a73bcdb8e [PropertyAccessor] Added missing property path on php 8.
* 5.1: (33 commits)
[Cache] $lifetime cannot be null
[Serializer] minor cleanup
fix merge
Run PHP 8 as 7.4.99
Remove calls to deprecated ReflectionParameter::getClass().
[VarDumper] fix PHP 8 support
Removed "services" prototype node from "custom_authenticator"
Add php 8 to travis.
[Cache] Accessing undefined constants raises an Error in php8
[Cache] allow DBAL v3
Skip Doctrine DBAL on php 8 until we have a compatible version.
[DomCrawler] Catch expected ValueError.
Made method signatures compatible with their corresponding traits.
[ErrorHandler] Apply php8 fixes from Debug component.
[DomCrawler] Catch expected ValueError.
[Validator] Catch expected ValueError.
[VarDumper] ReflectionFunction::isDisabled() is deprecated.
[BrowserKit] Raw body with custom Content-Type header
Revert https://github.com/symfony/symfony/pull/34986
Make ExpressionLanguageSyntax validator usable with annotation
...
* 5.0: (28 commits)
[Cache] $lifetime cannot be null
[Serializer] minor cleanup
fix merge
Run PHP 8 as 7.4.99
Remove calls to deprecated ReflectionParameter::getClass().
[VarDumper] fix PHP 8 support
Add php 8 to travis.
[Cache] Accessing undefined constants raises an Error in php8
[Cache] allow DBAL v3
Skip Doctrine DBAL on php 8 until we have a compatible version.
[DomCrawler] Catch expected ValueError.
Made method signatures compatible with their corresponding traits.
[ErrorHandler] Apply php8 fixes from Debug component.
[DomCrawler] Catch expected ValueError.
[Validator] Catch expected ValueError.
[VarDumper] ReflectionFunction::isDisabled() is deprecated.
[BrowserKit] Raw body with custom Content-Type header
[PropertyAccess] Parse php 8 TypeErrors correctly.
[Intl] Fix call to ReflectionProperty::getValue() for static properties.
[HttpKernel] Prevent calling method_exists() with non-string values.
...
* 4.4: (27 commits)
[Serializer] minor cleanup
fix merge
Run PHP 8 as 7.4.99
Remove calls to deprecated ReflectionParameter::getClass().
[VarDumper] fix PHP 8 support
Add php 8 to travis.
[Cache] Accessing undefined constants raises an Error in php8
[Cache] allow DBAL v3
Skip Doctrine DBAL on php 8 until we have a compatible version.
[DomCrawler] Catch expected ValueError.
Made method signatures compatible with their corresponding traits.
[ErrorHandler] Apply php8 fixes from Debug component.
[DomCrawler] Catch expected ValueError.
[Validator] Catch expected ValueError.
[VarDumper] ReflectionFunction::isDisabled() is deprecated.
[BrowserKit] Raw body with custom Content-Type header
[PropertyAccess] Parse php 8 TypeErrors correctly.
[Intl] Fix call to ReflectionProperty::getValue() for static properties.
[HttpKernel] Prevent calling method_exists() with non-string values.
Fix wrong roles comparison
...
This PR was merged into the 4.4 branch.
Discussion
----------
[OptionsResolver][Serializer] Remove calls to deprecated ReflectionParameter::getClass()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Following #36891, this PR removes the remaining calls to `ReflectionParameter::getClass()` from the 4.4 branch.
Commits
-------
1575d853f1 Remove calls to deprecated ReflectionParameter::getClass().
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Accessing undefined constants raises an Error in php8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Calling `constant()` for an undefined constant will raise an `Error` on php 8. This PR adjust the Memcached tests to this new behavior.
Commits
-------
49fd0efb12 [Cache] Accessing undefined constants raises an Error in php8
* 3.4:
Skip Doctrine DBAL on php 8 until we have a compatible version.
[DomCrawler] Catch expected ValueError.
[Validator] Catch expected ValueError.
[VarDumper] ReflectionFunction::isDisabled() is deprecated.
[PropertyAccess] Parse php 8 TypeErrors correctly.
[Intl] Fix call to ReflectionProperty::getValue() for static properties.
[HttpKernel] Prevent calling method_exists() with non-string values.
[Debug] php 8 does not pass $context to error handlers.
[Config] Removed implicit cast of ReflectionProperty to string.
[Debug] Undefined variables raise a warning in php 8.
[Debug] Skip test that would trigger a fatal error on php 8.
Address deprecation of ReflectionType::getClass().
Properties $originalName and $mimeType are never null in UploadedFile
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Apply php8 fixes from Debug component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The changes of #36898 and #36897 ported to the ErrorHandler component.
Commits
-------
54f18698af [ErrorHandler] Apply php8 fixes from Debug component.
This PR was merged into the 3.4 branch.
Discussion
----------
Address deprecation of ReflectionType::getClass()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Calling `ReflectionType::getClass()` will trigger a deprecation warning on php 8. This PR switches to `getType()` if available.
Commits
-------
53b1677a4e Address deprecation of ReflectionType::getClass().
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] ReflectionFunction::isDisabled() is deprecated
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
See php/php-src#5473. Calling `ReflectionFunction::isDisabled()` is pointless on php 8 and doing so triggers a deprecation warning.
Someone who is more familiar with that component might want to have a second look on this PR. I'm not really sure if this is the right way to fix the issue.
Commits
-------
1da347e5ba [VarDumper] ReflectionFunction::isDisabled() is deprecated.
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Catch expected ValueError
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
`mb_check_encoding()` raises a `ValueError` on php 8 if an invalid encoding was passed. The validator that was patched here is expected to fail gracefully in that situation. This PR restores that behavior under php 8.
Maybe we can reconsider this behavior for Symfony 5.2. It feels a bit odd to me because we swallow a potential misconfiguration of the validator.
Commits
-------
8f3f67f82a [Validator] Catch expected ValueError.
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccess] Parse php 8 TypeErrors correctly
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The wording of `TypeError` messages has changed in php 8. Since `PropertyAccessor` parses those messages, the logic needed some adjustments.
Commits
-------
7100c3ce1b [PropertyAccess] Parse php 8 TypeErrors correctly.
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] php 8 does not pass $context to error handlers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
php 8 will call error handlers without the optional `$context` parameter. Thus, error handlers that make that parameter mandatory will break.
Commits
-------
593897c9e1 [Debug] php 8 does not pass $context to error handlers.
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[BrowserKit] Raw body with custom Content-Type header
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
Currently, if you try to send POST/PUT request with custom `Content-Type` header and specified body, the real request will contain `text/plain` content type.
Following code
```php
$client->request(
'POST',
'/url',
[],
[],
[
'CONTENT_TYPE' => 'application/json'
],
'{"foo":"bar"}'
);
```
produces next request
```
POST /
Content-Type: text/plain; charset=utf-8
{"foo":"bar"}
```
With this fix, the request will be
```
POST /
Content-Type: application/json
{"foo":"bar"}
```
Commits
-------
d2dd92be77 [BrowserKit] Raw body with custom Content-Type header
This PR was merged into the 3.4 branch.
Discussion
----------
UploadedFile minor fixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | none <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | no
According to the [constructor assignments](cb7e78c809/src/Symfony/Component/HttpFoundation/File/UploadedFile.php (L60)), properties `$originalName` and `$mimeType` are never null in `UploadedFile`, so `getClientOriginalName()` and `getClientMimeType()` always return `string`. Also `$test` does not need a default value because it's always set in the constructor.
Commits
-------
eb8d626c27 Properties $originalName and $mimeType are never null in UploadedFile
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Fix call to ReflectionProperty::getValue() for static properties
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
When we call `ReflectionProperty::getValue()` for a static property, we don't need to pass any arguments. The code that was fixed here raised a `TypeError` on php 8 because the argument has to be an object now.
Commits
-------
d4045897d6 [Intl] Fix call to ReflectionProperty::getValue() for static properties.
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Removed implicit cast of ReflectionProperty to string
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
PHP 8 does not allow casting `ReflectionProperty` instances to string anymore.
Commits
-------
8adbadede7 [Config] Removed implicit cast of ReflectionProperty to string.
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Undefined variables raise a warning in php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
`ErrorHandlerTest` executes code with undefined variables to test how the error handler handles the triggered errors. In php 8.0, the severity and error message for this class of errors has been changed. I've adjusted the test accordingly.
Commits
-------
1d20b514f2 [Debug] Undefined variables raise a warning in php 8.
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Fixed check for allowed options in AwsSqs configuration
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
Before this fix it was unavailable to create Connection with access_key and secret_key in options, because they were added to $clientConfiguration var, and check for extra options was against $configuration var. Which lead to exception.
The idea is to check input options against self::DEFAULT_OPTIONS (which contains all available options)
Commits
-------
fb1967210e [Messenger] Fixed check for allowed options in AwsSqs configuration
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Skip test that would trigger a fatal error on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
This PR skips a test of `DebugClassLoader`. The test uses incompatible method signatures in class inheritance to provoke a php warning that should be handled by the debug class loader. On php 8 however, this error is not recoverable anymore, so the tested logic will be obsolete there.
Commits
-------
573d0dd493 [Debug] Skip test that would trigger a fatal error on php 8.