This PR was merged into the 5.2-dev branch.
Discussion
----------
[DomCrawler] Add `assertFormValue()` in `WebTestCase`
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| 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 -->
Add new assertions for checking form values, to use in functional tests.
Example:
```php
public function testForm()
{
$this->visit('/edit-form');
self::assertNoFormValue('#form', 'activateMembership'); // checkboxes don't have values when unchecked
self::assertFormValue('#form', 'trialPeriod', '15');
$this->client->submitForm('Save', [
'activateMembership' => 'on',
'trialPeriod' => '7',
]);
self::assertResponseIsSuccessful();
self::assertFormValue('#form', 'activateMembership', 'on');
self::assertFormValue('#form', 'trialPeriod', '7');
}
```
I resorted to using the `->form()` API because:
- checking the value of checkboxes was not possible today via existing assertions (I opened #38287 for that)
- checking the value of selects was impossible using CSS selectors (as far as I know), but possible with the `->form()` helper
Commits
-------
c3e0336596 [DomCrawler] Add `assertFormValue()` and `assertNoFormValue()` in `WebTestCase`
This PR was merged into the 5.2-dev branch.
Discussion
----------
[DomCrawler] Add checkbox assertions for functional tests
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| 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 -->
Add new assertions for checkboxes, to use in functional tests.
Example:
```php
public function testAssertCheckboxChecked()
{
$this->visit('/edit-form');
$this->client->submitForm('Save', [
'activateMembership' => 'on',
]);
self::assertResponseIsSuccessful();
// Check that the field is checked after the form was submitted
self::assertCheckboxChecked('activateMembership');
}
```
This wasn't possible to achieve with the existing `self::assertInputValueSame()` assertion.
Commits
-------
f26758e1c0 [DomCrawler] Add `assertCheckboxChecked()`
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Validator] Add invalid datetime message in Range validator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
When the validated value is invalid (it isn't a number nor a datetime), but `min` or `max` option indicate that the `Range` constraint is being used to validate a datetime, the displayed message will be `This value should be a valid datetime` instead of `This value should be a valid number`. This PR replaces #35998.
Commits
-------
c77730699e [Validator] Add invalid datetime message in Range validator
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpKernel] Auto-register kernel as an extension
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Symfony already supports having the kernel as an extension. This is evident by the fact that the [`config:dump-reference` and `debug:config`](https://github.com/symfony/symfony/pull/36186) commands check whether the kernel implements the `ExtensionInterface`. Nonetheless, it's still required to register the kernel manually as an extension.
With this PR the kernel will be automatically registered as an extension if it implements the `ExtensionInterface`. This is the same logic as when the kernel implements the `CompilerPassInterface`.
Commits
-------
9c34980869 Auto-register kernel as an extension
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Mailer] Added Sendinblue bridge
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| License | MIT
| Doc PR | [https://github.com/symfony/symfony-docs/pull/14272](https://github.com/symfony/symfony-docs/pull/14272)
| Recipe | [https://github.com/symfony/recipes/pull/822](https://github.com/symfony/recipes/pull/822)
<!--
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.
-->
N.B. I had a little help from [Pierre TONDEREAU](https://github.com/ptondereau) for the API.
Commits
-------
836a20350b [Mailer] Added Sendinblue bridge
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Form] Added "html5" option to both MoneyType and PercentType
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | TBD
Hello,
In the same way that [NumberType](https://symfony.com/doc/current/reference/forms/types/number.html) offers a `html5` option to render a `number` input instead of a `text` input, this PR adds the same option to both `MoneyType` and `PercentType`. Number inputs offer a better UI, especially on mobile (specific keyboard), and they accept extra HTML attributes, such as `max=100`, which are quite useful.
The challenge is that `number` inputs need a "raw" value, nor formatted nor localized.
Format is described here https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats (non-normative, but tested on a few browsers). It matches number formatting for `en` locale (which is great, since it is the one provided by Symfony Intl polyflil), without grouping.
Implementation was done in a manner similar to `NumberType` for `MoneyType`.
`PercentType` required to modify `PercentToLocalizedStringTransformer` too.
As a bonus, `PercentType` had no tests at all, I added a few.
I wanted to get some feedback on the idea first, remaining steps:
- update `CHANGELOG.md`
- update the doc
Commits
-------
f7312a48ea [Form] Added "html5" option to both MoneyType and PercentType
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpClient] Allow bearer token with colon
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
The JetBrains Hub (YouTrack API) creates tokens with a `perm:` prefix. This doesn't work right now, because HttpClient doesn't allow a colon in the bearer token.
As far as I can see, there is no reason to disallow the use of the semicolon in the bearer token, so this PR fixes it.
Example of a token: `perm:c3RlcGhhbg==.NTUtMw==.NiZw16agafhsQAShTvclhb78hyJh2H`
Commits
-------
82ed1ec20a [HttpClient] Allow bearer token with colon
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] Fix custom formats deprecation with HTML5 widgets
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37698
| License | MIT
| Doc PR | -
1. The options resolver only show the deprecations for user defined (overidden) options.
2. The default value of the `html5` option is enough to pass the logical condition of the callback.
That means that only setting the `format` option (like in the reproducer) does not trigger the deprecation while it should. I think we need a feature in the options resolver component to handle those kind of cases 🤷♂️
Meanwhile, we can fix the issue by "deprecating" all the concerned options of the logical condition of the callback.
Commits
-------
d28182f99b [Form] Fix custom formats deprecation with HTML5 widgets
This PR was submitted for the 5.1 branch but it was merged into the 5.2-dev branch instead.
Discussion
----------
[String] allow passing null to string functions
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#38260
| License | MIT
| Doc PR | n/a
I also added a default value for `s` to match the other functions.
Commits
-------
f20a318f37 [String] allow passing null to string functions
This PR was merged into the 5.2-dev branch.
Discussion
----------
Always require SQL comment hint
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The `GuidType` does not always return true, because it is mapped to the native uuid type if available. But `AbstractBinaryUidType` and `AbstractUidType` are not mapped like that, so they always requires the comment hint to avoid issues when diffing the schema (the DB introspection would detect a `GuidType` and so a change would be needed).
Commits
-------
33e78b43a4 Always require SQL comment hint
This PR was merged into the 4.4 branch.
Discussion
----------
[Contracts][Translation] Optional Intl dependency
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| 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 -->
same as #38283, and should help streamlining #38230
Commits
-------
d65d39da14 [Contracts][Translation] Optional Intl dependency
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Translator] Optional Intl dependency
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38279
| 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.
-->
i decided to cast $locale at construct, given its property is documented to be string
Commits
-------
a2eb263457 [Translator] Optional Intl dependency
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Escape JSON encoded log context
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | eno <!-- 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 -->
Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-581317792
Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-696767559
The initial issue remains though (the webprofiler showing the logs tab in the exception panel), i'll try to give it another look sometime, but this is a quick win nevertheless.
cc @yceruto
Commits
-------
5572a68ed7 [ErrorHandler] Escape JSON encoded log context
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Config] Adding the "info" to a missing option error messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | None
| License | MIT
| Doc PR | Not needed
New error:
<img width="1063" alt="Screen Shot 2020-09-13 at 10 51 32 AM" src="https://user-images.githubusercontent.com/121003/93021186-6329ff00-f5af-11ea-83c6-98581b12ef75.png">
I used the missing `class` just as an example. I hit this while building a new feature in Symfony. It occurred to me that if, for example, you activate some feature in config and that feature has a required sub-key, why not print the `info()` for that sub key to make it discoverable?
Commits
-------
3780f122c7 adding the description to a missing option
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
update missing translations arabic
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4, 4.4 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 #", no need to create an issue if none exist, explain below instead -->
| 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
-------
76a47b38e2 update missing translations arabic
This PR was merged into the 5.2-dev branch.
Discussion
----------
Return AbstractUid as string
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Should return AbstractUidType as string.
Commits
-------
1a9d76a869 Return AbstractUid as string
This PR was merged into the 5.2-dev branch.
Discussion
----------
replace expectExceptionMessageRegExp() with expectExceptionMessageMat…
…ches()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
593a94c932 replace expectExceptionMessageRegExp() with expectExceptionMessageMatches()
This PR was merged into the 5.1 branch.
Discussion
----------
[SecurityBundle] fix class name
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
see https://travis-ci.org/github/symfony/symfony/jobs/728702294#L3552
Commits
-------
6e40ca3183 fix class name
* 5.1: (25 commits)
stop using the deprecated at() PHPUnit matcher
fix lowest allowed version of the HTTP client contracts
fix lowest allowed version for the PHPUnit bridge
fix merge
fix merge
drop logger mock in favor of using the BufferingLogger
catch ValueError thrown on PHP 8
[Yaml Parser] Fix edge cases when parsing multiple documents
fix parsing comments not prefixed by a space
[Translator] Make sure a null locale is handled properly
deal with errors being thrown on PHP 8
loadRoutes shoud receive RoutingPhpFileLoader
[Cache] Allow cache tags to be objects implementing __toString()
[HttpKernel] Do not override max_redirects option in HttpClientKernel
Log notice when no entry point is configured
remove superfluous cast
[HttpClient] Support for CURLOPT_LOCALPORT.
Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
Fixed exception message formatting
[FrameworkBundle] Fix error in xsd which prevent to register more than one metadata
...
This PR was merged into the 5.1 branch.
Discussion
----------
[Validator] stop using the deprecated at() PHPUnit matcher
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
0d0f92b7c6 stop using the deprecated at() PHPUnit matcher
This PR was merged into the 5.1 branch.
Discussion
----------
[HttpClient] fix lowest allowed version of the HTTP client contracts
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
fixes `deps=low` builds for the HttpClient component by making sure that the installed version of the HTTP client contracts package contains the changes from #37831
Commits
-------
edca581889 fix lowest allowed version of the HTTP client contracts