Commit Graph

37349 Commits

Author SHA1 Message Date
Nicolas Grekas
2bab37d64f bug #32206 Catch JsonException and rethrow in JsonEncode (phil-davis)
This PR was merged into the 3.4 branch.

Discussion
----------

Catch JsonException and rethrow in JsonEncode

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License       | MIT
| Doc PR        | not applicable

PR #31860 provided handling of PHP  7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.

PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.

IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`

Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`

Commits
-------

9c76790ee8 Catch JsonException and rethrow in JsonEncode
2019-06-28 13:57:22 +02:00
Nicolas Grekas
8477f2b942 minor #32248 fix Debug component dependencies (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

fix Debug component dependencies

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

Commits
-------

87fe077a89 fix Debug component dependencies
2019-06-28 13:37:40 +02:00
Christian Flothmann
d1261e78a4 remove invalid test cases 2019-06-28 12:15:37 +02:00
Grégoire Pineau
379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
It can return an array of objects
2019-06-28 11:46:25 +02:00
Christian Flothmann
87fe077a89 fix Debug component dependencies 2019-06-28 11:18:39 +02:00
smoench
02ee4d0b05
[Finder] docblock fixes 2019-06-28 10:02:59 +02:00
Christian Flothmann
901fe0d7c5 pass error code as a string 2019-06-28 09:33:32 +02:00
Fabien Potencier
bcc66e3400 minor #32226 [travis] not all components have a master branch (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] not all components have a master branch

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

Commits
-------

b73025a4c6 [travis] not all components have a master branch
2019-06-27 18:19:56 +02:00
Nicolas Grekas
b73025a4c6 [travis] not all components have a master branch 2019-06-27 18:11:56 +02:00
Phil Davis
9c76790ee8 Catch JsonException and rethrow in JsonEncode 2019-06-27 10:07:28 +05:45
Nicolas Grekas
eb438a48d6 bug #32200 [Security/Core] work around sodium_compat issue (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] work around sodium_compat issue

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

As reported by @mbabker in https://github.com/symfony/symfony/pull/32169
1.0.9 per https://github.com/jedisct1/libsodium/releases/tag/1.0.9

Commits
-------

df50685abf [Security/Core] work around sodium_compat issue
2019-06-26 20:25:43 +02:00
Nicolas Grekas
df50685abf [Security/Core] work around sodium_compat issue 2019-06-26 20:07:24 +02:00
Fabien Potencier
fe5a4ee999 bumped Symfony version to 3.4.30 2019-06-26 16:17:55 +02:00
Fabien Potencier
4c9b6d7d89
Merge pull request #32190 from fabpot/release-3.4.29
released v3.4.29
2019-06-26 15:56:55 +02:00
Fabien Potencier
5296d2dfa0 updated VERSION for 3.4.29 2019-06-26 15:56:39 +02:00
Fabien Potencier
7f886dcef0 update CONTRIBUTORS for 3.4.29 2019-06-26 15:56:32 +02:00
Fabien Potencier
6425639fe0 updated CHANGELOG for 3.4.29 2019-06-26 15:56:21 +02:00
Fabien Potencier
01fc2b409e minor #32185 [Routing] Fixed type annotation (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fixed type annotation

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

The `UrlGeneratorInterface::generate()` method expects an array as argument `$parameters`, but the docblock does not reflect that. This PR fixes the type. Discovered while working on #32176.

Commits
-------

753bf7e0df Fixed type annotation.
2019-06-26 14:30:21 +02:00
Alexander M. Turek
753bf7e0df Fixed type annotation. 2019-06-26 13:14:13 +02:00
Nicolas Grekas
85ac1a6dd5 Bump phpunit-bridge 2019-06-26 12:03:25 +02:00
Fabien Potencier
c042b5b6a5 bug #32137 [HttpFoundation] fix accessing session bags (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix accessing session bags

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

Commits
-------

7a4570dcac fix accessing session bags
2019-06-26 09:16:02 +02:00
Fabien Potencier
c511e46c73 bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] collect called listeners information only 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        |

Commits
-------

2ad32df6e0 collect called listeners information only once
2019-06-26 08:45:17 +02:00
Fabien Potencier
7cc4cabd47 bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix calling Client::getProfile() before sending a request

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Prevent throwing an error when calling getProfile before a request has been sent.

Commits
-------

9e6f4b2122 [FrameworkBundle] Fix calling Client::getProfile() before sending a request
2019-06-26 08:42:52 +02:00
Fabien Potencier
28b20b8a73 bug #32163 [DoctrineBridge] Fix type error (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fix type error

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

See discussion here: https://github.com/doctrine/DoctrineBundle/pull/984

> Having SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')) query and when clicking on explain currently it throws:

> Argument 2 passed to Doctrine\DBAL\Connection::resolveParams() must be of the type array, null given, called in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 911

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

7b8ee3ece8 Fix type error
2019-06-26 08:19:19 +02:00
Kévin Dunglas
9e6f4b2122
[FrameworkBundle] Fix calling Client::getProfile() before sending a request 2019-06-25 17:43:39 +02:00
Tomas
7b8ee3ece8 Fix type error 2019-06-25 17:06:32 +03:00
Fabien Potencier
675d463cf5 bug #32170 [Security/Core] Don't use ParagonIE_Sodium_Compat (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] Don't use ParagonIE_Sodium_Compat

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

This is dead code:
https://github.com/paragonie/sodium_compat#features-excluded-from-this-polyfill

Commits
-------

61ea53d57f [Security/Core] Don't use ParagonIE_Sodium_Compat
2019-06-25 15:14:38 +02:00
Nicolas Grekas
61ea53d57f [Security/Core] Don't use ParagonIE_Sodium_Compat 2019-06-25 14:22:47 +02:00
Christian Flothmann
2ad32df6e0 collect called listeners information only once 2019-06-25 09:45:31 +02:00
Nicolas Grekas
57d73fcac3 minor #32140 [Filesystem] add test to avoid regressions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] add test to avoid regressions

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

Commits
-------

0d7d1f81bc add test to avoid regressions
2019-06-23 17:08:29 +02:00
Christian Flothmann
0d7d1f81bc add test to avoid regressions 2019-06-23 11:29:17 +02:00
Christian Flothmann
196ee5599d fix typos 2019-06-23 10:10:04 +02:00
Christian Flothmann
8a00c256f2 minor #32112 Turkish translation added to Form Component (emr)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #32112).

Discussion
----------

Turkish translation added to Form Component

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

Commits
-------

a030e393c5 Turkish translation added to Form Component
2019-06-23 09:45:29 +02:00
Emre Akinci
a030e393c5 Turkish translation added to Form Component 2019-06-23 09:45:21 +02:00
Christian Flothmann
7a4570dcac fix accessing session bags 2019-06-22 22:10:25 +02:00
Christian Flothmann
4c088b6dae bug #32123 [Form] fix translation domain (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix translation domain

| 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/symfony/issues/32045#issuecomment-504005348
| License       | MIT
| Doc PR        |

Commits
-------

74387cf21f fix translation domain
2019-06-21 11:53:38 +02:00
Christian Flothmann
74387cf21f fix translation domain 2019-06-20 22:29:36 +02:00
Fabien Potencier
370682c307 bug #32116 [FrameworkBundle] tag the FileType service as a form type (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] tag the FileType service as a form type

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

In #30961 we undeprecated the `form.type.file` service as we need to pass the translator to the form type. But we forgot to add back the `form.type` tag which means that the form registry actually never used our service but instantiated the `FileType` itself and thus the type was never able to use a translator.

Commits
-------

ea5b1f4d67 tag the FileType service as a form type
2019-06-20 13:17:42 +02:00
Christian Flothmann
ea5b1f4d67 tag the FileType service as a form type 2019-06-20 12:19:18 +02:00
Fabien Potencier
6fcd319d78 minor #32044 [Validator] Fix GroupSequenceProvider annotation (enumag)
This PR was squashed before being merged into the 3.4 branch (closes #32044).

Discussion
----------

[Validator] Fix GroupSequenceProvider annotation

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

The possibility was added in https://github.com/symfony/symfony/pull/19982, just forgot to fix this annotation back then.

Commits
-------

bf6d2532de [Validator] Fix GroupSequenceProvider annotation
2019-06-20 08:43:36 +02:00
Jáchym Toušek
bf6d2532de [Validator] Fix GroupSequenceProvider annotation 2019-06-20 08:43:29 +02:00
Robin Chalas
8ad74a859d minor #32001 [Security] Fix AuthenticationException::getToken typehint (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix AuthenticationException::getToken typehint

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

The token may be not set when throwing AuthenticationException.

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

a9705a0143 Fix AuthenticationException::getToken typehint
2019-06-19 19:38:48 +02:00
Alex Bowers
c266d6c737
Update Request.php 2019-06-19 17:03:11 +01:00
Fabien Potencier
df210194e0 minor #32100 Update ajax security cheat sheet link (steef)
This PR was merged into the 3.4 branch.

Discussion
----------

Update ajax security cheat sheet link

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

# Description
After looking in the `JsonResponse` class I found an old OWASP [link](https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside). As the cheat sheet series project is moved to GitHub the link can be updated to the [following](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md).

## Screenshot
<img width="552" alt="Screenshot 2019-06-19 at 16 52 19" src="https://user-images.githubusercontent.com/34915382/59776184-a7e2bf80-92b2-11e9-8d23-802acfddfb1d.png">

Commits
-------

32d02d6141 Update ajax security cheat sheet link
2019-06-19 17:25:42 +02:00
Stefano Degenkamp
32d02d6141
Update ajax security cheat sheet link
As the cheat sheet series project has been moved to github.
2019-06-19 17:21:12 +02:00
Alex Bowers
23db9be884
Don't assume port 0 for X-Forwarded-Port 2019-06-19 12:46:55 +01:00
Fabien Potencier
eb4026b3f4 bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround BC break in PHP 7.3

| 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/symfony-standard/issues/1138 https://github.com/symfony/website-skeleton/issues/231
| License       | MIT
| Doc PR        | -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care.
- 7.1 A non well formed numeric value encountered E_NOTICE
- 7.1 A non-numeric value encountered E_WARNING
- 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

Commits
-------

d8d43e6195 [Debug] workaround BC break in PHP 7.3
2019-06-19 12:21:41 +02:00
Fabien Potencier
459e791e59 minor #32092 [FrameworkBundle] minor: fix typo in SessionTest (Simperfit)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #32092).

Discussion
----------

[FrameworkBundle] minor: fix typo in SessionTest

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none.   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no  <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

A little typo

Commits
-------

494281465d [FrameworkBundle] minor: fix typo in SessionTest
2019-06-19 10:53:57 +02:00
Amrouche Hamza
494281465d [FrameworkBundle] minor: fix typo in SessionTest 2019-06-19 10:53:48 +02:00
Nicolas Grekas
d8d43e6195 [Debug] workaround BC break in PHP 7.3 2019-06-18 23:26:03 +02:00