Commit Graph

33054 Commits

Author SHA1 Message Date
Nicolas Grekas 347939c9b3 [HttpFoundation] Make sessions secure and lazy 2017-10-17 00:24:46 +02:00
Nicolas Grekas 3f0a3f58a6 Merge branch '3.3' into 3.4
* 3.3:
  fix serialized deprecations handling
2017-10-13 16:15:09 +02:00
Nicolas Grekas be9382a772 minor #24551 [PhpUnitBridge] fix serialized deprecations handling (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] fix serialized deprecations handling

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

Commits
-------

2f5a0bd fix serialized deprecations handling
2017-10-13 16:14:51 +02:00
Christian Flothmann 2f5a0bd72f fix serialized deprecations handling 2017-10-13 16:13:33 +02:00
Nicolas Grekas 2c18da709f Merge branch '3.3' into 3.4
* 3.3:
  [BrowserKit] Handle deprecations triggered in insulated requests
  [Bridge\PhpUnit] Handle deprecations triggered in separate processes
  [Validator] added magic method __isset()  to File Constraint class
  [DI] Fix possible incorrect php-code when dumped strings contains newlines
  [Translation] minor: remove unused variable in test
  never match invalid IP addresses
2017-10-13 15:33:47 +02:00
Nicolas Grekas 17b48edebc Merge branch '2.8' into 3.3
* 2.8:
  [Validator] added magic method __isset()  to File Constraint class
  [DI] Fix possible incorrect php-code when dumped strings contains newlines
  [Translation] minor: remove unused variable in test
  never match invalid IP addresses
2017-10-13 15:32:37 +02:00
Nicolas Grekas d04c0ea45b Merge branch '2.7' into 2.8
* 2.7:
  [Validator] added magic method __isset()  to File Constraint class
  [DI] Fix possible incorrect php-code when dumped strings contains newlines
  [Translation] minor: remove unused variable in test
  never match invalid IP addresses
2017-10-13 15:30:20 +02:00
Fabien Potencier ac6d605659 bug #24535 [TwigBridge] fix BC for FormExtension if renderer is FormRenderer (dmaicher)
This PR was squashed before being merged into the 3.4 branch (closes #24535).

Discussion
----------

[TwigBridge] fix BC for FormExtension if renderer is FormRenderer

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24533
| License       | MIT
| Doc PR        | -

This fixes some issues within FormExtension since the renderer is now a `FormRenderer`.

Commits
-------

4a2f608f1e [TwigBridge] fix BC for FormExtension if renderer is FormRenderer
2017-10-13 06:28:25 -07:00
David Maicher 4a2f608f1e [TwigBridge] fix BC for FormExtension if renderer is FormRenderer 2017-10-13 06:28:23 -07:00
Fabien Potencier f53229c236 bug #24541 [Form] Fix 5.5 compatibility for ResizeFormListener (yceruto)
This PR was squashed before being merged into the 3.4 branch (closes #24541).

Discussion
----------

[Form] Fix 5.5 compatibility for ResizeFormListener

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

531b294b21/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php (L152-L157)

Issue description: http://php.net/manual/en/language.types.callable.php#117260 (https://3v4l.org/oOoAV)

Commits
-------

ee70361e53 [Form] Fix 5.5 compatibility for ResizeFormListener
2017-10-13 06:25:58 -07:00
Yonel Ceruto ee70361e53 [Form] Fix 5.5 compatibility for ResizeFormListener 2017-10-13 06:25:48 -07:00
Fabien Potencier 4ae1f896d7 bug #24548 [Bridge\PhpUnit] Handle deprecations triggered in separate processes (paul-m)
This PR was merged into the 3.3 branch.

Discussion
----------

[Bridge\PhpUnit] Handle deprecations triggered in separate processes

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

As reported in #23003, deprecations triggered in process-isolated test cases are not gathered.
This caught us already: HttpFoundation is still using deprecated code paths, but we missed them because of that issue with the bridge.

Here is the fixed output:
![capture du 2017-10-13 13-45-12](https://user-images.githubusercontent.com/243674/31544827-fe7ffee0-b01c-11e7-8020-4001735ce7a3.png)

Credits to @paul-m for working on the issue first.

Commits
-------

ca0fedd9e3 [BrowserKit] Handle deprecations triggered in insulated requests
ff379efb59 [Bridge\PhpUnit] Handle deprecations triggered in separate processes
2017-10-13 06:22:41 -07:00
Nicolas Grekas ca0fedd9e3 [BrowserKit] Handle deprecations triggered in insulated requests 2017-10-13 15:21:24 +02:00
Paul Mitchum ff379efb59 [Bridge\PhpUnit] Handle deprecations triggered in separate processes 2017-10-13 15:20:39 +02:00
den e0d8ce4403 Fix LogLevel::DEBUG as min level 2017-10-12 15:00:23 -07:00
Fabien Potencier 3c3d642a19 feature #23112 [OptionsResolver] Support array of types in allowed type (pierredup)
This PR was merged into the 3.4 branch.

Discussion
----------

[OptionsResolver] Support array of types in allowed type

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17032, #15524
| License       | MIT
| Doc PR        | TBD

This replaces #17032 with a simpler approach to allow an array of types in the allowed types for the options resolver

Note: This implementation doesn't support nested values (I.E `int[][]`), but if there is a strong need for it, I'll add it in another PR

Commits
-------

d066a23860 Support array of types in allowed type
2017-10-12 14:55:29 -07:00
Fabien Potencier 2059609ccb bug #24519 [Validator] [Twig] added magic method __isset() to File Constraint class (loru88)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #24519).

Discussion
----------

[Validator] [Twig] added magic method __isset()  to File Constraint class

| Q             | A
| ------------- | ---
| Branch?       | 3.4 or master / 2.7, 2.8 or 3.3 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24512  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

In my project I get assert constraints from one of my entity and I use this value in my front end via Twig.
I faced a problem with the property $maxSize of the File Constraint.

As this property is protected I cannot access it via Twig because the magic method __isset is missing, as I read in twig documentation.
<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

9efb76572a [Validator] added magic method __isset()  to File Constraint class
2017-10-12 14:44:38 -07:00
loru88 9efb76572a [Validator] added magic method __isset() to File Constraint class 2017-10-12 14:44:30 -07:00
Fabien Potencier f35996d228 bug #24514 [TwigBridge] replace parameters in dummy identity translator (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] replace parameters in dummy identity translator

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

Commits
-------

2c9c3d80cf replace parameters in dummy identity translator
2017-10-12 10:35:24 -07:00
Pierre du Plessis d066a23860 Support array of types in allowed type 2017-10-12 18:27:27 +02:00
Nicolas Grekas 262b4f3b83 bug #24532 [DI] Fix possible incorrect php-code when dumped strings contains newlines (Strate)
This PR was squashed before being merged into the 2.7 branch (closes #24532).

Discussion
----------

[DI] Fix possible incorrect php-code when dumped strings contains newlines

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | ?
| License       | MIT
| Doc PR        | no

See discussion #24517

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

345f2fc [DI] Fix possible incorrect php-code when dumped strings contains newlines
2017-10-12 17:34:58 +02:00
Artur Eshenbrener 345f2fc60e [DI] Fix possible incorrect php-code when dumped strings contains newlines 2017-10-12 17:34:26 +02:00
Nicolas Grekas 5e0bb5f973 minor #24528 [Translation] minor: remove unused variable in test (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] minor: remove unused variable in test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

c6ed0e4 [Translation] minor: remove unused variable in test
2017-10-12 10:59:24 +02:00
Kévin Dunglas c6ed0e4f86
[Translation] minor: remove unused variable in test 2017-10-12 09:08:46 +02:00
Fabien Potencier 0f5e38c732 feature #24321 added ability to handle parent classes for PropertyNormalizer (ivoba)
This PR was squashed before being merged into the 3.4 branch (closes #24321).

Discussion
----------

added ability to handle parent classes for PropertyNormalizer

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24152 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

This adds the ability for PropertyNormalizer to normalize/denormalize properties from parent classes.

Commits
-------

5ecafc5e25 added ability to handle parent classes for PropertyNormalizer
2017-10-11 08:25:57 -07:00
Ivo Bathke 5ecafc5e25 added ability to handle parent classes for PropertyNormalizer 2017-10-11 08:25:53 -07:00
Nicolas Grekas 78e5858495 feature #24505 [HttpKernel] implement reset() in DumpDataCollector (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] implement reset() in DumpDataCollector

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

Commits
-------

cd602d6 implement reset() in DumpDataCollector
2017-10-11 10:24:37 +02:00
Christian Flothmann 2c9c3d80cf replace parameters in dummy identity translator 2017-10-11 09:38:40 +02:00
Christian Flothmann cd602d691a implement reset() in DumpDataCollector 2017-10-11 09:28:13 +02:00
Fabien Potencier 6231acc8e8 feature #24425 [Console][HttpKernel] Handle new SHELL_VERBOSITY env var, also configures the default logger (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console][HttpKernel] Handle new SHELL_VERBOSITY env var, also configures the default logger

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

On the CLI, the behavior of the new default logger is not nice: it's verbosity is controlled by `kernel.debug`, where I would expect to be able to control it by mean of verbosity.
To achieve this, I propose to handle a new `SHELL_VERBOSITY` env var, and use it to control both commands' verbosity, and the logger's log level.

Commits
-------

87bd741f2d [Console][HttpKernel] Handle new SHELL_VERBOSITY, also configures the default logger
2017-10-10 10:53:03 -07:00
Fabien Potencier da25d444e9 bug #24502 [HttpFoundation] never match invalid IP addresses (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] never match invalid IP addresses

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

Commits
-------

8ad32f0ef5 never match invalid IP addresses
2017-10-10 10:31:42 -07:00
Nicolas Grekas 2e3d422c4d fix (ter) 2017-10-10 19:27:52 +02:00
Nicolas Grekas 7b3f4e8594 fix 2017-10-10 19:19:34 +02:00
Nicolas Grekas 7a5985526f Skip tests affected by PHP bug 75354 2017-10-10 19:08:27 +02:00
Fabien Potencier 9abc182ca7 minor #24506 [TwigBundle] fix deps (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] fix deps

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

Commits
-------

a008624257 fix deps
2017-10-10 07:56:27 -07:00
Christian Flothmann a008624257 fix deps 2017-10-10 16:11:20 +02:00
Christian Flothmann 113554c835 Merge branch '3.3' into 3.4
* 3.3:
  fix PHP 7.2 compatibility
2017-10-10 16:02:56 +02:00
Christian Flothmann 788eb4f0bb minor #24509 fix PHP 7.2 compatibility (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

fix PHP 7.2 compatibility

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

* the `phpdocumentor/type-resolver` package was not PHP 7.2 compatible
  before release 0.2.1 (see see phpDocumentor/TypeResolver@e224fb2)
* the validator must not call `get_class()` if no object but a class
  name was passed to the `validatePropertyValue()` method

Commits
-------

2d2022c fix PHP 7.2 compatibility
2017-10-10 15:56:12 +02:00
Christian Flothmann 2d2022cc11 fix PHP 7.2 compatibility
* the `phpdocumentor/type-resolver` package was not PHP 7.2 compatible
  before release 0.2.1 (see see phpDocumentor/TypeResolver@e224fb2)
* the validator must not call `get_class()` if no object but a class
  name was passed to the `validatePropertyValue()` method
2017-10-10 15:45:28 +02:00
Christophe Coevoet c3524d0b12 minor #24504 [Form] Fix error message in circular reference dependencies check (pierredup)
This PR was squashed before being merged into the 3.4 branch (closes #24504).

Discussion
----------

[Form] Fix error message in circular reference dependencies check

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

Fix comments from PR #24387

Commits
-------

48eb43daed [Form] Fix error message in circular reference dependencies check
2017-10-10 13:20:15 +02:00
Pierre du Plessis 48eb43daed [Form] Fix error message in circular reference dependencies check 2017-10-10 13:20:13 +02:00
Nicolas Grekas d3bc436cd2 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  fix merge
  fix merge
  Fix 7.2 compat layer
  Fix PHP 7.2 support
  [HttpFoundation] Add missing session.lazy_write config option
  [HttpFoundation] Combine Cache-Control headers
  [Form] fix parsing invalid floating point numbers
  Escape command usage when displaying it in the text descriptor
  Use for=ID on radio/checkbox label.
2017-10-10 12:38:39 +02:00
Nicolas Grekas 9719fba0ab fix merge 2017-10-10 12:34:18 +02:00
Nicolas Grekas 6595615255 fix merge 2017-10-10 12:32:49 +02:00
Nicolas Grekas 01c50eb070 Merge branch '2.8' into 3.3
* 2.8:
  fix merge
  Fix 7.2 compat layer
  Fix PHP 7.2 support
  [HttpFoundation] Add missing session.lazy_write config option
  [HttpFoundation] Combine Cache-Control headers
  [Form] fix parsing invalid floating point numbers
  Escape command usage when displaying it in the text descriptor
  Use for=ID on radio/checkbox label.
2017-10-10 12:12:32 +02:00
Nicolas Grekas f76ea8016a feature #24387 [FORM] Prevent forms from extending itself as a parent (pierredup)
This PR was squashed before being merged into the 3.4 branch (closes #24387).

Discussion
----------

[FORM] Prevent forms from extending itself as a parent

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

If a form type defines itself as a parent, it results in an endless recursive loop in the form registry, so throw an exception instead.

Commits
-------

2ee6fd5 [FORM] Prevent forms from extending itself as a parent
2017-10-10 12:07:23 +02:00
Pierre du Plessis 2ee6fd54e1 [FORM] Prevent forms from extending itself as a parent 2017-10-10 12:07:08 +02:00
Nicolas Grekas e71c4f71f5 fix merge 2017-10-10 12:05:53 +02:00
Christian Flothmann 8ad32f0ef5 never match invalid IP addresses 2017-10-10 10:04:23 +02:00
Nicolas Grekas d7b3a6234a Merge branch '2.7' into 2.8
* 2.7:
  Fix 7.2 compat layer
  Fix PHP 7.2 support
  [HttpFoundation] Add missing session.lazy_write config option
  [HttpFoundation] Combine Cache-Control headers
  [Form] fix parsing invalid floating point numbers
  Escape command usage when displaying it in the text descriptor
  Use for=ID on radio/checkbox label.
2017-10-10 09:42:03 +02:00