Commit Graph

25407 Commits

Author SHA1 Message Date
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 f1f18ad608 bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Conflict with egulias/email-validator 2.0

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

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

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

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

Commits
-------

72d8e8adb0 [Validator] Conflict with egulias/email-validator 2.0
2018-01-20 11:43:40 +01:00
Edi Modrić 72d8e8adb0 [Validator] Conflict with egulias/email-validator 2.0 2018-01-20 00:08:53 +01:00
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 b785f133af bug #25835 [HttpKernel] DebugHandlersListener should always replace the existing exception handler (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] DebugHandlersListener should always replace the existing exception handler

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

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

Commits
-------

a4ddcc2 [HttpKernel] DebugHandlersListener should always replace the existing exception handler
2018-01-18 23:10:51 +01:00
Nicolas Grekas a4ddcc298d [HttpKernel] DebugHandlersListener should always replace the existing exception handler 2018-01-18 23:01:50 +01:00
Robin Chalas 13fa0454e4 [SecurityBundle] Don't register in memory users as services 2018-01-18 15:57:23 +01:00
Fabien Potencier 78a8a63450 bug #25829 [Debug] Always decorate existing exception handlers to deal with fatal errors (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

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

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

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

Commits
-------

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

Discussion
----------

fix the Composer API being used

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

Commits
-------

a986efef0a fix the Composer API being used
2018-01-18 13:00:41 +01:00
Christian Flothmann a986efef0a fix the Composer API being used 2018-01-18 12:52:12 +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 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
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 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 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
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
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 06ef68fae7 bug #25799 Fixed Request::__toString ignoring cookies (Toflar)
This PR was squashed before being merged into the 2.7 branch (closes #25799).

Discussion
----------

Fixed Request::__toString ignoring cookies

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

`Request::__toString()` ignored cookie values which caused me some headaches during a debugging session 😄

Commits
-------

0f79d09a10 Fixed Request::__toString ignoring cookies
2018-01-16 08:04:03 +01:00
Yanick Witschi 0f79d09a10 Fixed Request::__toString ignoring cookies 2018-01-16 08:04:02 +01:00
Nicolas Grekas 277219d0a7 minor #25795 [HttpFoundation] fix HHVM tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] fix HHVM tests

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

It looks like `parse_url()` broke for some URLs in HHVM 3.18.7. For our tests it IMO isn't really relevant how username and password look like.

Commits
-------

da21003 fix HHVM tests
2018-01-15 15:53:26 +01:00
Christian Flothmann da21003459 fix HHVM tests 2018-01-15 14:29:19 +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
Robin Chalas cbf73c6e89 minor #25783 Fix wrong description in a phpdoc (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix wrong description in a phpdoc

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

e52d977 fixed wrong description in a phpdoc
2018-01-13 13:28:23 +01: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
Fabien Potencier ae8b5a750e bug #25771 [Validator] 19 digits VISA card numbers are valid (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] 19 digits VISA card numbers are valid

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

some sources:

* https://en.wikipedia.org/wiki/Payment_card_number
* https://blog.vindicia.com/19-digit-visas-and-2-digit-mastercards/
* https://www.nccgroup.trust/de/uber-uns/newsroom-and-events/blogs/2016/november/prepare-for-19-digit-credit-cards/
* http://support.worldpay.com/support/kb/bg/testandgolive/tgl5103.html

Commits
-------

a53cc5ce91 19 digits VISA card numbers are valid
2018-01-13 10:36:20 +01:00
Christian Flothmann a53cc5ce91 19 digits VISA card numbers are valid 2018-01-12 15:15:01 +01:00
Nicolas Grekas d78a98d793 minor #25764 [HttpKernel] Fixed test name (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fixed test name

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

Commits
-------

e366772 [HttpKernel] Fixed test name
2018-01-11 11:06:41 +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
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
Fabien Potencier f35a7b5a7a bug #25750 [HttpKernel] Turn bad hosts into 400 instead of 500 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Turn bad hosts into 400 instead of 500

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

Commits
-------

3e47c71028 [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-10 18:55:02 +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
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
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