Commit Graph

28630 Commits

Author SHA1 Message Date
Joachim Krempel
3288fb0d17 [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls 2018-01-30 17:18:42 +01:00
蝦米
5bbb77b866 support sapi_windows_vt100_support for php 7.2+ 2018-01-30 23:53:25 +08:00
Nicolas Grekas
926b1bee18 [Debug] Fix bad registration of exception handler, leading to mem leak 2018-01-30 16:14:37 +01:00
Fabien Potencier
c6453353d4 bug #25744 [TwigBridge] Allow label translation to be safe (MatTheCat)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Allow label translation to be safe

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

After overriding `TranslationExtension`'s `trans` filter to make it safe I noticed form labels were still escaped because of `label` in

```twig
{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}
```

Replacing this ternary with `if`/`else` allows `trans` return to be safe.

WDYT?

Commits
-------

041c42db6a Allow trans filter to be safe
2018-01-30 14:54:38 +01:00
Greg Anderson
35f98e2089 Follow-on to #25825: Fix edge case in getParameterOption.
Add one test to demonstrate getParameterOption fix. Add several tests to demonstrate current limitations in hasParameterOption.
2018-01-29 09:39:17 -08:00
Fabien Potencier
c9cf0aaae5 bumped Symfony version to 4.0.5 2018-01-29 14:36:59 +01:00
Fabien Potencier
109c4b45a9 updated VERSION for 4.0.4 2018-01-29 14:27:08 +01:00
Fabien Potencier
0023f4e84d bumped Symfony version to 3.4.5 2018-01-29 14:25:55 +01:00
Fabien Potencier
ba2eb73c3b updated VERSION for 3.4.4 2018-01-29 13:29:46 +01:00
Fabien Potencier
d5375d01dd bumped Symfony version to 2.8.35 2018-01-29 12:40:56 +01:00
Fabien Potencier
8548194196 updated VERSION for 2.8.34 2018-01-29 11:48:12 +01:00
Fabien Potencier
1ee3950b73 bumped Symfony version to 2.7.42 2018-01-29 11:46:38 +01:00
Fabien Potencier
87580b1fd2 updated VERSION for 2.7.41 2018-01-29 11:08:39 +01:00
Fabien Potencier
bd6df791f7 fixed bad merge 2018-01-29 10:29:16 +01:00
Fabien Potencier
8339a7b165 minor #25878 [HttpFoundation] Added "null" type on Request::create docblock (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25878).

Discussion
----------

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

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

Continuation of #24902 and #25875

Commits
-------

b18f9e76a5 [HttpFoundation] Added "null" type on Request::create docblock
2018-01-29 10:18:42 +01:00
Dariusz
b18f9e76a5 [HttpFoundation] Added "null" type on Request::create docblock 2018-01-29 10:18:40 +01:00
Fabien Potencier
a956a76867 bug #25932 Don't stop PSR-4 service discovery if a parent class is missing (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Don't stop PSR-4 service discovery if a parent class is missing

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

Commits
-------

3d6c3ba836 Don't stop PSR-4 service discovery if a parent class is missing.
2018-01-29 10:16:57 +01:00
Fabien Potencier
50d86e87a0 Merge branch '3.4' into 4.0
* 3.4:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  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
  Restore RoleInterface import
  [Console] Provide a bugfix where an array could be passed
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
  [DI] Fix initialization of legacy containers by delaying include_once
2018-01-29 10:06:29 +01:00
Fabien Potencier
d5ff094258 Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  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
  Restore RoleInterface import
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 10:03:43 +01:00
Fabien Potencier
57e5075645 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  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
  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 10:02:23 +01:00
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
Cosmin-Romeo TANASE
826dfbd496 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver 2018-01-29 09:51:44 +01:00
Jules Pietri
9722c063fb [Form] Fixed empty data on expanded ChoiceType and FileType 2018-01-28 12:59:04 +01:00
Alexander M. Turek
5b73d1c1e6 Removed assertDateTimeEquals() methods. 2018-01-27 12:01:42 +01:00
Alexander M. Turek
3d6c3ba836 Don't stop PSR-4 service discovery if a parent class is missing. 2018-01-26 21:15:55 +01:00
Christian Flothmann
317da3bdf8 keep the context when validating forms 2018-01-26 18:01:03 +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
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
Robin Chalas
05e9682868 bug #25397 [Console] Provide a DX where an array could be passed (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Provide a DX where an array could be passed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #25394
| License       | MIT
| Doc PR        | none

![img_2941](https://user-images.githubusercontent.com/3451634/33766610-977f77ce-dc1e-11e7-93c1-38dd0038d7f5.jpeg)

I think that this is not fixing the root causes that does not appears in 4.1, so maybe there is something better to do. I did not find the root cause So I think it can bo good to fix the problem too.

Commits
-------

de502f7 [Console] Provide a bugfix where an array could be passed
2018-01-25 10:33:05 +01:00
Gabriel Caruso
3d90a2217d Improve assertions 2018-01-24 15:56:32 -02:00
Fabien Potencier
5f537e4304 minor #25917 Restore RoleInterface import (Soullivaneuh)
This PR was merged into the 3.3 branch.

Discussion
----------

Restore RoleInterface import

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| License       | MIT

The import is use on PHPDoc but was accidentally removed. Maybe because PHPStorm does not match with the import when you use parenthesis.

Not really a bug as it is concerning only PHPDoc, but it make some analysis tools like PHPStan yelling:

```
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/AppBundle/Security/Authentication/ApiKeyAuthenticator.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  64     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   tests/AppBundle/Controller/WebTestCase.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  59     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```

Commits
-------

8ecfeb1e31 Restore RoleInterface import
2018-01-24 18:14:12 +01:00
Sullivan SENECHAL
8ecfeb1e31
Restore RoleInterface import 2018-01-24 17:32:05 +01:00
Amrouche Hamza
de502f7d6c
[Console] Provide a bugfix where an array could be passed 2018-01-24 16:57:03 +01:00
Christian Flothmann
58cdbd03e1 collect extension information as late as possible 2018-01-24 14:38:52 +01:00
Mathieu Lechat
041c42db6a Allow trans filter to be safe 2018-01-24 13:24:39 +01: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
f004895e46 bug #25858 [DI] Fix initialization of legacy containers by delaying include_once (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix initialization of legacy containers by delaying include_once

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

Best reviewed ignoring whitespaces:
https://github.com/symfony/symfony/pull/25858/files?w=1

Noticed while removing a package: silencing the failing `include_once` as introduced in #25255 is not working for the `$oldContainer` in `Kernel`, and fails with a fatal error when an include succeeds but the class inside misses a parent.

Delaying the calls to `include_once` to the moment where the fresh container is actually used first,  when setting the "kernel" service, works around the situation.

Commits
-------

5e750ec4b5 [DI] Fix initialization of legacy containers by delaying include_once
2018-01-23 07:50:41 +01:00
Christian Flothmann
52dd825bf1 allow null values for root nodes in YAML configs 2018-01-22 21:35:04 +01:00
Christian Flothmann
fb1be51a5c revert useless tests fixtures changes
This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.
2018-01-22 21:13:54 +01:00
Christian Flothmann
a1b1484376 always call the parent class' constructor 2018-01-22 14:46:57 +01:00
Nicolas Grekas
9bd28fc728 cs fix 2018-01-22 13:02:44 +01:00
Robin Chalas
36cd267590 [VarDumper] Fix docblock 2018-01-22 02:54:24 +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
ee04e5b58f Merge branch '3.4' into 4.0
* 3.4:
  Have weak_vendors ignore deprecations from outside
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  [Process] Skip environment variables with false value in Process
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  don't split lines on carriage returns when dumping
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [DI] compilation perf tweak
  [Validator] Conflict with egulias/email-validator 2.0
  [Validator] add missing parent isset and add test
2018-01-21 20:06:11 +01:00
Nicolas Grekas
8d4e3c52c0 Merge branch '3.3' into 3.4
* 3.3:
  Have weak_vendors ignore deprecations from outside
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  [Process] Skip environment variables with false value in Process
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  don't split lines on carriage returns when dumping
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [DI] compilation perf tweak
  [Validator] Conflict with egulias/email-validator 2.0
  [Validator] add missing parent isset and add test
2018-01-21 20:05:02 +01:00
Nicolas Grekas
fa7b76059f Merge branch '2.8' into 3.3
* 2.8:
  [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)"
  Formatting fix in upgrade 3.0 document
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [Validator] add missing parent isset and add test
2018-01-21 20:04:48 +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
Grégoire Paris
9ce0ae23ae
Have weak_vendors ignore deprecations from outside
phar:// and eval() can execute code that may or may not come from the vendors.
2018-01-21 19:42:21 +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
Robin Chalas
6b2267b836 bug #25873 [Console] Fix using finally where the catch can also fail (nicolas-grekas)
This PR was merged into the 4.0 branch.

Discussion
----------

[Console] Fix using finally where the catch can also fail

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

Restores code to 3.4 state, which is free from the issue.

Commits
-------

763a914 [Console] Fix using finally where the catch can also fail
2018-01-21 17:29:43 +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
Nicolas Grekas
02e5c67fb7 bug #25869 [Process] Skip environment variables with false value in Process (francoispluchino)
This PR was merged into the 3.3 branch.

Discussion
----------

[Process] Skip environment variables with false value in Process

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

With the commit 03adce239d, all env variables are injecting in the process, and the env variable with the `false` value are converted in empty string.

For example, it's problematic with the bundle SymfonyWebServerBundle and the last version of the [symfony/framework-bundle recipe](https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php#L11), because the WebServer override the value of `APP_ENV` with `false` to override previously loaded variables (c5a1218555), and with the commit 03adce239d, the `APP_ENV` variable is injected with a empty string value, instead of not being injected, as was the case before.

This PR not use the same logic as the [getDefaultEnv()](https://github.com/symfony/symfony/blob/4.0/src/Symfony/Component/Process/Process.php#L1553) method.

Commits
-------

2daf4f9 [Process] Skip environment variables with false value in Process
2018-01-21 16:22:08 +01:00
Nicolas Grekas
763a9145a8 [Console] Fix using finally where the catch can also fail 2018-01-21 15:52:44 +01:00
Fabien Potencier
7d8577be8a bug #25864 [Yaml] don't split lines on carriage returns when dumping (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] don't split lines on carriage returns when dumping

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

Commits
-------

845eb88f3b don't split lines on carriage returns when dumping
2018-01-21 13:26:08 +01:00
François Pluchino
2daf4f98ff [Process] Skip environment variables with false value in Process 2018-01-21 12:04:49 +01:00
Nicolas Grekas
5e750ec4b5 [DI] Fix initialization of legacy containers by delaying include_once 2018-01-21 10:59:06 +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
Christian Flothmann
845eb88f3b don't split lines on carriage returns when dumping 2018-01-20 16:04:53 +01:00
Christian Flothmann
5e70ee898e trim spaces from unquoted scalar values 2018-01-20 15:02:12 +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
Nicolas Grekas
ad8aff4203 [DI] compilation perf tweak 2018-01-20 09:34:19 +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
3d011e0e37 Merge branch '3.4' into 4.0
* 3.4:
  [Serializer] fix undefined class
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:28:59 +01:00
Robin Chalas
bc7b5d2943 [Serializer] fix undefined class 2018-01-19 12:19:37 +01:00
Robin Chalas
f5d2d67508 Merge branch '3.3' into 3.4
* 3.3:
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:19:01 +01:00
Robin Chalas
38abc7bb8f minor #25847 [FrameworkBundle] fix DI extension tests (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] fix DI extension tests

| 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 failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.

Commits
-------

1cb8f69 [FrameworkBundle] fix DI extension tests
2018-01-19 12:17:11 +01:00
Christian Flothmann
1cb8f6918f [FrameworkBundle] fix DI extension tests
The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.
2018-01-19 12:05:40 +01:00
Robin Chalas
39557e25c4 fix merge 2018-01-19 11:06:48 +01:00
Robin Chalas
1b1ed670a6 Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 11:03:45 +01:00
Robin Chalas
6cab776316 Fix translation test 2018-01-19 10:38:27 +01:00
Robin Chalas
34a3e25c1f Merge branch '3.3' into 4.0
* 3.3:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:33:46 +01:00
Robin Chalas
00621d4840 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:28:48 +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
dd32dabd19 Merge branch '3.4' into 4.0
* 3.4:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are 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
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Avoid button label translation when it's set to false
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  Fix options resolver with array allowed types
  [Console] Improve phpdoc on StyleInterface::ask()
  [TwigBridge][WIP] Pass the form-check-inline in parent
2018-01-18 23:19:33 +01:00
Nicolas Grekas
5f75d43e42 Merge branch '3.3' into 3.4
* 3.3:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  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
  [Cache] Fix handling of apcu_fetch() edgy behavior
  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.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 23:16:57 +01:00
Nicolas Grekas
5d9996457b Merge branch '2.8' into 3.3
* 2.8:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
2018-01-18 23:16:35 +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
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
753197f09e Merge branch '2.8' into 3.3
* 2.8:
  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 15:19:00 +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
67e38797a6 bug #25823 [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage is used (giovannialbero1992)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Notify that symfony/expression-language is not installed if ExpressionLanguage is used

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25742
| License       | MIT
| Doc PR        | not requested

Commits
-------

6aa2b7cce0 [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
2018-01-18 13:02:00 +01:00
Giovanni Albero
6aa2b7cce0 [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used 2018-01-18 12:13:08 +01:00
Fabien Potencier
b84807e977 minor #25809 Norwegian Nynorsk translation (glye)
This PR was merged into the 2.7 branch.

Discussion
----------

Norwegian Nynorsk translation

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

Adds translations for `nn` (Norwegian Nynorsk) based on `no` aka. `nb` (Norwegian Bokmål).
Improves existing translations.

Commits
-------

9b4b7d0d3a Add nn (Norwegian Nynorsk) translation files, and improve existing file
2018-01-18 11:45:20 +01:00
Nicolas Grekas
205d7ae3f7 [Debug] Always decorate existing exception handlers to deal with fatal errors 2018-01-18 10:58:19 +01:00
Fabien Potencier
3a8f905e10 bug #25824 Fixing a bug where the dump() function depended on bundle ordering (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixing a bug where the dump() function depended on bundle ordering

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

If DebugBundle is registered *before* TwigBundle, then the simpler `dump()` function wins over the fancy, var-dumper one from DebugBundle. In other words, you get different functionality based on the *order* in which you install libraries. To get the "bad" way, you can:

```
composer create-project symfony/skeleton show_bad_dump
cd show_bad_dump
composer require symfony/debug-bundle
composer require twig
```

Then create a Twig template with a `dump()` inside. It will use the less-fancy XDebug version.

I'm not sure if there's a more elegant fix for this or not... I have verified locally that this DOES fix the issue.

Thanks!

Commits
-------

717663aac1 Fixing a bug where the dump() function depended on bundle ordering
2018-01-17 21:43:09 +01:00
Fabien Potencier
6df7d83ec1 bug #25763 [OptionsResolver] Fix options resolver with array allowed types (mcg-web)
This PR was merged into the 3.4 branch.

Discussion
----------

[OptionsResolver] Fix options resolver with array allowed types

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

When playing a simple test:

```php
use Symfony\Component\OptionsResolver\Options;

$resolver = new OptionsResolver();
$resolver->setDefined('foo');
$resolver->setAllowedTypes('foo', 'string[]');
$options = $resolver->resolve(['foo' => ['bar', 'baz']]);
```

I get this error:

```
Symfony\Component\OptionsResolver\Exception\InvalidOptionsException: The option "foo" with value array is expected to be of type "string[]", but is of type "string[]"
```

This PR should fix this.

Commits
-------

cc215f7347 Fix options resolver with array allowed types
2018-01-17 21:41:08 +01:00
Fabien Potencier
132cec44f2 bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)
This PR was squashed before being merged into the 2.7 branch (closes #25789).

Discussion
----------

 Enableable ArrayNodeDefinition is disabled for empty configuration

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

Fixes #25760.

Currently, documented behavior is not true:

70c8c2d47b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php (L207-L208)

Commits
-------

a6a330dcd9  Enableable ArrayNodeDefinition is disabled for empty configuration
2018-01-17 21:35:17 +01:00
Mateusz Sip
a6a330dcd9 Enableable ArrayNodeDefinition is disabled for empty configuration 2018-01-17 21:35:12 +01:00
Ryan Weaver
717663aac1
Fixing a bug where the dump() function depended on bundle ordering 2018-01-17 09:58:59 -08:00
Nicolas Grekas
c707c4c455 [Cache] Fix handling of apcu_fetch() edgy behavior 2018-01-17 14:30:10 +01:00
Gunnstein Lye
9b4b7d0d3a Add nn (Norwegian Nynorsk) translation files, and improve existing file 2018-01-17 11:17:32 +01:00
Fabien Potencier
d41130153e bug #25816 Problem in phar see mergerequest #25579 (betzholz)
This PR was squashed before being merged into the 2.7 branch (closes #25816).

Discussion
----------

Problem in phar see mergerequest #25579

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

If packed into phar the old version creates path like 'file:///phar%3A/'. see https://github.com/symfony/symfony/pull/25579

Commits
-------

3e0c8ffb43 Problem in phar see mergerequest #25579
2018-01-17 09:38:26 +01:00
Boris Betzholz
3e0c8ffb43 Problem in phar see mergerequest #25579 2018-01-17 09:38:23 +01:00
Fabien Potencier
e6e235b6f4 bug #25781 [Form] Disallow transform dates beyond the year 9999 (curry684)
This PR was squashed before being merged into the 2.7 branch (closes #25781).

Discussion
----------

[Form] Disallow transform dates beyond the year 9999

Fixes #14727

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | not really
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14727
| License       | MIT

Explicitly locked out submission of dates beyond December 31st 9999 in forms as PHP is highly incapable of consistently handling such dates. Before this patch dates were randomly transformed or mangled.

Technically there is a BC break as this will now cause validation to fail on input that was *accepted* before, but it was mangled. Not my call but I prefer the rejection over data corruption:
```
// Old behavior
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, null, \IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd');
$result = $transformer->reverseTransform('20107-03-21');

// $result is now 2007-03-21
```

Commits
-------

70cc969537 [Form] Disallow transform dates beyond the year 9999
2018-01-17 09:13:32 +01:00
Niels Keurentjes
70cc969537 [Form] Disallow transform dates beyond the year 9999 2018-01-17 09:13:31 +01:00
Fabien Potencier
65b48b5b93 bug #25287 [Serializer] DateTimeNormalizer handling of null and empty values (returning it instead of new object) (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] DateTimeNormalizer handling of null and empty values (returning it instead of new object)

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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?   | no
| Fixed tickets | #23964
| License       | MIT
| Doc PR        |

I'm openning the disucussion on this as I think that should be returning null and not a new object.

WDYT ?

Working at home ;)
![img_2914](https://user-images.githubusercontent.com/3451634/33526107-ec2a6ce8-d83b-11e7-8949-f8d360ebb4b9.JPG)

Commits
-------

74726f3896 [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
2018-01-17 09:02:20 +01:00
TeLiXj
368edd8281 Avoid button label translation when it's set to false
Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appear
2018-01-17 08:49:55 +01:00
Fabien Potencier
de95a37245 bug #25127 [TwigBridge] Pass the form-check-inline in parent (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Pass the form-check-inline in parent

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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?   | no
| Fixed tickets | #25099 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none

I'm trying to find a way to be able to handle this. Will add a reproducer soon.

Commits
-------

02b7edb825 [TwigBridge][WIP] Pass the form-check-inline in parent
2018-01-17 08:22:23 +01:00
Fabien Potencier
3ed19dd040 bug #25812 Copied NO language files to the new NB locale (derrabus)
This PR was merged into the 2.7 branch.

Discussion
----------

Copied NO language files to the new NB locale

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

This PR copies all `NO` language files to a new locale `NB`. It also adds unit tests to ensure that `NB` and `NO` will always contain the same translations. This way, we allow application developers to either use the generic `NO` language code or the more precise `NB` (e.g. if they need to distinguish between the `NB` and `NN` variants of the Norwegian language).

For further details, please have a look at the discussion in #25792.

Commits
-------

aee9b1ea3e Copied NO language files to the new NB locale.
2018-01-17 08:10:53 +01:00
Nicolas Grekas
30086cc65b minor #25644 [Console] Improve phpdoc on StyleInterface::ask() (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Improve phpdoc on StyleInterface::ask()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

In a CLI command i keep asking an optional question until i get an answer. So interactively it's a required question. It looks like..

```php
do {
    $value = $io->ask('Value', null, function ($value) { return $value; });
} while (null === $value);
```

Which works nice.. but SA is complaining about

```
Strict comparison using === between null and string will always evaluate to false.
```

This should fix it. The mixed API goes back to https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/QuestionHelper.php#L38

Commits
-------

499d04f [Console] Improve phpdoc on StyleInterface::ask()
2018-01-16 19:55:58 +01:00
Nicolas Grekas
e6157aa1f7 Merge branch '3.4' into 4.0
* 3.4:
  [appveyor] set memory_limit=-1
  [Console] Keep the modified exception handler
  [Console] Fix restoring exception handler
  [Router] Skip anonymous classes when loading annotated routes
  allow dashes in cwd pathname when running the tests
  Fixed Request::__toString ignoring cookies
  Make sure we only build once and have one time the prefix when importing routes
  [Security] Fix fatal error on non string username
  [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 19:04:12 +01:00
Nicolas Grekas
86d01b550f Merge branch '3.3' into 3.4
* 3.3:
  [appveyor] set memory_limit=-1
  [Router] Skip anonymous classes when loading annotated routes
  Fixed Request::__toString ignoring cookies
  Make sure we only build once and have one time the prefix when importing routes
  [Security] Fix fatal error on non string username
2018-01-16 19:03:57 +01:00
Nicolas Grekas
2f8e1b86ea Merge branch '2.8' into 3.3
* 2.8:
  [appveyor] set memory_limit=-1
  [Router] Skip anonymous classes when loading annotated routes
  Fixed Request::__toString ignoring cookies
  [Security] Fix fatal error on non string username
2018-01-16 19:03:02 +01:00
Nicolas Grekas
899bf99879 Merge branch '2.7' into 2.8
* 2.7:
  [appveyor] set memory_limit=-1
  [Router] Skip anonymous classes when loading annotated routes
  Fixed Request::__toString ignoring cookies
  [Security] Fix fatal error on non string username
2018-01-16 19:00:04 +01:00
Nicolas Grekas
95c619300c minor #25813 [appveyor] set memory_limit=-1 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[appveyor] set memory_limit=-1

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

10e33ac [appveyor] set memory_limit=-1
2018-01-16 18:49:05 +01:00
Nicolas Grekas
10e33acf42 [appveyor] set memory_limit=-1 2018-01-16 18:39:46 +01:00
Nicolas Grekas
d8d85f17b5 bug #25753 [Console] Fix restoring exception handler (nicolas-grekas, fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix restoring exception handler

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

Commits
-------

0096449 [Console] Keep the modified exception handler
3fa1ad9 [Console] Fix restoring exception handler
2018-01-16 18:26:02 +01:00
Thomas Calvet
00964492d2 [Console] Keep the modified exception handler 2018-01-16 18:22:49 +01:00
Nicolas Grekas
3fa1ad9c81 [Console] Fix restoring exception handler 2018-01-16 18:22:47 +01:00
Alexander M. Turek
aee9b1ea3e Copied NO language files to the new NB locale. 2018-01-16 18:12:50 +01:00
Nicolas Grekas
01de7ad684 bug #25801 [Router] Skip anonymous classes when loading annotated routes (pierredup)
This PR was squashed before being merged into the 2.7 branch (closes #25801).

Discussion
----------

[Router] Skip anonymous classes when loading annotated routes

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

Skip any usage of anonymous classes when parsing files in `AnnotationFileLoader`

Commits
-------

d76a545 [Router] Skip anonymous classes when loading annotated routes
2018-01-16 17:51:07 +01:00
Pierre du Plessis
d76a545c01 [Router] Skip anonymous classes when loading annotated routes 2018-01-16 17:51:05 +01:00
Nicolas Grekas
f3ac9f51ef bug #25508 [FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded

| 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/recipes/issues/262
| License       | MIT
| Doc PR        | -

By binding CSRF and session default state, we provide better DX, but we also provide a way for bundles to enable session on its own: they just need to require "symfony/security-csrf".
Yes, that's a side effect, but I think that's a nice one for 3.4/4.0.
Of course, we might do better in 4.1, but for bug fix only releases, LGTM.

Commits
-------

9e8231f [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 15:44:24 +01:00
dtonder
db5f8deba9 allow dashes in cwd pathname when running the tests 2018-01-16 15:07:23 +01:00
Fabien Potencier
6c1625263e bug #25657 [Security] Fix fatal error on non string username (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix fatal error on non string username

| 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/issues/25612
| License       | MIT
| Doc PR        | n/a

That's consistent with what #22569 did for the `json_login` listener.

Commits
-------

8f095683d0 [Security] Fix fatal error on non string username
2018-01-16 08:11:36 +01:00
Fabien Potencier
663f3f09ad bug #25791 [Routing] Make sure we only build routes once (sroze)
This PR was merged into the 3.3 branch.

Discussion
----------

[Routing] Make sure we only build routes once

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

We need to build the collection(s) only once, else the prefix would be duplicated.

Commits
-------

927a75ac3e Make sure we only build once and have one time the prefix when importing routes
2018-01-16 08:08:46 +01:00
Yanick Witschi
0f79d09a10 Fixed Request::__toString ignoring cookies 2018-01-16 08:04:02 +01:00
Christian Flothmann
ce35073b62 Merge branch '3.4' into 4.0
* 3.4:
  [Console] Add placeholder for line number in console exception fixtures
  fix HHVM tests
  minor #25752 Don't right trim the deprecation message (alexpott)
2018-01-15 17:00:46 +01:00
Christian Flothmann
9e7cf69bec Merge branch '3.3' into 3.4
* 3.3:
  fix HHVM tests
  minor #25752 Don't right trim the deprecation message (alexpott)
2018-01-15 16:26:26 +01:00
Pierre du Plessis
686d4f7043 [Console] Add placeholder for line number in console exception fixtures 2018-01-15 16:23:30 +01:00
Christian Flothmann
ff40995e95 Merge branch '2.8' into 3.3
* 2.8:
  fix HHVM tests
  minor #25752 Don't right trim the deprecation message (alexpott)
2018-01-15 16:14:43 +01:00
Christian Flothmann
a920061114 Merge branch '2.7' into 2.8
* 2.7:
  fix HHVM tests
2018-01-15 16:01:15 +01:00
Christian Flothmann
da21003459 fix HHVM tests 2018-01-15 14:29:19 +01:00
Tobias Schultze
3a7099c0e2 Merge branch '3.3' into 3.4 2018-01-15 11:51:37 +01:00
Samuel ROZE
927a75ac3e
Make sure we only build once and have one time the prefix when importing routes 2018-01-15 10:37:11 +00:00
Tobias Schultze
f9785885a0 minor #25784 Remove polyfill-util dependency from fullstack and security (thewilkybarkid)
This PR was merged into the 3.3 branch.

Discussion
----------

Remove polyfill-util dependency from fullstack and security

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

Applies #22709 to the two higher-level packages. I've applied it to 3.3 as that's where that change was merged (though it was `master` as the time); these may actually apply earlier though?

(#16382 was mentioned and applied to 2.8, though is for the serializer which is unrelated? Should have been 3.0 when `StringUtils` was removed?)

Commits
-------

939efd59b9 Remove polyfill-util dependency from fullstack and security
2018-01-15 11:36:30 +01:00
Nicolas Grekas
844d81cbf5 Merge branch '2.7' into 2.8
* 2.7:
  minor #25752 Don't right trim the deprecation message (alexpott)
2018-01-14 15:14:42 +01:00
Nicolas Grekas
70c8c2d47b minor #25752 Don't right trim the deprecation message (alexpott)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 3.3 branch instead (closes #25752).

Discussion
----------

Don't right trim the deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | maybe yes
| New feature?  | no
| 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        | 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 master branch.
- Replace this comment by a description of what your PR is solving.
-->

The PhpUnit bridge lists deprecation messages after a test. In order to do this it outputs the message but it right trims the message - removing any fullstops. This is unexpected. It does this to add the number of time the message appears but this is not really necessary because the number of the times a deprecation message is triggered and from where is added below.

Commits
-------

0b03631 Don't right trim the deprecation message
2018-01-14 15:14:25 +01:00
Nicolas Grekas
c8d5deed8d Merge branch '3.4' into 4.0
* 3.4:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  [FrameworkBundle] fix tests
  Prefer composer install instead for using Symfony Installer
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:05:32 +01:00
Nicolas Grekas
3316e42797 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:04:53 +01:00
Nicolas Grekas
e9bcd217df fix merge 2018-01-13 15:03:33 +01:00
Nicolas Grekas
07b5304268 Merge branch '2.8' into 3.3
* 2.8:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:02:56 +01:00
Nicolas Grekas
4a211d8332 Merge branch '2.7' into 2.8
* 2.7:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 14:56:42 +01:00
Chris Wilkinson
939efd59b9 Remove polyfill-util dependency from fullstack and security 2018-01-13 12:56:38 +00:00
Robin Chalas
8f095683d0 [Security] Fix fatal error on non string username 2018-01-13 13:27:11 +01:00
Fabien Potencier
e52d977d12 fixed wrong description in a phpdoc 2018-01-13 10:54:37 +01:00
Fabien Potencier
3c4b34fd13 bug #25755 [Debug] prevent infinite loop with faulty exception handlers (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] prevent infinite loop with faulty exception handlers

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

Commits
-------

5f397f8dcf [Debug] prevent infinite loop with faulty exception handlers
2018-01-13 10:40:13 +01:00
Christian Flothmann
a53cc5ce91 19 digits VISA card numbers are valid 2018-01-12 15:15:01 +01:00
Amrouche Hamza
74726f3896
[Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object) 2018-01-12 14:55:27 +01:00
Jakub Chábek
efb8fa164e Add missing @ in phpdoc return statement 2018-01-11 11:30:34 +01:00
Alex Pott
0b03631e7f Don't right trim the deprecation message 2018-01-11 10:49:26 +01:00
Grégoire Pineau
e366772c06 [HttpKernel] Fixed test name 2018-01-11 10:34:39 +01:00
Nicolas Grekas
5f397f8dcf [Debug] prevent infinite loop with faulty exception handlers 2018-01-11 09:02:09 +01:00
Jeremiah VALERIE
cc215f7347
Fix options resolver with array allowed types 2018-01-11 08:56:07 +01:00
Christian Flothmann
6088dd328d [FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.
2018-01-10 20:10:52 +01:00
Fabien Potencier
2a9915e6da bug #25751 [FrameworkBundle] Add the missing enabled session attribute (sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Add the missing `enabled` session attribute

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

Add a missing `enabled` field in framework's `session` configuration.

Commits
-------

a3149310ac Add the missing `enabled` session attribute
2018-01-10 18:59:30 +01:00
Samuel ROZE
a3149310ac
Add the missing enabled session attribute 2018-01-10 17:16:33 +00:00
Nicolas Grekas
3e47c71028 [HttpKernel] Turn bad hosts into 400 instead of 500 2018-01-10 17:55:58 +01:00
Christian Flothmann
821ca52868 [FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.
2018-01-10 14:30:03 +01:00
Christian Flothmann
25473724b1 Merge branch '3.4' into 4.0
* 3.4: (26 commits)
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  [HttpKernel] Fix session handling: decouple "save" from setting response "private"
  swap filter/function and package names
  [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
  [HttpKernel] Fix compile error when a legacy container is fresh again
  Add tests for the HttpKernel request collector and redirection via cookies
  Uses cookies to track the requests redirection
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.4.4
  updated VERSION for 3.4.3
  updated CHANGELOG for 3.4.3
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  ...
2018-01-10 12:36:17 +01:00
Christian Flothmann
7625c771c6 Merge branch '3.3' into 3.4
* 3.3:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:30:01 +01:00
Christian Flothmann
fc9236dfb1 Merge branch '2.8' into 3.3
* 2.8:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:21:25 +01:00
Christian Flothmann
eca17ec964 Merge branch '2.7' into 2.8
* 2.7:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:05:18 +01:00
Fabien Potencier
0cbd417b5a bug #25699 [HttpKernel] Fix session handling: decouple "save" from setting response "private" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix session handling: decouple "save" from setting response "private"

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

Fixes https://github.com/symfony/symfony/pull/25583#issuecomment-355717344 from @Tobion, and provides extra laziness for the "session" service, related to https://github.com/symfony/recipes/pull/333.

(deps=high failure will be fixed by merging to upper branches.)

Commits
-------

f8727b8827 [HttpKernel] Fix session handling: decouple "save" from setting response "private"
2018-01-10 10:22:55 +01:00
Nicolas Grekas
fad59b3ce7 bug #25490 [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR (diversantvlz)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR

| 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 | no
| License       | MIT
| Doc PR        | no

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Php function json_encode/decode with option JSON_PARTIAL_OUTPUT_ON_ERROR  return result on error, but if have is error json_last_error() always return error code even if there is a result and it is not false. Because of this is impossible set JSON_PARTIAL_OUTPUT_ON_ERROR option across variable $context.

Current fix solves this problem.

Verification on the false is completely correct, since json_encode / decode returns false only on error if not set JSON_PARTIAL_OUTPUT_ON_ERROR option.

Such have a problem e.g when encoding data is not utf-8 (emoji from facebook).

Commits
-------

e7e410b [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
2018-01-10 10:09:58 +01:00
Vacheslav Silyutin
e7e410bfeb [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR 2018-01-10 10:02:39 +01:00
Nicolas Grekas
f8727b8827 [HttpKernel] Fix session handling: decouple "save" from setting response "private" 2018-01-10 09:23:11 +01:00
Fabien Potencier
bbcdbfac97 bug #25737 [TwigBridge] swap filter/function and package names (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] swap filter/function and package names

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

Error message was `Did you forget to run "composer require symfony/csrf_token"? Unknown function "form" in "Security/Pages/login.html".` and will now be `Did you forget to run "composer require symfony/form"? Unknown function "csrf_token" in "Security/Pages/login.html".`

Commits
-------

9db699bd8d swap filter/function and package names
2018-01-10 08:52:17 +01:00
Christian Flothmann
9db699bd8d swap filter/function and package names 2018-01-10 08:38:05 +01:00
Fabien Potencier
8ab89ce4ef minor #25720 [HttpKernel] Add tests for request collector and cookie redirection (sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Add tests for request collector and cookie redirection

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

Not that I felt bad doing a PR without tests (#25719) but this one adds tests to be sure we stabilize this cookie-based redirection.

Commits
-------

7b4f5a15e7 Add tests for the HttpKernel request collector and redirection via cookies
2018-01-10 07:34:28 +01:00
Fabien Potencier
93755abd9f bug #25731 [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler

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

Noticed by @jpauli: the native file session handler needs a call to `destroy()` to remove session files, even for new empty sessions.

Commits
-------

e5e2d5ddd2 [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
2018-01-10 07:27:53 +01:00
Nicolas Grekas
e5e2d5ddd2 [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler 2018-01-09 17:31:41 +01:00
Nicolas Grekas
8c3eadb1b1 [HttpKernel] Fix compile error when a legacy container is fresh again 2018-01-09 15:42:43 +01:00
Nicolas Grekas
9e8231ff0b [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded 2018-01-09 14:58:36 +01:00
Samuel ROZE
7b4f5a15e7
Add tests for the HttpKernel request collector and redirection via cookies 2018-01-08 19:18:05 +00:00
Samuel ROZE
83f257943f
Uses cookies to track the requests redirection 2018-01-08 16:08:04 +00:00
Fabien Potencier
7085569b50 bug #25696 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes

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

When `annotation_reader` is instantiated in an after-removing pass, it gets the real cache provider, instead of the dummy one that should be provided during compilation of the container.

This situation is found in e.g. `JMS\AopBundle\DependencyInjection\Compiler\PointcutMatchingPass`.

A workaround before next release could be to "get" the `annotation_reader` service somewhere before (like in a regular compiler pass of your own.)

Commits
-------

f66f9a7b37 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
2018-01-08 14:20:03 +01:00
Fabien Potencier
f2d687a08f feature #25669 [Security] Fail gracefully if the security token cannot be unserialized from the session (thewilkybarkid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fail gracefully if the security token cannot be unserialized from the session

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

If the security token in the session can't be unserialized, an `E_NOTICE` is issued. This prevents it (and provides a better log message if it's not even a `__PHP_Incomplete_Class`).

This is similar to #24731, but I saw it triggered when changing OAuth library (https://github.com/elifesciences/journal/pull/824), so the token class itself no longer exists. (I want to avoid having to manually invalidate all sessions, as not all sessions use that token class.)

Commits
-------

053fa43add [Security] Fail gracefully if the security token cannot be unserialized from the session
2018-01-08 14:01:11 +01:00
Javier Eguiluz
bc80258a1e Tweaked some styles in the profiler tables 2018-01-07 18:01:19 +01:00
Nicolas Grekas
6108a212ad minor #25585 Add type string to docblock for Process::setInput() (icanhazstring)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 3.3 branch instead (closes #25585).

Discussion
----------

Add type string to docblock for Process::setInput()

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

Add `string` as valid `$input` for `Process::setInput()`. Since `getInput()` will also return as string and the internal method `ProcessUtils::validateInput()` will accept a string, this should be a viable input type.

Commits
-------

e3de68f2 Add type string to docblock for Process::setInput()
2018-01-07 10:28:20 +01:00
Andreas Frömer
e3de68f2ff Add type string to docblock for Process::setInput() 2018-01-07 10:22:45 +01:00
Chris Wilkinson
053fa43add [Security] Fail gracefully if the security token cannot be unserialized from the session 2018-01-07 10:03:03 +01:00
Tomáš Votruba
a93861fef2
[Form] AbstractLayoutTest - fix DOMDocument casing 2018-01-07 00:30:09 +01:00
Roland Franssen
499d04fa92 [Console] Improve phpdoc on StyleInterface::ask() 2018-01-06 17:08:48 +01:00
Roland Franssen
7c9a6c3864 Run simple-phpunit with --no-suggest option 2018-01-06 16:56:43 +01:00
Nicolas Grekas
f66f9a7b37 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes 2018-01-05 13:12:39 +01:00
Fabien Potencier
37788a4774 bumped Symfony version to 4.0.4 2018-01-05 10:03:37 +01:00
Fabien Potencier
e705386d56 updated VERSION for 4.0.3 2018-01-05 09:54:25 +01:00
Fabien Potencier
f95ac4f809 bumped Symfony version to 3.4.4 2018-01-05 09:53:28 +01:00
Fabien Potencier
c49f693830 updated VERSION for 3.4.3 2018-01-05 09:33:00 +01:00
Fabien Potencier
9419535736 bumped Symfony version to 3.3.16 2018-01-05 09:11:08 +01:00
Fabien Potencier
c04fa7bf3f updated VERSION for 3.3.15 2018-01-05 08:28:45 +01:00
Fabien Potencier
7949672e39 bumped Symfony version to 2.8.34 2018-01-05 08:16:18 +01:00
Fabien Potencier
643eb0dfdd updated VERSION for 2.8.33 2018-01-05 07:19:35 +01:00
Fabien Potencier
05adcd07bd bumped Symfony version to 2.7.41 2018-01-05 06:53:01 +01:00
Fabien Potencier
f0467eb03a updated VERSION for 2.7.40 2018-01-05 06:16:01 +01:00
Nicolas Grekas
4900d80f03 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/PhpUnit] Fix BC/FC of serialized deprecations
2018-01-04 18:20:09 +01:00
Nicolas Grekas
8e473ab06d [Bridge/PhpUnit] Fix BC/FC of serialized deprecations 2018-01-04 18:19:23 +01:00
Nicolas Grekas
9624e449ad Merge branch '3.4' into 4.0
* 3.4:
  Use triggering file to determine weak vendors if when the test is run in a separate process
2018-01-04 18:00:39 +01:00
Nicolas Grekas
228453b33a bug #25685 Use triggering file to determine weak vendors if when the test is run in a separate process (alexpott)
This PR was squashed before being merged into the 3.4 branch (closes #25685).

Discussion
----------

Use triggering file to determine weak vendors if when the test is run in a separate process

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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?   | I think so
| Fixed tickets | #25684
| 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 master branch.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

3830577 Use triggering file to determine weak vendors if when the test is run in a separate process
2018-01-04 18:00:19 +01:00
Alex Pott
38305777f1 Use triggering file to determine weak vendors if when the test is run in a separate process 2018-01-04 17:57:37 +01:00
Nicolas Grekas
dd28a3286f [DI] fix param name cast 2018-01-04 16:56:45 +01:00
Nicolas Grekas
1ff918258c Merge branch '3.4' into 4.0
* 3.4:
  Remove randomness from dumped containers
  fixed messages to be explicit about the package needed to be installed
  [FrameworkBundle] Fix recommended composer command (add vendor)
  [WebProfilerBundle] set the var in the right scope
  [TwigBundle] fix lowest dep
  [HttpKernel] Disable CSP header on exception pages
  Use the default host even if context is empty and fallback to relative URL if empty host
  Proposing Flex-specific error messages in the controller shortcuts
2018-01-04 16:52:56 +01:00
Nicolas Grekas
234129404f Merge branch '3.3' into 3.4
* 3.3:
  [HttpKernel] Disable CSP header on exception pages
2018-01-04 16:43:31 +01:00
Nicolas Grekas
d546dcf4eb Merge branch '2.8' into 3.3
* 2.8:
  [HttpKernel] Disable CSP header on exception pages
2018-01-04 16:43:12 +01:00
Nicolas Grekas
6c1a23b844 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Disable CSP header on exception pages
2018-01-04 16:42:54 +01:00
Fabien Potencier
730841527a bug #25671 Remove randomness from dumped containers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove randomness from dumped containers

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

With this PR, the generated container is immutable by cache clearing: it doesn't contain any random string anymore (well, third party bundles can add random things back, but at least core doesn't).

Since the class+file name of the container is based on a hash of its content, it means that they are now stable also. This should help fix some edge cases/race conditions during cache clears/rebuilds.

(fabbot failure is false positive)

Commits
-------

14dd5d1dbd Remove randomness from dumped containers
2018-01-04 16:42:01 +01:00
Nicolas Grekas
47d486c01f minor #25682 Fix fixed messages to be explicit about the package needed to be installed (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix fixed messages to be explicit about the package needed to be installed

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

e8bc099 fixed messages to be explicit about the package needed to be installed
2018-01-04 16:27:33 +01:00
Nicolas Grekas
b3547a0794 Merge branch '3.3' into 3.4
* 3.3:
  Use the default host even if context is empty and fallback to relative URL if empty host
2018-01-04 16:09:34 +01:00
Nicolas Grekas
ba843c61d7 Merge branch '2.8' into 3.3
* 2.8:
  Use the default host even if context is empty and fallback to relative URL if empty host
2018-01-04 16:09:11 +01:00
Nicolas Grekas
14dd5d1dbd Remove randomness from dumped containers 2018-01-04 16:07:28 +01:00
Nicolas Grekas
8af464b888 Merge branch '2.7' into 2.8
* 2.7:
  Use the default host even if context is empty and fallback to relative URL if empty host
2018-01-04 15:58:28 +01:00
Fabien Potencier
e8bc099641 fixed messages to be explicit about the package needed to be installed 2018-01-04 14:13:45 +01:00
Tomas Kmieliauskas
f6d38b3770 [FrameworkBundle] Fix recommended composer command (add vendor)
Since running composer commands is time heavy, having a wrong one recommended to you just burns your time.
2018-01-04 14:08:31 +01:00
Javier Eguiluz
85240f2247 bug #25678 [WebProfilerBundle] set the var in the right scope (Jochen Mandl)
This PR was squashed before being merged into the 3.4 branch (closes #25678).

Discussion
----------

[WebProfilerBundle] set the var in the right scope

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

![2018-01-04 um 09 29 54](https://user-images.githubusercontent.com/1322118/34555989-de6fd11c-f134-11e7-81f7-9b840a946073.png)

This PR fixes the bug when displaying the toolbar. The variable "has_time_events" was not created in the scope of the toolbar.

Commits
-------

3e9780df59 [WebProfilerBundle] set the var in the right scope
2018-01-04 12:52:27 +01:00
Jochen Mandl
3e9780df59 [WebProfilerBundle] set the var in the right scope 2018-01-04 12:52:24 +01:00
Nicolas Grekas
837ec4df44 [TwigBundle] fix lowest dep 2018-01-04 11:29:03 +01:00
Gabriel Ostrolucký
f33a383a1a [HttpKernel] Disable CSP header on exception pages 2018-01-03 22:18:21 +01:00
Fabien Potencier
62c11e5ea8 bug #25491 [Routing] Use the default host even if context is empty (sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Use the default host even if context is empty

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

When the host in the context is empty... we should still use the default host.

**Note:** it seems like a lot of changes but all I did was to remove the `if` and de-indent the code that was inside.

Commits
-------

8f357df75b Use the default host even if context is empty and fallback to relative URL if empty host
2018-01-03 19:00:19 +01:00
Fabien Potencier
abfa3eeca5 minor #25636 Backport Flex-specific error messages in controller shortcuts to 3.4 (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Backport Flex-specific error messages in controller shortcuts to 3.4

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

Commits
-------

419e93465f Proposing Flex-specific error messages in the controller shortcuts
2018-01-03 18:28:45 +01:00
Nicolas Grekas
dde7381c03 Merge branch '3.4' into 4.0
* 3.4:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  [DX] [DI] Improve exception for invalid setter injection arguments
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:15:19 +01:00
Nicolas Grekas
682bf5b2ae Merge branch '3.3' into 3.4
* 3.3:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:14:19 +01:00
Nicolas Grekas
00e8908375 Merge branch '2.8' into 3.3
* 2.8:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:13:53 +01:00
Samuel ROZE
8f357df75b
Use the default host even if context is empty and fallback to relative URL if empty host 2018-01-03 17:13:26 +00:00
Nicolas Grekas
5150086d08 Merge branch '2.7' into 2.8
* 2.7:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:12:09 +01:00
Nicolas Grekas
0f884e0ae4 minor #25653 PHP CS Fixer: clean up repo and adjust config (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25653).

Discussion
----------

PHP CS Fixer: clean up repo and adjust config

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

Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359) (already merged!).

Commits
-------

b14cbc1 PHP CS Fixer: clean up repo and adjust config
2018-01-03 18:10:39 +01:00
Dariusz
b14cbc1845 PHP CS Fixer: clean up repo and adjust config 2018-01-03 18:10:15 +01:00
Kevin Bond
dc3a94e83a
use interface_exists instead of class_exists 2018-01-03 11:18:08 -05:00
Ryan Weaver
419e93465f Proposing Flex-specific error messages in the controller shortcuts 2018-01-03 15:34:56 +01:00
Niels Keurentjes
6850a228a7 [DX] [DI] Improve exception for invalid setter injection arguments 2018-01-03 12:24:16 +01:00
Jordan Hoff
e2b609162d Dumper shouldn't use html format for phpdbg 2018-01-03 11:33:04 +01:00
Fabien Potencier
d975ad63a0 bug #25529 [Validator] Fix access to root object when using composite constraint (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix access to root object when using composite constraint

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

Commits
-------

b18cdcf417 [Validator] Fix access to root object when using composite constraint
2018-01-03 09:00:37 +01:00
Fabien Potencier
bccb8b6524 Merge branch '3.4' into 4.0
* 3.4:
  fixed years in copyright
  fix typo
2018-01-03 08:38:00 +01:00
Fabien Potencier
a483d37eaf Merge branch '3.3' into 3.4
* 3.3:
  fixed years in copyright
2018-01-03 08:37:34 +01:00
Fabien Potencier
9918a66309 Merge branch '2.8' into 3.3
* 2.8:
  fixed years in copyright
2018-01-03 08:37:11 +01:00
Fabien Potencier
967066569a Merge branch '2.7' into 2.8
* 2.7:
  fixed years in copyright
2018-01-03 08:36:31 +01:00
Fabien Potencier
07a7f560cd fixed years in copyright 2018-01-03 08:23:28 +01:00
Nicolas Grekas
2ace731491 fix typo 2018-01-02 17:39:41 +01:00
Nicolas Grekas
f9fdb228ce Merge branch '3.4' into 4.0
* 3.4:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
  fixed some deprecation messages
  fixed CS
  Fixes for Oracle in PdoSessionHandler
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
  [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
  [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
  Suggest to write an implementation if the interface cannot be autowired
  [Debug] Skip DebugClassLoader checks for already parsed files
  [2.7][DX] Use constant message contextualisation for deprecations
  Remove group options without data and fix normalization
  Remove redundant translation path
2018-01-02 17:33:53 +01:00
Nicolas Grekas
dd66512734 Merge branch '3.3' into 3.4
* 3.3:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
2018-01-02 16:47:46 +01:00
Nicolas Grekas
096cbbd3cd Merge branch '2.8' into 3.3
* 2.8:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:47:19 +01:00