Commit Graph

26780 Commits

Author SHA1 Message Date
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
3ea392aedc Merge branch '3.1'
* 3.1:
  [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
  fixed test
  [Console] Decouple SymfonyStyle from TableCell
2016-06-29 09:02:38 +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
4a0be68dd4 feature #19137 [Serializer] Allow to use easily static constructors (Ener-Getick)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Serializer] Allow to use easily static constructors

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19027#issuecomment-225527475
| License       | MIT
| Doc PR        | -

This PR allows to simply use static constructors to instantiate objects with the serializer by extending the default normalizers.

Commits
-------

9be6484 [Serializer] Allow to use easily static constructors
2016-06-29 07:52:42 +02:00
Fabien Potencier
ed6267d562 feature #19146 [DependencyInjection] deprecate access to private shared services. (hhamon)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DependencyInjection] deprecate access to private shared services.

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

Commits
-------

4ed70c4 [DependencyInjection] deprecate access to private shared services. Fixes issue #19117.
2016-06-29 07:51:25 +02:00
Fabien Potencier
0eae5d2927 minor #19160 [Yaml] Avoid using both Input/Output and SymfonyStyle in LintCommand (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] Avoid using both Input/Output and SymfonyStyle in LintCommand

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

Fixed some inconsistencies/mistakes from the original YamLintCommand.

Commits
-------

dd84b7f [Yaml] Avoid using both Input/Output and SymfonyStyle in LintCommand
2016-06-29 07:48:55 +02:00
Fabien Potencier
90d42eb0a9 feature #19190 [DependencyInjection] Add support for short services configurators syntax (voronkovich)
This PR was squashed before being merged into the 3.2-dev branch (closes #19190).

Discussion
----------

[DependencyInjection] Add support for short services configurators syntax

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

This PR adds support for short services configurators syntax in YAML files:
```yaml
services:
    app.some_service:
        class: ...
        # Common syntax
        configurator: [ '@app.configurator', 'configure' ]
        # Short syntax
        configurator: 'app.configurator:configure'

Commits
-------

da2757f [DependencyInjection] Add support for short services configurators syntax
2016-06-29 07:46:37 +02:00
Oleg Voronkovich
da2757f355 [DependencyInjection] Add support for short services configurators syntax 2016-06-29 07:46:34 +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
8356d15dfa fixed CS 2016-06-29 07:43:32 +02:00
Fabien Potencier
c53cb57b9d Merge branch '3.1'
* 3.1:
  fixed CS
  fixed CS
  fixed CS
  fixed form tests
  [Console] Fix formatting of SymfonyStyle::comment()
  [Form] fix post max size translation type extension for >= 2.8
  [Security] Allow LDAP loadUser override
  removed dots at the end of @param and @return
  fixed typo
2016-06-29 07:43:10 +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
f720444d90 minor #19187 [Workflow] CS tweaks (ro0NL)
This PR was squashed before being merged into the 3.2-dev branch (closes #19187).

Discussion
----------

[Workflow] CS tweaks

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

Just a few minor tweaks/fixes after playing around with it. Some phpdoc should still be added imo, like missing `@throws`, right?

Commits
-------

5428a92 [Workflow] CS tweaks
2016-06-29 07:07:39 +02:00
Roland Franssen
5428a9244a [Workflow] CS tweaks 2016-06-29 07:07:38 +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
764228f24a Merge branch '3.1'
* 3.1:
  fixed typo
2016-06-28 18:34:41 +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
Fabien Potencier
3c47306719 Merge branch '3.1'
* 3.1:
  [CS] Respect PSR2 4.2
  [Form] fix `empty_data` option in expanded `ChoiceType`
  [Console] removed unneeded private methods
  updated Http-Kernel dependency
  [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
  [FrameworkBundle] templating can be fully disabled
  [Form] Consider a violation even if the form is not submitted
2016-06-28 18:31:08 +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
f67912fe3a feature #18823 [Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0 (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0

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

Depends on https://github.com/symfony/symfony/pull/18825

This PR aims to implement a Symfony Cache adapter able to build files optimized for OPCache memory storage. Any kind of static data that can be warmed up is a candidate for OPcache storage.

This PR is limited to the implementation of the Adapter. It's usage in the annotations caching system is implemented in the PR https://github.com/symfony/symfony/pull/18533. The aim is also to use this adapter in other contexts (validator, serializer, ...).

Commits
-------

28a40d2 [Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0+
2016-06-28 12:05:50 +02:00
Titouan Galopin
28a40d21f5 [Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0+ 2016-06-28 11:48:20 +02:00
Hugo Hamon
4ed70c4a4e [DependencyInjection] deprecate access to private shared services. Fixes issue #19117. 2016-06-28 09:16:13 +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