This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix FormDefaultChoiceListFactory test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29731#pullrequestreview-189023682
| License | MIT
| Doc PR | n/a
`$groupBy` is either `null` or `callable`. Passing `array()` is wrong.
Commits
-------
b8f6390ef9 Fixed groupBy argument value in DefaultChoiceListFactoryTest
This PR was merged into the 3.4 branch.
Discussion
----------
remove no longer needed PHP version checks
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
99448c6e78 remove no longer needed PHP version checks
This PR was merged into the 4.1 branch.
Discussion
----------
remove no longer needed PHP version checks
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
7a132fe156 remove no longer needed PHP version checks
* 4.2:
Ensure final input of CommandTester works with default
Do not risk waiting 100 seconds
[Intl] handle null date and time types
Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
Do not ignore the choice groups for caching
This PR was merged into the 3.4 branch.
Discussion
----------
Ensure final input of CommandTester works with default
| Q | A
| ------------- | ---
| Branch? | 4.x
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If the final element of `CommandTester::setInputs()` is an empty string (to send the default value), the internal stream the tester uses hits EOF and triggers the `Aborted` exception. This appends an additional EOL to the stream after the `implode` to simulate one final return key, allowing the final input to use the default value when used in the tester's documented style.
A test has been added to cover the new behavior, which failed before this change.
Commits
-------
6b87b67 Ensure final input of CommandTester works with default
If the final element of `CommandTester::setInputs()` is an empty string (to send the default value), the internal stream the tester uses hits EOF and triggers the `Aborted` exception. This appends an additional EOL to the stream after the `implode` to simulate one final return key, allowing the final input to use the default value when used in the tester's documented style.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Do not ignore the choice groups for caching
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
While working on a different issue I suddenly came over a strange behaviour.
```php
$builder
->add('choice1', ChoiceType::class, [
'choices' => [
'a' => 'a',
'b' => 'b',
'c' => 'c',
],
'multiple' => true,
])
->add('choice2', ChoiceType::class, [
'choices' => [
'ab' => [
'a' => 'a',
'b' => 'b',
],
'c' => 'c',
],
'multiple' => true,
]);
```
The code above will result in two identical selects:
![image](https://user-images.githubusercontent.com/2552865/50459865-b3e36980-0980-11e9-8f3d-17f9cfa9a7f8.png)
The reason for this is hash generation in `Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator::createListFromChoices()` — it does not take array structure into account. See [the comment and the code below it](7f46dfb1c4/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php (L116)).
The comment says that the same choice list should be returned for the same collection of choices no matter the structure. This is wrong, because `ChoiceListInterface` has a method `getStructuredValues()` and thus a list instance cannot identified by a hash which does not take structure into account.
I propose a simple change that fixes this and allows for similar choice fields with different groupings.
ping @HeahDude
Commits
-------
9007911a85 Do not ignore the choice groups for caching
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Add new block_prefix option for an easy form theming
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29651
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10835
Commits
-------
bd50ac44fc Add block_prefix option for an easy form theming
This PR was merged into the 4.2 branch.
Discussion
----------
Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Intl is an hard dependency for Form, these checks cannot be reached.
Commits
-------
3ac98a6a17 Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
This PR was merged into the 4.2 branch.
Discussion
----------
[PHPUnitBridge][TestSuite] Do not risk waiting 100 seconds
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | nofiles -->
| Tests pass? | yes, a bit more often
| Fixed tickets | not entirely fixing it
| License | MIT
| Doc PR | n/a
It this happens, and it happens, this will make the build quite slow.
Refs #29760
Commits
-------
9f45af4a2b Do not risk waiting 100 seconds
This PR was squashed before being merged into the 4.3-dev branch (closes#29755).
Discussion
----------
Improved BIC + IBAN validator for some special cases
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License | MIT
| Doc PR | -
While blogging about [Improved Financial Constraints in Symfony 4.3](https://symfony.com/blog/new-in-symfony-4-3-improved-financial-constraints) I found this resource that mentions some exceptions when validating BIC + IBAN: https://wiki.xmldation.com/index.php?title=Support/EPC/IBAN_%26_BIC_relation
I don't know if that resource is fully reliable ... but I checked it in the official "European Banking Resources" website (https://www.ecbs.org/iban/) and most of it matches, so I think we can safely make this change.
Commits
-------
88a1696a64 Improved BIC + IBAN validator for some special cases
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] handle null date and time types
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29705
| License | MIT
| Doc PR |
Commits
-------
6ded31a3b9 [Intl] handle null date and time types
* 4.2:
update years in license files
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
access the container getting it from the kernel
Replace slave and master by replica and primary
Fix erasing cookies issue
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[VarExporter] fix exporting array indexes
[SecurityBundle] Fix traceable voters
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
Fixed minor typos in an error message
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
* 4.1:
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
access the container getting it from the kernel
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
* 3.4:
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
This PR was squashed before being merged into the 4.3-dev branch (closes#29528).
Discussion
----------
[DebugBundle] Added 'theme' option to change the color of dump() when rendered inside templates
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Added a html_dumper_theme option config to use the new HtmlDumper light theme when using dump() inside templates
#SymfonyConHackday2018
Commits
-------
91e8057d9a [DebugBundle] Added 'theme' option to change the color of dump() when rendered inside templates
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpKernel] Set the default locale early
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Similar to #29186, the default locale isn't set till after the router so isn't available when trying to handle errors there (well, only the _default_ default locale is).
Commits
-------
02c9f352d9 Set the default locale early
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpKernel] Increase priority of AddRequestFormatsListener
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19469
| License | MIT
| Doc PR |
Currently `AddRequestFormatsListener` has a low priority, so it won't fire before others like `RouterListener` which can create problems (eg when listening for a HTTP exception thrown by the router you don't have access for any custom types).
IMO this map should be in the application rather than set on every request, but the same can be achieved by giving it a high priority. (Can't think of a reason for it to not be first...)
Commits
-------
9bf313660d Increase priority of AddRequestFormatsListener
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Choices constraint improvement
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Hi,
here is a little improvement for the choice constraint: expose a new `choices` wildcard for the messages, in order to provide a way to display easily the valid choices to the user.
thanks.
Commits
-------
71dfa35a21 add new `choices` wildcard in message
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes#29723).
Discussion
----------
"ParserTest->getParserTestData()" -> only some more tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Added only some more tests, because I missed to add ' into my selector and then I got this error ```SyntaxErrorException : Expected "]", but <delimiter "["``` ... so I tested my use-case directly here in the unit-tests.
Commits
-------
a95a8e418b \"ParserTest->getParserTestData()\" -> only some more tests
This PR was submitted for the master branch but it was merged into the 4.1 branch instead (closes#29708).
Discussion
----------
[FrameworkBundle] access the container getting it from the kernel
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29707
| License | MIT
| Doc PR |
Commits
-------
68ea3f1a64 access the container getting it from the kernel
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes#29744).
Discussion
----------
Replace slave and master by replica and primary
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29735
| License | MIT
| Doc PR |
I targeted 4.2 branch because the words were introduced in it cf. https://github.com/symfony/symfony/pull/27291
Commits
-------
f06e6b46ef Replace slave and master by replica and primary
This PR was squashed before being merged into the 4.3-dev branch (closes#29283).
Discussion
----------
[Serializer] CsvEncoder no header option (encode / decode)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27447
| License | MIT
| Doc PR | -
This PR wants to introduce a new context option for the CsvEncoder, `CsvEncoder::NO_HEADERS_KEY` (boolean), that allows CSV encoding/decoding when you don't have/need a header.
By default this is assumed to be false, so the headers are included in the CSV output or assumed to be present in the CSV input.
When the option is set to true, the following behaviour occurs.
Encoding
===
The following PHP input
```php
array(array('a','b'), array('c', 'd'))
```
will generate this CSV output
```csv
a,b
c,d
```
Decoding
===
Considering the CSV input to be
```csv
a,b
c,d
```
the following PHP array will be returned
```php
array (
0 => array (
0 => 'a',
1 => 'b',
),
1 => array (
0 => 'c',
1 => 'd',
),
)
```
Commits
-------
0e63c61190 [Serializer] CsvEncoder no header option (encode / decode)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes#29676).
Discussion
----------
[HttpFoundation] Fix erasing cookies issue
| Q | A
| ------------- | ---
| Branch? | 4.2 (to be switched when merging)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29675
| License | MIT
Prevent replacing existing cookies when starting or regenerating session on PHP < 7.3 with 'cookie_samesite' option.
See issue #29675
Commits
-------
b40801a492 Fix erasing cookies issue
This PR was squashed before being merged into the 4.3-dev branch (closes#29718).
Discussion
----------
[PHPUnit bridge] Bump php version of PHPUnit-bridge
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (?)
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Related to https://github.com/symfony/symfony/pull/29623#issuecomment-450400625
I checked the BC page I think I couldn't find any related to BC changes... anyway...
As far as I understood from the comment above I must target `master` branch.
Commits
-------
59313095d3 [PHPUnit bridge] Bump php version of PHPUnit-bridge
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] Fixed phpdoc on interface
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest 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 the master branch.
-->
Commits
-------
94bd28ebb0 [EventDispatcher] Fixed phpdoc on interface