Commit Graph

14353 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
Edi Modrić
72d8e8adb0 [Validator] Conflict with egulias/email-validator 2.0 2018-01-20 00:08:53 +01:00
Nicolas Grekas
a4ddcc298d [HttpKernel] DebugHandlersListener should always replace the existing exception handler 2018-01-18 23:01:50 +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
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
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
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
Yanick Witschi
0f79d09a10 Fixed Request::__toString ignoring cookies 2018-01-16 08:04:02 +01:00
Christian Flothmann
da21003459 fix HHVM tests 2018-01-15 14:29:19 +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
Christian Flothmann
a53cc5ce91 19 digits VISA card numbers are valid 2018-01-12 15:15:01 +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
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
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
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
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
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
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
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
07a7f560cd fixed years in copyright 2018-01-03 08:23:28 +01:00
Nicolas Grekas
28478374f7 minor #25646 Update LICENSE year... forever (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update LICENSE year... forever

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

By using the same trick than Facebook: https://github.com/facebook/react/blob/master/LICENSE

Commits
-------

8ce8bd5 Update LICENSE year... forever
2018-01-02 16:40:42 +01:00
Nicolas Grekas
e5772881b8 minor #25652 Clean up (carusogabriel)
This PR was squashed before being merged into the 2.7 branch (closes #25652).

Discussion
----------

Clean up

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

I've removed all white spaces and extra lines from our `markdown` files. Recently [I did it in our documentation](https://github.com/symfony/symfony-docs/pull/8944), and thought would be interesting to replicate here 😄

Commits
-------

acd0d7c Clean up
2018-01-02 16:37:25 +01:00
Gabriel Caruso
acd0d7c93f Clean up 2018-01-02 16:37:23 +01:00
ADmad
c5f0f4ce3e Update return type in docblock. 2018-01-02 16:34:25 +01:00