Commit Graph

35006 Commits

Author SHA1 Message Date
Christian Flothmann
1df45e4356 Merge branch '4.0'
* 4.0: (30 commits)
  [FrameworkBundle] fix tests
  [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 4.0.4
  updated VERSION for 4.0.3
  updated CHANGELOG for 4.0.3
  bumped Symfony version to 3.4.4
  updated VERSION for 3.4.3
  updated CHANGELOG for 3.4.3
  ...
2018-01-10 20:03:03 +01:00
Fabien Potencier
ae101f4625 minor #25745 [FrameworkBundle] fix tests (xabbuh)
This PR was merged into the 4.0 branch.

Discussion
----------

[FrameworkBundle] fix tests

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

Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.

Commits
-------

821ca52868 [FrameworkBundle] fix tests
2018-01-10 18:53:26 +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
Fabien Potencier
eac7e19eb3 bug #25733 [HttpKernel] Fix compile error when a legacy container is fresh again (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix compile error when a legacy container is fresh again

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

Noticed by @jpauli again: when reverting some configuration changes ends up generating the same container as the previously legacy one, the legacy flag should be removed.

Commits
-------

8c3eadb1b1 [HttpKernel] Fix compile error when a legacy container is fresh again
2018-01-10 07:23:11 +01:00
Fabien Potencier
c8249300ad bug #25709 Tweaked some styles in the profiler tables (javiereguiluz)
This PR was merged into the 2.8 branch.

Discussion
----------

Tweaked some styles in the profiler tables

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

To fix #25670 and other related minor issues, I propose some tweaks to the tables of the profiler panels.

Commits
-------

bc80258a1e Tweaked some styles in the profiler tables
2018-01-10 07:21:22 +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
Samuel ROZE
7b4f5a15e7
Add tests for the HttpKernel request collector and redirection via cookies 2018-01-08 19:18:05 +00:00
Fabien Potencier
5f05774f0c bug #25719 [HttpKernel] Uses cookies to track the requests redirection (sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Uses cookies to track the requests redirection

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

In order to track the redirections across requests, we need to have some state. So far, we've been using the session but some users have complained about it (#24774, #24730). The idea is that we don't actually need the session, we can use cookies.

It's a tradeoff: using a cookie would mean that both the redirection and the target page will not be cachable (because of the Set-Cookie to set the sf_redirect and the one to clear it).

As it's only on dev, it seems fair to say that having no cache (because of `Set-Cookie`s) is a better side effect than starting the session.

Commits
-------

83f257943f Uses cookies to track the requests redirection
2018-01-08 19:28:44 +01: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
a97f8b7954 feature #25710 [FrameworkBundle] add cache.app.simple psr simple cache (dmaicher)
This PR was squashed before being merged into the 4.1-dev branch (closes #25710).

Discussion
----------

[FrameworkBundle] add cache.app.simple psr simple cache

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

This adds a PSR SimpleCache version of the `cache.app` service.

Should I also update the documentation somewhere? 😊

Commits
-------

1b6ec8b0ae [FrameworkBundle] add cache.app.simple psr simple cache
2018-01-08 14:16:52 +01:00
David Maicher
1b6ec8b0ae [FrameworkBundle] add cache.app.simple psr simple cache 2018-01-08 14:16:50 +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
Fabien Potencier
445ce1d437 feature #25504 [Validator] Add option to pass custom values to Expression validator (ostrolucky)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Validator] Add option to pass custom values to Expression validator

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

I needed this in a Form. I had no way to pass things from `$options` into Expression validator.

Maybe can aid in https://github.com/symfony/symfony/pull/23134

Commits
-------

ba0565e3e8 [Validator] Add option to pass custom values to Expression validator
2018-01-08 13:57:43 +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
Nicolas Grekas
a15894e768 feature #25701 [FrameworkBundle] add autowiring aliases for TranslationReaderInterface, ExtractorInterface & TranslationWriterInterface (Dennis Langen)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] add autowiring aliases for TranslationReaderInterface, ExtractorInterface & TranslationWriterInterface

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

Supporting symfony/symfony#25679

Commits
-------

e2ddc17 adding interface alias for reader, writer and extractor
2018-01-07 09:07:44 +01:00
Nicolas Grekas
813f957487 minor #25705 [Form] AbstractLayoutTest - fix DOMDocument casing (TomasVotruba)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] AbstractLayoutTest - fix DOMDocument casing

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

This actually breaks static analysis, because casing is incorrect

Commits
-------

a93861f [Form] AbstractLayoutTest - fix DOMDocument casing
2018-01-07 09:05:02 +01:00
Tomáš Votruba
a93861fef2
[Form] AbstractLayoutTest - fix DOMDocument casing 2018-01-07 00:30:09 +01:00
Fabien Potencier
840a3d8084 bug #25700 Run simple-phpunit with --no-suggest option (ro0NL)
This PR was merged into the 3.3 branch.

Discussion
----------

Run simple-phpunit with --no-suggest option

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

This should reduce the output on CI a bit :) (see https://travis-ci.org/msgphp/msgphp/jobs/325750064#L865)

Not really tested.. so i hope someone can confirm. AFAIK it happens from here.

Commits
-------

7c9a6c3864 Run simple-phpunit with --no-suggest option
2018-01-06 18:23:27 +01:00
Dennis Langen
e2ddc17b79 adding interface alias for reader, writer and extractor 2018-01-06 17:10:26 +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
8cc66bf674
Merge pull request #25692 from fabpot/release-4.0.3
released v4.0.3
2018-01-05 09:55:01 +01:00
Fabien Potencier
e705386d56 updated VERSION for 4.0.3 2018-01-05 09:54:25 +01:00
Fabien Potencier
573848ae70 updated CHANGELOG for 4.0.3 2018-01-05 09:54:20 +01:00
Fabien Potencier
f95ac4f809 bumped Symfony version to 3.4.4 2018-01-05 09:53:28 +01:00
Fabien Potencier
21abeae69b
Merge pull request #25691 from fabpot/release-3.4.3
released v3.4.3
2018-01-05 09:33:31 +01:00
Fabien Potencier
c49f693830 updated VERSION for 3.4.3 2018-01-05 09:33:00 +01:00
Fabien Potencier
d1cd997300 updated CHANGELOG for 3.4.3 2018-01-05 09:32:54 +01:00
Fabien Potencier
9419535736 bumped Symfony version to 3.3.16 2018-01-05 09:11:08 +01:00
Fabien Potencier
6e2feb700f
Merge pull request #25690 from fabpot/release-3.3.15
released v3.3.15
2018-01-05 08:28:58 +01:00
Fabien Potencier
c04fa7bf3f updated VERSION for 3.3.15 2018-01-05 08:28:45 +01:00
Fabien Potencier
40144bbd45 updated CHANGELOG for 3.3.15 2018-01-05 08:28:38 +01:00