Commit Graph

26544 Commits

Author SHA1 Message Date
Nicolas Grekas
0439837729 Merge branch '3.0' into 3.1
* 3.0:
  [ci] Upgrade phpunit wrapper deps
2016-06-29 15:03:37 +02:00
Nicolas Grekas
f3b2324c20 Merge branch '2.8' into 3.0
* 2.8:
  [ci] Upgrade phpunit wrapper deps
2016-06-29 15:03:16 +02:00
Nicolas Grekas
27f1cfc9af Merge branch '2.7' into 2.8
* 2.7:
  [ci] Upgrade phpunit wrapper deps
2016-06-29 15:03:02 +02:00
Nicolas Grekas
79fbbded0d minor #19225 [ci] Upgrade phpunit wrapper deps (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ci] Upgrade phpunit wrapper deps

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

To get https://github.com/sebastianbergmann/exporter/pull/14 in.

Commits
-------

9f916a8 [ci] Upgrade phpunit wrapper deps
2016-06-29 15:02:48 +02:00
Nicolas Grekas
9f916a8279 [ci] Upgrade phpunit wrapper deps 2016-06-29 14:53:38 +02:00
Nicolas Grekas
e770e2ec1a Merge branch '3.0' into 3.1
* 3.0:
  [FrameworkBundle] Fix fixtures
  [HttpKernel] Inline ValidateRequestListener logic into HttpKernel
  fixed HttpKernel dependencies after #18688

Conflicts:
	src/Symfony/Component/HttpKernel/HttpKernel.php
	src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
2016-06-29 14:32:15 +02:00
Nicolas Grekas
b4fbcb3559 Merge branch '2.8' into 3.0
* 2.8:
  [FrameworkBundle] Fix fixtures
  [HttpKernel] Inline ValidateRequestListener logic into HttpKernel
  fixed HttpKernel dependencies after #18688

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Component/HttpKernel/composer.json
2016-06-29 14:25:18 +02:00
Nicolas Grekas
4cfbcf5cc7 minor #19223 [FrameworkBundle] Fix fixtures (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Fix fixtures

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

Commits
-------

d175477 [FrameworkBundle] Fix fixtures
2016-06-29 14:08:11 +02:00
Nicolas Grekas
d17547769c [FrameworkBundle] Fix fixtures 2016-06-29 13:57:45 +02:00
Nicolas Grekas
77053e7944 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Inline ValidateRequestListener logic into HttpKernel
  fixed HttpKernel dependencies after #18688

Conflicts:
	src/Symfony/Component/HttpKernel/composer.json
2016-06-29 13:29:28 +02:00
Nicolas Grekas
692740b57a bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Inline ValidateRequestListener logic into HttpKernel

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

I propose to inline the listener introduced in #18688 into HttpKernel.

Commits
-------

9d3ae85 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel
2016-06-29 13:28:26 +02:00
Nicolas Grekas
9d3ae85301 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel 2016-06-29 12:24:37 +02:00
Fabien Potencier
eae78e208a minor #19216 fixed HttpKernel dependencies after #18688 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed HttpKernel dependencies after #18688

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

f809f3e fixed HttpKernel dependencies after #18688
2016-06-29 10:26:41 +02:00
Jules Pietri
f809f3e340 fixed HttpKernel dependencies after #18688 2016-06-29 10:18:30 +02:00
Fabien Potencier
5128cd368c Merge branch '3.0' into 3.1
* 3.0:
  [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
  fixed test
  [Console] Decouple SymfonyStyle from TableCell
2016-06-29 09:02:31 +02:00
Fabien Potencier
b6267c8bd8 Merge branch '2.8' into 3.0
* 2.8:
  [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
  fixed test
  [Console] Decouple SymfonyStyle from TableCell
2016-06-29 09:02:21 +02:00
Fabien Potencier
0a7aa63ece Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
  [Console] Decouple SymfonyStyle from TableCell
2016-06-29 09:02:14 +02:00
Fabien Potencier
2d3723007d bug #18688 [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For (magnusnordlander)
This PR was squashed before being merged into the 2.7 branch (closes #18688).

Discussion
----------

[HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For

| 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        | symfony/symfony-docs#6526

Emit a warning when a request has both a trusted Forwarded header and a trusted X-Forwarded-For header, as this is most likely a misconfiguration which causes security issues.

Commits
-------

ee8842f [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
2016-06-29 09:01:56 +02:00
Magnus Nordlander
ee8842fedb [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For 2016-06-29 09:01:55 +02:00
Fabien Potencier
cdf7b0846f minor #19215 fixed test (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

fixed test

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

Commits
-------

bac531c fixed test
2016-06-29 08:14:43 +02:00
Fabien Potencier
bac531ccab fixed test 2016-06-29 08:00:29 +02:00
Fabien Potencier
96f32b6512 bug #19173 [Console] Decouple SymfonyStyle from TableCell (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #19173).

Discussion
----------

[Console] Decouple SymfonyStyle from TableCell

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

Alternative approach, ie BC, for #19136 (i prefer that one though, as it also _fixes_ #19123 )

Commits
-------

51f59d6 [Console] Decouple SymfonyStyle from TableCell
2016-06-29 07:44:56 +02:00
Roland Franssen
51f59d6f62 [Console] Decouple SymfonyStyle from TableCell 2016-06-29 07:44:54 +02:00
Fabien Potencier
a434e7b419 fixed CS 2016-06-29 07:42:25 +02:00
Fabien Potencier
6bed60b467 Merge branch '3.0' into 3.1
* 3.0:
  fixed CS
  fixed CS
  fixed form tests
  [Console] Fix formatting of SymfonyStyle::comment()
  [Form] fix post max size translation type extension for >= 2.8
  removed dots at the end of @param and @return
  fixed typo
2016-06-29 07:41:56 +02:00
Fabien Potencier
8db8f90edc fixed CS 2016-06-29 07:40:45 +02:00
Fabien Potencier
b1a4d56965 Merge branch '2.8' into 3.0
* 2.8:
  fixed CS
  fixed form tests
  [Console] Fix formatting of SymfonyStyle::comment()
  [Form] fix post max size translation type extension for >= 2.8
  removed dots at the end of @param and @return
  fixed typo
2016-06-29 07:40:00 +02:00
Fabien Potencier
62714464e3 fixed CS 2016-06-29 07:31:50 +02:00
Fabien Potencier
bd1e3e3093 Merge branch '2.7' into 2.8
* 2.7:
  removed dots at the end of @param and @return
  fixed typo
2016-06-29 07:29:29 +02:00
Fabien Potencier
fd24e0af27 minor #19213 fixed form tests (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

fixed form tests

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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
-------

d0130d9 fixed form tests
2016-06-29 07:26:52 +02:00
Fabien Potencier
b111d37594 minor #19198 removed dots at the end of @param and @return (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed dots at the end of @param and @return

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

For phpdocs, we only add dots for sentences like description, but not for @param and @return for instance. This PR fixes this issue.

This should probably be added to PHP-CS-Fixer as well (/cc @phansys @keradus).

Commits
-------

554303e removed dots at the end of @param and @return
2016-06-29 07:22:22 +02:00
Fabien Potencier
7b2af2d660 bug #19204 [Security] Allow LDAP loadUser override (tucksaun)
This PR was merged into the 3.1 branch.

Discussion
----------

[Security] Allow LDAP loadUser override

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

Back to 3.0, one could extend `Symfony\Component\Security\Core\User\LdapUserProvider` and override how User objects are created.
Among several improvements, #17560 changed `loadUser` signature but also visibility to `private` which disallow any overriding.
Even if the signature BC break is legitimate, we should still be able to override this method IMHO, which is not possible with a private visibility.
This PRs introduces a `protected` visibility to allow again overriding.

Commits
-------

ae99aa8 [Security] Allow LDAP loadUser override
2016-06-29 07:10:15 +02:00
Fabien Potencier
c2783993a8 bug #19189 [Console] Fix formatting of SymfonyStyle::comment() (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix formatting of SymfonyStyle::comment()

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

This:

```php
$io->comment('Lorem ipsum dolor sit amet, consectetur adipisicing elit, <comment>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat </comment>cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
```

Before outputs:

![](http://image.prntscr.com/image/1d2ea9de42024b53a77120c482be51d4.png)

After:

![](http://image.prntscr.com/image/36de23ec14b64804b0cbae7a431185be.png)

This moves the lines-cutting logic from `block()` into a specific `createBlock`, used from both `comment()` and `block()`, sort as `comment()` can take messages containing nested tags and outputs a correctly formatted block without escaping tags.

Commits
-------

0a53e1d [Console] Fix formatting of SymfonyStyle::comment()
2016-06-29 07:03:58 +02:00
Fabien Potencier
a980774e91 minor #19199 fixed typo (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed typo

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

/cc @pborreli This one is for me :)

Commits
-------

e334960 fixed typo
2016-06-29 06:58:45 +02:00
Fabien Potencier
d0130d946b fixed form tests 2016-06-29 06:57:44 +02:00
Fabien Potencier
c68508f63c bug #19211 [Form] fix post max size translation type extension for >= 2.8 (Tobion)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fix post max size translation type extension for >= 2.8

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

Commits
-------

a27ec00 [Form] fix post max size translation type extension for >= 2.8
2016-06-29 06:53:18 +02:00
Robin Chalas
0a53e1de0c
[Console] Fix formatting of SymfonyStyle::comment()
Remove decoration from frameworkbundle test (avoid testing the Console behaviour)
Set background to default

Test output

Adapt test for FrameworkBundle

Use Helper::strlenWithoutDecoration rather than Helper::strlen(strip_tags(..))

Improve logic for align all lines to the first in block()

Tests more block() possible outputs

Avoid calling Helper::strlenWithoutDecoration in loop for prefix, assign it instead
2016-06-29 00:37:19 +02:00
Tobias Schultze
a27ec00096 [Form] fix post max size translation type extension for >= 2.8 2016-06-29 00:32:04 +02:00
Fabien Potencier
cef19150c2 Merge branch '3.0' into 3.1
* 3.0:
  fixed typo
2016-06-28 18:34:15 +02:00
Fabien Potencier
c40bcd8394 Merge branch '2.8' into 3.0
* 2.8:
  fixed typo
2016-06-28 18:33:48 +02:00
Fabien Potencier
f4dbd30a02 fixed typo 2016-06-28 18:33:00 +02:00
Tugdual Saunier
ae99aa8ea4 [Security] Allow LDAP loadUser override 2016-06-28 17:28:10 +01:00
Fabien Potencier
45ce2c87f4 Merge branch '3.0' into 3.1
* 3.0:
  [CS] Respect PSR2 4.2
  [Form] fix `empty_data` option in expanded `ChoiceType`
  [Console] removed unneeded private methods
  [Security] [Guard] Improve comment with working example
  sync min email validator version
  [TwigBridge] Fix inconsistency in LintCommand help
  explicitly forbid e-mail validator 2.0 or higher
  Fixed SymfonyQuestionHelper multi-choice with defaults
  [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
  Differentiate between the first time a progress bar is displayed and subsequent times
  finished previous commit
  No more exception for malformed input name
  fix post_max_size_message translation
  [Process] Fix pipes cleaning on Windows
  Avoid phpunit 5.4 warnings on getMock
  [Form] Add exception to FormRenderer about non-unique block names
  [Form] Consider a violation even if the form is not submitted
2016-06-28 18:26:56 +02:00
Fabien Potencier
ba841600a0 Merge branch '2.8' into 3.0
* 2.8:
  [CS] Respect PSR2 4.2
  [Form] fix `empty_data` option in expanded `ChoiceType`
  [Console] removed unneeded private methods
  [Security] [Guard] Improve comment with working example
  sync min email validator version
  [TwigBridge] Fix inconsistency in LintCommand help
  explicitly forbid e-mail validator 2.0 or higher
  Fixed SymfonyQuestionHelper multi-choice with defaults
  [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
  Differentiate between the first time a progress bar is displayed and subsequent times
  finished previous commit
  No more exception for malformed input name
  fix post_max_size_message translation
  [Process] Fix pipes cleaning on Windows
  Avoid phpunit 5.4 warnings on getMock
  [Form] Add exception to FormRenderer about non-unique block names
  [Form] Consider a violation even if the form is not submitted
2016-06-28 18:26:27 +02:00
Fabien Potencier
6b81f2ce43 Merge branch '2.7' into 2.8
* 2.7:
  [CS] Respect PSR2 4.2
  [Form] fix `empty_data` option in expanded `ChoiceType`
  [Console] removed unneeded private methods
  sync min email validator version
  [TwigBridge] Fix inconsistency in LintCommand help
  explicitly forbid e-mail validator 2.0 or higher
  Fixed SymfonyQuestionHelper multi-choice with defaults
  [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
  Differentiate between the first time a progress bar is displayed and subsequent times
  finished previous commit
  No more exception for malformed input name
  fix post_max_size_message translation
  [Process] Fix pipes cleaning on Windows
  Avoid phpunit 5.4 warnings on getMock
  [Form] Add exception to FormRenderer about non-unique block names
  [Form] Consider a violation even if the form is not submitted
2016-06-28 18:24:07 +02:00
Fabien Potencier
554303e339 removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
Fabien Potencier
7dbd849d0f bug #17822 [WIP] [2.7] [Form] fix empty_data option in expanded ChoiceType (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[WIP] [2.7] [Form] fix `empty_data` option in expanded `ChoiceType`

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

It might happen because in `Form::submit()` the handling of `empty_data` [line 597](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L597) comes after each child of a compound field has been submitted [line 549](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L549).

So when `ChoiceType` is `expanded`, `compound` option is defaulted to `true` and it passes its empty submitted data to its children before handling its own `empty_data` option.

This PR uses the listener already added in `ChoiceType` only when `expanded` is true to handle `empty_data` at `PRE_SUBMIT` [line 539](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L539).

- [ ] Fix FQCN in tests for 2.8
- [ ] Remove `choices_as_values` in tests for 3.0

Commits
-------

d479adf [Form] fix `empty_data` option in expanded `ChoiceType`
2016-06-28 08:17:04 +02:00
Fabien Potencier
e334960776 fixed typo 2016-06-28 07:56:13 +02:00
Fabien Potencier
d8dd7f6fae minor #19176 [CS] Respect PSR2 4.2 (phansys)
This PR was merged into the 2.7 branch.

Discussion
----------

[CS] Respect PSR2 4.2

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

http://www.php-fig.org/psr/psr-2/#4-2-properties

I'm writing a [new fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1889) (`single_class_element_per_statement`), which intends to avoid multiple class elements in one statement.
This PR is a POC about the result of this fixer, so I'd like to know what do you think about, since it will be also added to the `@Symfony` ruleset.
Please note that class constants are considered too, but here isn't any offending code about that.

Example output:
```
$ ./php-cs-fixer.phar fix . --rules=single_class_element_per_statement -vvv
   1) src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php (single_class_element_per_statement)
   2) src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php (single_class_element_per_statement)
   3) src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php (single_class_element_per_statement)
   4) src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/includes/foo.php (single_class_element_per_statement)
```

Commits
-------

d250b1d [CS] Respect PSR2 4.2
2016-06-27 07:50:33 +02:00
Javier Spagnoletti
d250b1d0f0 [CS] Respect PSR2 4.2
| 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        |

http://www.php-fig.org/psr/psr-2/#4-2-properties
2016-06-25 13:30:09 -03:00