This PR was merged into the 2.7 branch.
Discussion
----------
Distinguish between first and subsequent progress bar displays
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19133
| License | MIT
| Doc PR | reference to the documentation PR, if any
Fixes https://github.com/symfony/symfony/issues/19133
When a progress bar is first displayed, if it is multi-line, previously output lines are erased, depending upon the number of lines in the progress bar.
This patch fixes that be distinguishing between the first display (no erasing of previous output) and subsequent displays of the progress bar.
Commits
-------
3871e1a Differentiate between the first time a progress bar is displayed and subsequent times
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] support for array values in route defaults
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As pointed out in symfony/symfony-docs#4017, the ``XmlFileLoader`` was not capable of defining array default values.
- [x] array values
- [x] integer values
- [x] float values
- [x] boolean
Commits
-------
120b35c [Routing] data type support for defaults
As pointed out in symfony/symfony-docs#4017, the XmlFileLoader was not
capable of defining array default values. Additionally, this commit
adds support for handling associative arrays, boolean, integer, float
and string data types.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Add support for XmlReader objects
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18989
| License | MIT
| Doc PR | -
Commits
-------
3779ee4 [VarDumper] Add support for XmlReader objects
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Add Lockable trait
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none for the moment :)
Hi there,
Since the 2.6 the `LockHandler` class was added to ease concurrency problems. There was a nice post about [using it in your commands](http://symfony.com/blog/new-in-symfony-2-6-lockhandler).
From my humble experience, I find it a bit unpleasant/time consuming to always copy/paste the same code. So here is my proposal:
Before:
```php
class UpdateContentsCommand extends Command
{
protected function configure()
{
// ...
}
protected function execute(InputInterface $input, OutputInterface $output)
{
// create the lock
$lock = new LockHandler('update:contents');
if (!$lock->lock()) {
$output->writeln('The command is already running in another process.');
return 0;
}
// Your code
$lock->release();
}
}
```
After:
```php
class MyCommand extends Command
{
use LockableTrait;
protected function execute(InputInterface $input, OutputInterface $output)
{
if (!$this->lock()) {
// Here you can handle locking errors
}
// Your code
// The lock release is still optionnal
$this->release();
}
}
```
In addition, you can optionally pass two arguments:
- a string argument to change the lock name
- a boolean argument to indicate if you want to wait until the requested lock is released
Commits
-------
b57a83f [Console] Add Lockable trait
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle][Yaml] Move YamlLintCommand to the Yaml component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18987
| License | MIT
| Doc PR | ~
See #18987 for the use case.
Also I see several things that can be simplified/optimized in the original command, but I think it would be better to propose the changes in a next PR and just propose the exact changes needed to move it outside of the framework. If all should be done here, let me know before reviewing it.
Commits
-------
33402ea Add Yaml LintCommand
Add tests
Fix tests & YamlLintCommand help formatting
fabbot fixes
Use Generator to iterate over the filesystem
Move STDIN related code in a method
Use RecursiveIteratorIterator::LEAVES_ONLY rather than SELF_FIRST
Stop using the Finder component when available (Make findFiles() private)
Re-add FrameworkBundle YamlLintCommandTest
Use CommandTester::getStatusCode() rather than assign execute()
Re-add feature for bundle directories, Test it
This PR was squashed before being merged into the 2.8 branch (closes#19142).
Discussion
----------
[Security] [Guard] Improve comment with working example
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Improve the code given in the comment to make it work.
If you follow blindly the previous example (as I did) and never return null, you're stucked in an infinite redirection loop on your login page.
Commits
-------
b36fc32 [Security] [Guard] Improve comment with working example
This PR was merged into the 2.7 branch.
Discussion
----------
sync min email validator version
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I stumbled upon this while trying to run the min deps version tests while installing everything from the global `composer.json` file. In the Validator component, we already have this present for a long time sine b1b5cca41c.
Commits
-------
c484db1 sync min email validator version
This PR was merged into the 3.2-dev branch.
Discussion
----------
Response headers fix
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes/no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16171, #16307
| License | MIT
| Doc PR | n/a
To fix the inconsistency mentioned in #16171, I think the "best" solution would be to add `private` when cache-control is not set, which was the intention but was forgotten.
I propose to make the fix in 3.2 only as it might be a BC break.
Commits
-------
66afa01 [HttpFoundation] added private by default when setting Cache-Control to no-cache
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Reference changes that ease command testing in changelog
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
I totally forget to do it in the corresponding PRs,
I used `3.2.0` even if not yet released, hope that is correct.
Commits
-------
a0b4ae7 Reference changes that ease command testing in 3.2
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Form][FrameworkBundle][Bridge] Add a DateInterval form type
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13389
| License | MIT
| Doc PR | symfony/symfony-docs#4817
Replaces #15030
Commits
-------
f7669be [Form] Add a DateInterval form type Also add dateinterval widget to twig templates.
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes#19100).
Discussion
----------
[Console] Fixed SymfonyQuestionHelper multi-choice with defaults
|Q |A |
|--- |---|
|Bug Fix? |yes|
|New Feature? |no |
|BC Breaks? |no |
|Deprecations?|no |
|Tests Pass? |yes|
|Fixed Tickets| |
|License |MIT|
|Doc PR | |
When you use the SymfonyStyle with a multi-choice question and multiple defaults.
You get an notice because the key is used as-is `0,1` instead of splitting the value.
This pull-request changes the SymfonyQuestionHelper to checks if the Choice is a multi-choice
and displays the selected values correctly `[blue, yellow]`.
Note: Tests are missing, but both the SymfonyStyle and SymfonyQuestionHelper classes
have almost no tests. Making it really hard 😇 hopefully #19097 will make this easier 👍
Commits
-------
a8f6f85 Fixed SymfonyQuestionHelper multi-choice with defaults
This PR was merged into the 2.7 branch.
Discussion
----------
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR is porting an optimization done for `loadChoicesForValues()` in 64c80a6791 to `loadValuesForChoices()`.
Commits
-------
f6e5298 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Bridge][Twig] Optionally pass dumper into DumpExtension
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Allow the dumper to be passed into `DumpExtension` constructor. This allows a different dumper to be used or even just `HtmlDumper` with a non-default configuration, such as different styles.
Note: The dumper's output is ignored.
Commits
-------
d8c0f1d [Bridge][Twig] Optionally pass dumper into DumpExtension
This PR was merged into the 2.7 branch.
Discussion
----------
[DomCrawler] No more exception on field name with strange format
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18569, #18570
| License | MIT
| Doc PR | n/a
Commits
-------
e204913 finished previous commit
953a383 No more exception for malformed input name
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Consider a violation even if the form is not submitted
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (only for the behavior)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11493
| License | MIT
| Doc PR |
Hey!
I'm currently implementing an API using the form component in order to validate the payload sent (in conjonction with the FOSRestBundle). Unfortunatelly, we dig into an issue about the PATCH request which don't map some of our validation rules to the form. Basically, the violations are lost in the middle of the process.
### Use case
We have an entity with the following fields "type", "image" & "video". The field "type"can be either "default", "image" or "video" and then accordingly we use the appropriate field (none for the "default" type, video for the "video" type and image for the "image" type. Then, in our form, we change the validation groups according to our entity type in order to make the "image" field mandatory if the type is "image" and the same for the video field if the type is "video".
### Current behavior
The current behavior (since 2.5) seems to not propages a violation to a form if this form is not submitted but in our use case, changing the field "type" via a PATCH request triggers some new validation which should be reported to end user (inform that a field (video or image) is missing in the PATCH request).
### Expected behavior
The current behavior was introduced in #10567 but IMO, this update is a bug as suggested by @webmozart in https://github.com/symfony/symfony/issues/11493#issuecomment-59549054 Instead, the form component should still map validation errors to the form even if the field was not submitted. If the initial data is not valid, then your initial data was buggy from the beginning but the form should not accept it and instead of silently ignoring the errors, end users should be informed and fix it.
WDYT?
Commits
-------
c483a0f [Form] Consider a violation even if the form is not submitted
This PR was squashed before being merged into the 3.2-dev branch (closes#18022).
Discussion
----------
[DependencyInjection] Sort the CompilerPass by priority
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/10778
| License | MIT
| Doc PR |
This PR replaces the CompilerPass types by a new priority argument.
Sometimes we want to be sure that a CompilerPass will be executed after another but we can't do that because we don't know when the other pass will be added.
This PR fixes this by allowing people to simply choose when their compiler passes will be executed.
Things to debate:
- the constants value
- should we create a new function to get/set passes for a specific priority ?
Commits
-------
d17c1a9 [DependencyInjection] Sort the CompilerPass by priority
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix pipes cleaning on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19089
| License | MIT
| Doc PR | -
Commits
-------
d54cd02 [Process] Fix pipes cleaning on Windows
This PR was merged into the 3.2-dev branch.
Discussion
----------
Avoid phpunit 5.4 warnings on getMock (master)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19125
| License | MIT
| Doc PR | ~
Avoids calling `getMock()` in phpunit 5.4 which will trigger a warning (and thus failing test suite) when used by developers as this TestCase is an extension point.
_in the other branches (opposed to #19128), this was not in the `Test` namespace yet but in `Tests`. Therefore I've only added this in the master as changed by @WouterJ in e938361cf71f78ae5affd454debfca24c31a3cd7._
Commits
-------
eb8c27e Avoid phpunit 5.4 warnings on getMock
This PR was merged into the 2.7 branch.
Discussion
----------
Avoid phpunit 5.4 warnings on getMock (2.7+)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19125
| License | MIT
| Doc PR | ~
Avoids calling `getMock()` in phpunit 5.4 which will trigger a warning (and thus failing test suite) when used by developers as this TestCase is an extension point.
Commits
-------
b05014c Avoid phpunit 5.4 warnings on getMock