Commit Graph

23777 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
a0cdcb0ffb bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Dont close the reponse stream in debug

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

Because it's `terminate`'s job to clean the state, not the `Response`'s,
and because the current behavior prevents getting any output on trailing errors on FPM especially.

Commits
-------

2fbc200 [HttpKernel] Dont close the output stream in debug
2016-06-20 13:19:36 +02:00
Nicolas Grekas
2fbc2008e5 [HttpKernel] Dont close the output stream in debug 2016-06-20 10:21:56 +02:00
Fabien Potencier
9c8a3e9563 minor #19113 [MonologBridge] move HttpKernel component to require section (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[MonologBridge] move HttpKernel component to require section

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

Nearly every class from the bridge has (directly or indirectly) a dependency on a class from the HttpKernel component. Thus, it for me doesn't make sense to treat it as an optional dependency.

Commits
-------

138d0cb move HttpKernel component to require section
2016-06-20 10:17:43 +02:00
Christian Flothmann
138d0cb493 move HttpKernel component to require section 2016-06-20 09:57:16 +02:00
Fabien Potencier
9df08fac89 bug #19101 [Session] fix PDO transaction aborted under PostgreSQL (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Session] fix PDO transaction aborted under PostgreSQL

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

Fixes the transactional concurrency error handling for PostgreSQL which does not allow to execute further queries in a transaction with an error.
Because of the loop, look at the diff with whitespace ignored to see the difference: https://github.com/symfony/symfony/pull/19101/files?w=1

Commits
-------

f8eefa0 [Session] fix PDO transaction aborted under PostgreSQL
2016-06-19 14:22:58 +02:00
Fabien Potencier
6a8a113fb9 bug #18501 [HttpFoundation] changed MERGE queries (hjkl)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] changed MERGE queries

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

Changed the MERGE queries for Oracle and SQL Server to use question mark parameter markers so they work with emulation disabled or enabled - fixes #17284

Commits
-------

ebf3a2f Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
2016-06-19 12:25:18 +02:00
Fabien Potencier
41fd5a1f7d minor #19094 [Console] Use InputInterface inherited doc as possible (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Use InputInterface inherited doc as possible

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

In classes implementing `InputInterface`, the methods doc blocks are duplicated from the interface.
Sometimes descriptions are different from the interface's ones and, sometimes, the class doc is clearer. So I tried to keep always the most adapted one.

Commits
-------

b604be7 [Console] Use InputInterface inherited doc as possible
2016-06-19 12:24:22 +02:00
Tobias Schultze
7eab67fbb5 minor #19085 FormBuilderInterface: fix getForm() return type. (taueres)
This PR was merged into the 2.7 branch.

Discussion
----------

FormBuilderInterface: fix getForm() return type.

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

FormBuilderInterface->getForm() should depend on abstractions and
not implementations as a return type.

Commits
-------

3fa081c FormBuilderInterface: fix getForm() return type.
2016-06-18 22:20:36 +02:00
hjkl
ebf3a2ffc8 Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284 2016-06-18 20:15:19 +01:00
Tobias Schultze
f8eefa0748 [Session] fix PDO transaction aborted under PostgreSQL 2016-06-18 19:15:36 +02:00
Robin Chalas
b604be7084
[Console] Use InputInterface inherited doc as possible 2016-06-18 12:04:12 +02:00
Nicolas Grekas
86552ea2dc minor #19036 add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support (Haehnchen)
This PR was merged into the 2.7 branch.

Discussion
----------

add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support

| Q             | A
| ------------- | ---
| Branch       | 2.7
| Bug fix      | no
| New feature  | no
| BC breaks    | no
| Deprecations | no
| Tests pass   | yes
| License       | MIT

In additional to #16965 PhpStorm supports `IteratorAggregate::getIterator` now. see https://blog.jetbrains.com/phpstorm/2016/06/phpstorm-2016-2-eap-162-844/

example
```
$collection  = new \Symfony\Component\Routing\RouteCollection();
foreach ($collection as $route) {
    $route->getHost();
}
```

Commits
-------

ede3556 add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
2016-06-17 15:03:05 +02:00
Daniel Espendiller
ede35568bf add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support 2016-06-17 14:42:34 +02:00
Sergio Santoro
3fa081cc71 FormBuilderInterface: fix getForm() return type.
FormBuilderInterface->getForm() should depend on abstractions and
not implementations as a return type.
2016-06-17 13:29:11 +02:00
Fabien Potencier
eccc5353b3 minor #19080 Fixed typo in PHPDoc (ThomasLandauer)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed typo in PHPDoc

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes/no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

9e7b347 Fixed typo in PHPDoc
2016-06-16 21:18:24 +02:00
Thomas Landauer
9e7b3479dc Fixed typo in PHPDoc 2016-06-16 20:42:35 +02:00
Nicolas Grekas
d810648c24 minor #19070 [ci] Upgrade to symfony/phpunit-bridge >=3.2@dev (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ci] Upgrade to symfony/phpunit-bridge >=3.2@dev

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

Commits
-------

c12b666 [ci] Upgrade to symfony/phpunit-bridge >=3.2@dev
2016-06-16 09:27:46 +02:00
Nicolas Grekas
c12b66664f [ci] Upgrade to symfony/phpunit-bridge >=3.2@dev 2016-06-16 09:20:06 +02:00
Nicolas Grekas
37d39c6be9 bug #19062 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix UPSERT for PgSql >= 9.5

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

Commits
-------

ff1f5f8 [HttpFoundation] Fix UPSERT for PgSql >= 9.5
2016-06-16 06:56:55 +02:00
Nicolas Grekas
ff1f5f80d2 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 2016-06-15 12:17:39 +02:00
Fabien Potencier
910eff0450 bug #18548 [Form] minor fixes in DateTime transformers (HeahDude)
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #18548).

Discussion
----------

[Form] minor fixes in DateTime transformers

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

Commits
-------

b91008f [Form] fixed DateTime transformers
2016-06-15 09:21:32 +02:00
Jules Pietri
b91008fb57 [Form] fixed DateTime transformers 2016-06-15 09:21:32 +02:00
Fabien Potencier
d7e466ac23 bug #18732 [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't (nykopol)
This PR was squashed before being merged into the 2.7 branch (closes #18732).

Discussion
----------

[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't

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

When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.

Commits
-------

c46519b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
2016-06-15 09:08:06 +02:00
Johan DESMYTER
c46519b40b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't 2016-06-15 09:08:04 +02:00
Fabien Potencier
347cd8712e bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5

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

9569c74 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
2016-06-14 11:41:37 +02:00
Nicolas Grekas
9569c7453c [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 2016-06-14 11:40:21 +02:00
Fabien Potencier
2077729d2c minor #19046 [Console] fixed PHPDoc (atailouloute)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19046).

Discussion
----------

[Console] fixed PHPDoc

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

Commits
-------

37fac3e [Console] fixed PHPDoc
2016-06-14 10:22:25 +02:00