Commit Graph

27527 Commits

Author SHA1 Message Date
Fabien Potencier
9606f029a1 Merge branch '2.7' into 2.8
* 2.7:
  Removed assertDateTimeEquals() methods.
2018-01-29 09:58:04 +01:00
Fabien Potencier
e395e56b6b minor #25943 Removed assertDateTimeEquals() methods (derrabus)
This PR was merged into the 2.7 branch.

Discussion
----------

Removed assertDateTimeEquals() methods

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

All PHPUnit versions that we use on Travis support comparing `DateTime` objects via `assertEquals()`. Yet, we have our own code in place to check for equality of `DateTime` objects. This PR removes that code.

Commits
-------

5b73d1c1e6 Removed assertDateTimeEquals() methods.
2018-01-29 09:57:25 +01:00
Fabien Potencier
b99ca76e4b minor #25908 Improve assertions (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

Improve assertions

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

Following #25420 in `2.8` branch.

Commits
-------

4683f6d454 Improve assertions
2018-01-29 09:55:23 +01:00
Fabien Potencier
6f2a31b851 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 09:54:45 +01:00
Fabien Potencier
d007bbd2e5 minor #25907 Improve assertions (carusogabriel)
This PR was merged into the 2.7 branch.

Discussion
----------

Improve assertions

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

Following #25420 before start other branches.

Btw, the other branches are 2.8, 3.3, 3.4, 4.0 and master?

Commits
-------

3d90a2217d Improve assertions
2018-01-29 09:53:47 +01:00
Fabien Potencier
5e3aa676eb bug #25922 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver (tanasecosminromeo)
This PR was submitted for the master branch but it was squashed and merged into the 2.7 branch instead (closes #25922).

Discussion
----------

[HttpFoundation] Use the correct syntax for session gc based on Pdo driver

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

The initial fix for #24456 was wrong, since it only accounted for Postgres. @WhiteEagle88 correctly identified #25665 - but having time as SIGNED is ... off, since time shouldn't be negative. Using CAST to solve this issue surely has a performance penalty, so I believe the best approach is to have a switch based on the driver.

Commits
-------

826dfbd496 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
2018-01-29 09:51:56 +01:00
Cosmin-Romeo TANASE
826dfbd496 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver 2018-01-29 09:51:44 +01:00
Alexander M. Turek
5b73d1c1e6 Removed assertDateTimeEquals() methods. 2018-01-27 12:01:42 +01:00
Fabien Potencier
4f47bb73a0 Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
This reverts commit 9107fb0afd, reversing
changes made to abe6e92593.
2018-01-26 16:25:25 +01:00
Fabien Potencier
667b9295f8 Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
This reverts commit ccc93678fd, reversing
changes made to e77545ab8d.
2018-01-26 16:23:25 +01:00
Fabien Potencier
554bc2482e bug #25933 Disable CSP header on exception pages only in debug (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

Disable CSP header on exception pages only in debug

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

Based on a feedback we received, there are situations on production when it's desired to have CSP header in place even if exception occurred.

This uses now same condition that is used by ExceptionController in TwigBridge to evaluate if styled exception template is going to be shown, minus `showException` request attribute which don't make sense in this context, because it's used by PreviewController only and in such case this listener isn't triggered.

Overriding CSP header via HTML meta tag unfortunately, but not surprisingly, doesn't work.

Commits
-------

b77538c2fe Disable CSP header on exception pages only in debug
2018-01-26 16:01:34 +01:00
Fabien Potencier
ba8fb60bbd bug #25926 [Form] Fixed Button::setParent() when already submitted (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed Button::setParent() when already submitted

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

The `Button` does not respect the [FormInterface](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/FormInterface.php#L28), by extension the `SubmitButton` neither.

Commits
-------

9f0c7bf549 Fixed Button::setParent() when already submitted
2018-01-26 15:13:14 +01:00
Fabien Potencier
0cd675ca4a bug #25927 [Form] Fixed submitting disabled buttons (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed submitting disabled buttons

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

Commits
-------

804b2a1a47 Fixed submitting disabled buttons
2018-01-26 08:31:44 +01:00
Gabriel Ostrolucký
b77538c2fe Disable CSP header on exception pages only in debug
Same condition is used by default TwigBridge ExceptionController
to evaluate if styled exception page is supposed to be shown.
2018-01-26 02:39:48 +01:00
HeahDude
804b2a1a47 Fixed submitting disabled buttons 2018-01-25 12:52:22 +01:00
Jules Pietri
9f0c7bf549 Fixed Button::setParent() when already submitted 2018-01-25 12:47:49 +01:00
Gabriel Caruso
3d90a2217d Improve assertions 2018-01-24 15:56:32 -02:00
Gabriel Caruso
4683f6d454 Improve assertions 2018-01-23 18:17:18 -02:00
Fabien Potencier
1b92f0685d minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
This PR was merged into the 2.7 branch.

Discussion
----------

[minor] SCA: reduce repetitive method calls (sequential and in loop)

| 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

Commits
-------

609372252f SCA: get rid of repetitive calls
2018-01-23 20:05:41 +01:00
Vladimir Reznichenko
609372252f SCA: get rid of repetitive calls 2018-01-23 12:06:14 +01:00
Fabien Potencier
73cbb01953 bug #25891 [DependencyInjection] allow null values for root nodes in YAML configs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] allow null values for root nodes in YAML configs

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

Commits
-------

52dd825bf1 allow null values for root nodes in YAML configs
2018-01-23 07:36:50 +01:00
Christian Flothmann
52dd825bf1 allow null values for root nodes in YAML configs 2018-01-22 21:35:04 +01:00
Fabien Potencier
34b6bdc8d0 minor #25881 [VarDumper] Fix docblock (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix docblock

| 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

Commits
-------

36cd267590 [VarDumper] Fix docblock
2018-01-22 07:17:56 +01:00
Robin Chalas
36cd267590 [VarDumper] Fix docblock 2018-01-22 02:54:24 +01:00
Nicolas Grekas
fb7be04d83 minor #25879 Improve phpdoc to make it more explicit (mnapoli)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #25879).

Discussion
----------

Improve phpdoc to make it more explicit

| Q             | A
| ------------- | ---
| Branch?       | master
| 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?   |
| Fixed tickets |
| License       | MIT
| Doc PR        |

It confused me a lot that the method took an array and that the phpdoc said we should pass a string instead of an array. This small change should clear up the confusion.

Commits
-------

ecdbea2 Improve phpdoc to make it more explicit
2018-01-21 20:40:00 +01:00
Matthieu Napoli
ecdbea2ba9 Improve phpdoc to make it more explicit
It confused me a lot that the method took an array and that the phpdoc said we should pass a string instead of an array. This small change should clear up the confusion.
2018-01-21 20:40:00 +01:00
Nicolas Grekas
75894936ac Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [Validator] add missing parent isset and add test
2018-01-21 20:03:25 +01:00
Nicolas Grekas
44a03b1017 minor #24949 [HttpFoundation] fixed return type of method HeaderBag::get (AmsTaFFix)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] fixed return type of method HeaderBag::get

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

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

6b608e8 [HttpFoundation] fixed return type of method HeaderBag::get
2018-01-21 17:38:39 +01:00
AmsTaFFix
6b608e8a5a [HttpFoundation] fixed return type of method HeaderBag::get 2018-01-21 17:36:17 +01:00
Nicolas Grekas
b7d6963ef6 minor #25875 [HttpFoundation] Added "resource" type on Request::create docblock (Jack Wright)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Added "resource" type on Request::create docblock

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

Replaces #24902

Commits
-------

d1a96ca [HttpFoundation] Added "resource" type on Request::create docblock
2018-01-21 17:31:25 +01:00
Jack Wright
d1a96ca9d3 [HttpFoundation] Added "resource" type on Request::create docblock 2018-01-21 17:28:26 +01:00
Nicolas Grekas
8ff4136d7a bug #25848 [Validator] add missing parent isset and add test (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] add missing parent isset and add test

| 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 | #25843 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

This is a little PR to fix the error and to add the parent::__isset to the Constraints class, I'm adding a test too to be sure that this is not possible again.

Btw, since this is instagihub, I'm coding at home and then I see a squirrel :
![img_3187 heic](https://user-images.githubusercontent.com/3451634/35149517-a9ddc0ba-fd16-11e7-9e22-cdba0b677071.jpeg)

Commits
-------

bcb79a3 [Validator] add missing parent isset and add test
2018-01-21 16:35:33 +01:00
Fabien Potencier
ac3e1b172d minor #25870 Formatting fix in upgrade 3.0 document (Piotr Błasiak)
This PR was merged into the 2.8 branch.

Discussion
----------

Formatting fix in upgrade 3.0 document

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

Fixes formatting in upgrade file.
This fix was already done in https://github.com/symfony/symfony/pull/22436 but applied to 3.2.
Formatting error still exists in 2.8, 3.0, 3.1. I don't know if this was intentional.

Commits
-------

dc6d5e1083 Formatting fix in upgrade 3.0 document
2018-01-21 08:36:45 +01:00
Fabien Potencier
9312f794e8 Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
This reverts commit 132cec44f2, reversing
changes made to d41130153e.
2018-01-21 08:24:24 +01:00
Fabien Potencier
1fedcffbb9 bug #25861 do not conflict with egulias/email-validator 2.0+ (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

do not conflict with egulias/email-validator 2.0+

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

Not allowing `egulias/email-validator` 2.0+ will prevent applications using this package from updating to the next patch release.

Commits
-------

1a1aaa74d6 Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
2018-01-21 08:22:52 +01:00
Piotr Błasiak
dc6d5e1083 Formatting fix in upgrade 3.0 document 2018-01-20 23:34:15 +01:00
Christian Flothmann
1a1aaa74d6 Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
This reverts commit f1f18ad608, reversing
changes made to 8e8ee09747.
2018-01-20 13:12:25 +01:00
Fabien Potencier
420789c694 Merge branch '2.7' into 2.8
* 2.7:
  [Validator] Conflict with egulias/email-validator 2.0
2018-01-20 11:50:52 +01:00
Fabien Potencier
f1f18ad608 bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Conflict with egulias/email-validator 2.0

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

For code that uses `EmailValidator` with strict email checking using `egulias/email-validator` and that aims to support both Symfony 2.8 LTS and Symfony 3.4/4.0, it is impossible to have a working set of dependencies with Symfony 2.7/Symfony 2.8 if one wishes to use `egulias/email-validator: ^1.2|^2.1`.

This is because Composer happily installs `egulias/email-validator` latest 2.1.x which is not compatible with Symfony 2.8.

This would prevent installation of v2.1.x on Symfony 2.7/2.8.

Commits
-------

72d8e8adb0 [Validator] Conflict with egulias/email-validator 2.0
2018-01-20 11:43:40 +01:00
Edi Modrić
72d8e8adb0 [Validator] Conflict with egulias/email-validator 2.0 2018-01-20 00:08:53 +01:00
Amrouche Hamza
bcb79a39ef
[Validator] add missing parent isset and add test 2018-01-19 12:39:28 +01:00
Robin Chalas
e64cb185cb Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:21:47 +01:00
Fabien Potencier
8e8ee09747 bug #25837 [SecurityBundle] Don't register in memory users as services (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Don't register in memory users as services

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

Commits
-------

13fa0454e4 [SecurityBundle] Don't register in memory users as services
2018-01-19 08:04:55 +01:00
Nicolas Grekas
7fc3969cd6 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
2018-01-18 23:12:33 +01:00
Nicolas Grekas
b785f133af bug #25835 [HttpKernel] DebugHandlersListener should always replace the existing exception handler (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] DebugHandlersListener should always replace the existing exception handler

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

The current logic is inconsistent because replacing or not depends whether an ExceptionHandler is registered or not.
Embeds tests for the previous PR on the same topic, Debug component's side.

Commits
-------

a4ddcc2 [HttpKernel] DebugHandlersListener should always replace the existing exception handler
2018-01-18 23:10:51 +01:00
Nicolas Grekas
a4ddcc298d [HttpKernel] DebugHandlersListener should always replace the existing exception handler 2018-01-18 23:01:50 +01:00
Robin Chalas
13fa0454e4 [SecurityBundle] Don't register in memory users as services 2018-01-18 15:57:23 +01:00
Christian Flothmann
48872f3aed Merge branch '2.7' into 2.8
* 2.7:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 14:56:23 +01:00
Fabien Potencier
78a8a63450 bug #25829 [Debug] Always decorate existing exception handlers to deal with fatal errors (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Always decorate existing exception handlers to deal with fatal errors

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

Decorating the exception is seamless, let's always do it and fix handling of fatal errors.
Related to #25408 also.

Commits
-------

205d7ae3f7 [Debug] Always decorate existing exception handlers to deal with fatal errors
2018-01-18 13:12:09 +01:00
Fabien Potencier
5d39415e3d minor #25833 fix the Composer API being used (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix the Composer API being used

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

a986efef0a fix the Composer API being used
2018-01-18 13:00:41 +01:00