Commit Graph

26780 Commits

Author SHA1 Message Date
Fabien Potencier
97c3102382 minor #19148 [TwigBridge] Fix inconsistency in LintCommand help (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Fix inconsistency in LintCommand help

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19139#discussion_r68058993
| License       | MIT
| Doc PR        | ~

Actually, the `lint:yaml` command's help looks like this:

![](http://image.prntscr.com/image/95dddf38ebcf408b8e2e23cf09c3ddf6.png)

The last `Or` about STDIN is syntactically wrong, and is the only one to have a code example with indentation. This gives the same indentation for all code blocks and move the STDIN-related part as first, as proposed in https://github.com/symfony/symfony/pull/19139#discussion_r68049018 .

Now it looks like:

![](http://image.prntscr.com/image/8877349f6be746c981c2e9037d2d17ff.png)

Commits
-------

f54bb16 [TwigBridge] Fix inconsistency in LintCommand help
2016-06-23 07:23:24 +02:00
Fabien Potencier
989f821703 minor #19147 [Validator] explicitly forbid e-mail validator 2.0 or higher (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] explicitly forbid e-mail validator 2.0 or higher

| 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        |

Commits
-------

81a6d8e explicitly forbid e-mail validator 2.0 or higher
2016-06-23 07:20:59 +02:00
Robin Chalas
f54bb16862
[TwigBridge] Fix inconsistency in LintCommand help 2016-06-22 23:40:57 +02:00
Christian Flothmann
81a6d8ed88 explicitly forbid e-mail validator 2.0 or higher 2016-06-22 23:25:31 +02:00
Robin Chalas
a0b4ae724c
Reference changes that ease command testing in 3.2 2016-06-22 21:54:18 +02:00
Fabien Potencier
66afa01057 [HttpFoundation] added private by default when setting Cache-Control to no-cache 2016-06-22 15:19:50 +02:00
Fabien Potencier
1298ce51cb feature #16809 [Form][FrameworkBundle][Bridge] Add a DateInterval form type (MisatoTremor)
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.
2016-06-22 14:02:20 +02:00
Fabien Potencier
e8901b1669 bug #19061 [FORM] fix post_max_size_message translation (alt. 2) (David Badura)
This PR was merged into the 2.7 branch.

Discussion
----------

[FORM] fix post_max_size_message translation (alt. 2)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15479, #18543
| License       | MIT
| Doc PR        | -

Commits
-------

9d8a5e5 fix post_max_size_message translation
2016-06-22 13:59:59 +02:00
Steffen Roßkamp
f7669bedbf [Form] Add a DateInterval form type
Also add dateinterval widget to twig templates.
2016-06-22 13:52:09 +02:00
Fabien Potencier
dadf570c7b bug #19100 [Console] Fixed SymfonyQuestionHelper multi-choice with defaults (sstok)
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
2016-06-22 13:33:19 +02:00
Sebastiaan Stok
a8f6f85748 Fixed SymfonyQuestionHelper multi-choice with defaults 2016-06-22 13:33:19 +02:00
Fabien Potencier
80057b07e0 bug #18924 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure (webmozart)
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
2016-06-22 13:11:55 +02:00
Bernhard Schussek
f6e5298f02 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure 2016-06-22 11:11:07 +02:00
Richard Quadling
3871e1a950 Differentiate between the first time a progress bar is displayed and subsequent times 2016-06-22 09:44:25 +01:00
Fabien Potencier
24e08e9657 feature #18466 [Bridge][Twig] Optionally pass dumper into DumpExtension (CarsonF)
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
2016-06-22 09:21:58 +02:00
Fabien Potencier
eaca0bb0fa bug #19138 [DomCrawler] No more exception on field name with strange format (guiled, fabpot)
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
2016-06-22 08:42:02 +02:00
Fabien Potencier
e204913a67 finished previous commit 2016-06-22 08:40:44 +02:00
guiled
953a3835a2 No more exception for malformed input name 2016-06-22 08:06:22 +02:00
David Badura
9d8a5e5a04 fix post_max_size_message translation 2016-06-21 22:32:24 +02:00
Fabien Potencier
f28eb9a617 bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)
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
2016-06-21 22:19:14 +02:00
Fabien Potencier
bbb75faa15 bug #19127 [Form] Add exception to FormRenderer about non-unique block names (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Add exception to FormRenderer about non-unique block names

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17874
| License       | MIT
| Doc PR        |

Commits
-------

c6db6f3 [Form] Add exception to FormRenderer about non-unique block names
2016-06-21 22:02:08 +02:00
Fabien Potencier
81f4f63ebc feature #18022 [DependencyInjection] Sort the CompilerPass by priority (Ener-Getick)
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
2016-06-21 21:44:39 +02:00
Ener-Getick
d17c1a9734 [DependencyInjection] Sort the CompilerPass by priority 2016-06-21 21:44:32 +02:00
Romain Neutron
ec19a527be bug #19118 [Process] Fix pipes cleaning on Windows (nicolas-grekas)
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
2016-06-21 15:46:37 +02:00
Nicolas Grekas
fce02990f2 bug #19129 Avoid phpunit 5.4 warnings on getMock (master) (iltar)
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
2016-06-21 15:40:34 +02:00
Nicolas Grekas
a65fe45ec9 bug #19128 Avoid phpunit 5.4 warnings on getMock (2.7+) (iltar)
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
2016-06-21 15:39:41 +02:00
Nicolas Grekas
d54cd02d06 [Process] Fix pipes cleaning on Windows 2016-06-21 14:37:54 +02:00
Iltar van der Berg
eb8c27e882 Avoid phpunit 5.4 warnings on getMock 2016-06-21 10:07:44 +02:00
Iltar van der Berg
b05014c2e9 Avoid phpunit 5.4 warnings on getMock 2016-06-21 09:59:55 +02:00
Jáchym Toušek
c6db6f3d50 [Form] Add exception to FormRenderer about non-unique block names 2016-06-21 09:39:01 +02:00
Fabien Potencier
fc3cb0b94c bug #19120 [FrameworkBundle] templating can be fully disabled (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #19120).

Discussion
----------

[FrameworkBundle] templating can be fully disabled

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19052
| License       | MIT
| Doc PR        |

Commits
-------

92a7f10 [FrameworkBundle] templating can be fully disabled
2016-06-21 09:27:54 +02:00
Christian Flothmann
92a7f10de5 [FrameworkBundle] templating can be fully disabled 2016-06-21 09:27:54 +02:00
Fabien Potencier
26eca5d8c9 bug #19126 [PhpUnitBridge] use call_user_func() for PHP 5.3 compatibility (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] use call_user_func() for PHP 5.3 compatibility

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Not all callables can be called directly on PHP 5.3 (for example, `array('className', 'methodName')` does not work).

Commits
-------

8549e05 use call_user_func() for PHP 5.3 compatibility
2016-06-21 09:23:35 +02:00
Christian Flothmann
8549e05755 use call_user_func() for PHP 5.3 compatibility
Not all callables can be called directly on PHP 5.3 (for example,
`array('className', 'methodName')` does not work).
2016-06-21 09:14:25 +02:00
Fabien Potencier
a41f359e51 fixed CS 2016-06-21 08:43:40 +02:00
Fabien Potencier
0691506b1b Merge branch '3.1'
* 3.1:
  fixed CS
  fixed CS
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  parse embedded mappings only if value is a string
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  [YAML] Fixed parsing problem with nested DateTime lists
  Fixed typo in PHPDoc
2016-06-21 08:41:01 +02:00
Fabien Potencier
04f265911e minor #19124 fixed CS (fabpot)
This PR was merged into the 3.1 branch.

Discussion
----------

fixed CS

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I submit this one to check that everyone is ok to NOT mix short array notations with long array notations in Symfony even in 3.x. Consistency is better IMHO.

Commits
-------

a39afd0 fixed CS
2016-06-21 08:39:33 +02:00
Fabien Potencier
a4ce063029 Revert "feature #18977 [PropertyAccess] Add missing arguments to PropertyAccess::createPropertyAccessor() (chalasr)"
This reverts commit 86eb7a3339, reversing
changes made to 856c9f6024.
2016-06-21 08:31:10 +02:00
Fabien Potencier
f2ee67feae Revert "minor #19030 [PropertyAccess] add missing argument PHPdoc (xabbuh)"
This reverts commit 3844fb982f, reversing
changes made to e188cd75b5.
2016-06-21 08:31:05 +02:00
Fabien Potencier
a39afd001f fixed CS 2016-06-21 08:06:14 +02:00
Fabien Potencier
9cbec2c4fa Merge branch '3.0' into 3.1
* 3.0:
  fixed CS
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:59:09 +02:00
Fabien Potencier
be0b8f088f fixed CS 2016-06-21 07:58:59 +02:00
Fabien Potencier
9800cdd8f4 Merge branch '2.8' into 3.0
* 2.8:
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:48:46 +02:00
Fabien Potencier
90151ef5c5 fixed CS 2016-06-21 07:43:49 +02:00
Fabien Potencier
548f3d0339 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:36:02 +02:00
Fabien Potencier
0854c121c9 minor #19121 Php cs fixer (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Php cs fixer

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

7cc3ca5 fixed CS
fdef804 tweaked default CS fixer config
2016-06-21 07:29:01 +02:00
Fabien Potencier
7cc3ca59d0 fixed CS 2016-06-20 18:47:20 +02:00
Fabien Potencier
fdef8041f8 tweaked default CS fixer config 2016-06-20 18:47:15 +02:00
Fabien Potencier
8868e0e1df minor #19116 [Debug] fix resource type test on HHVM (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Debug] fix resource type test on HHVM

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19079
| License       | MIT
| Doc PR        |

Commits
-------

2d03ee8 [Debug] fix resource type test on HHVM
2016-06-20 18:09:00 +02:00
Christian Flothmann
2d03ee807f [Debug] fix resource type test on HHVM 2016-06-20 17:51:36 +02:00