Commit Graph

36406 Commits

Author SHA1 Message Date
Fabien Potencier ccf6223c7a minor #29964 [HttpKernel] Fix HttpKernel Debug requirement (jvasseur)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix HttpKernel Debug requirement

| 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 `LoggerDataCollector` is using the `SilencedErrorContext` class that doesn't exists before Symfony 3.2

Commits
-------

69feb49c0d Fix HttpKernel Debug requirement
2019-01-23 15:15:26 +01:00
Jérôme Vasseur 69feb49c0d Fix HttpKernel Debug requirement 2019-01-23 14:37:11 +01:00
Fabien Potencier 0c323028d2 minor #29954 [Form] synchronise the form builder docblock (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] synchronise the form builder docblock

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

419d3db86c synchronise the form builder docblock
2019-01-23 14:02:34 +01:00
Fabien Potencier d760c27909 minor #29960 Fix heredoc (Stadly)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix heredoc

| 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

A heredoc was erroneously a nowdoc.

Commits
-------

15f5f69b1d Fix heredoc
2019-01-23 13:58:53 +01:00
Robin Chalas 47b739cba2 minor #29955 [Security] use final annotation to allow mocking the class (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] use final annotation to allow mocking the class

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

When the class was initially marked as `final`, it did only contain constants. Since #24337 the `Security` class also contains useful shortcut methods so allowing developers to mock the class in tests looks reasonable to me.

Commits
-------

1da00db247 use final annotation to allow mocking the class
2019-01-23 12:22:36 +01:00
Stadly 15f5f69b1d Fix heredoc 2019-01-23 09:53:40 +01:00
Christian Flothmann 1da00db247 use final annotation to allow mocking the class 2019-01-22 15:51:10 +01:00
Christian Flothmann 419d3db86c synchronise the form builder docblock 2019-01-22 15:49:00 +01:00
Fabien Potencier aca3d2c90d minor #29868 Grammar fix in exception message (michaelKaefer)
This PR was merged into the 3.4 branch.

Discussion
----------

Grammar fix in exception message

According to https://en.wiktionary.org/wiki/whitespace and https://english.stackexchange.com/questions/25368/what-is-the-plural-form-of-whitespace valid sentences would be:
- Whitespace is ...
- Whitespaces are ...
- Whitespace characters are ...

But this is not correct:
- Whitespace are ...

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

Commits
-------

6e279a006b Grammar fix in exception message
2019-01-21 15:45:47 +01:00
Michael Käfer 6e279a006b Grammar fix in exception message
According to https://en.wiktionary.org/wiki/whitespace and https://english.stackexchange.com/questions/25368/what-is-the-plural-form-of-whitespace valid sentences would be:
- Whitespace is ...
- Whitespaces are ...
- Whitespace characters are ...

But this is not correct:
- Whitespace are ...
2019-01-21 14:02:53 +01:00
Fabien Potencier 5e9373bf18 minor #29937 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix tests

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

My changes in #29928 broke the test suite.

Commits
-------

4db0a6e099 fix tests
2019-01-20 14:03:26 +01:00
Christian Flothmann 4db0a6e099 fix tests 2019-01-20 09:34:00 +01:00
Fabien Potencier 333b544d8b minor #29928 [DependencyInjection] forward the parse error to the calling code (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] forward the parse error to the calling code

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

This change does not fully solve the linked issue, but improves the exception a bit by providing a bit more context.

The error page will no start like this:

![bildschirmfoto 2019-01-18 um 12 28 14](https://user-images.githubusercontent.com/1957048/51384558-f7af3600-1b1c-11e9-9744-a40c41c821ce.png)

Commits
-------

c5c2d31fef forward the parse error to the calling code
2019-01-20 09:19:46 +01:00
Christian Flothmann c5c2d31fef forward the parse error to the calling code 2019-01-20 09:08:17 +01:00
Robin Chalas b972d15d52 bug #29863 [Security] Do not mix password_*() API with libsodium one (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Do not mix password_*() API with libsodium one

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

Argon2IPasswordEncoder uses native `password_hash()` and `password_verify()` functions if the current PHP installation embeds Argon2 support (>=7.2, compiled `--with-password-argon2`).
Otherwise, it fallbacks to the libsodium extension.

This was fine at time the encoder was introduced, but meanwhile libsodium changed the algorithm used by `sodium_crypto_pwhash_str()` which is now argon2id, that goes outside of the scope of the encoder which was designed to deal with `argon2i` only.
Nothing we can do as databases may already contain passwords hashed with argon2id, the encoder must keep validating those.

However, the PHP installation may change as time goes by, and could suddenly embed the Argon2 core integration. In this case, the encoder would use the `password_verify()` function which would fail in case the password was not hashed using argon2i.
This PR prevents it by detecting that argon2id was used, avoiding usage of `password_verify()`.

See https://github.com/jedisct1/libsodium-php/issues/194 and https://github.com/symfony/symfony/issues/28093 for references.
Patch cannot be tested as it is platform dependent.

Side note: I'm currently working on a new implementation for 4.3 that will properly supports argon2id (which has been added to the PHP core sodium integration in 7.3) and argon2i, distinctively.

Commits
-------

d6cfde94b4 [Security] Do not mix usage of password_*() functions and sodium_*() ones
2019-01-18 19:41:49 +01:00
Fabien Potencier e231edd5dc minor #29914 ensure compatibility with older PHPUnit mocks (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

ensure compatibility with older PHPUnit mocks

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

Commits
-------

b714419faf ensure compatibility with older PHPUnit mocks
2019-01-17 14:52:57 +01:00
Christian Flothmann b714419faf ensure compatibility with older PHPUnit mocks 2019-01-17 09:49:40 +01:00
Fabien Potencier b6b59769b9 minor #29903 Move from array() to [] (fabpot)
This PR was squashed before being merged into the 3.4 branch (closes #29903).

Discussion
----------

Move from array() to []

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

37ab4cd056 fixed CS
1429267f9c fixed short array CS in comments
25240831e2 fixed CS in ExpressionLanguage fixtures
ec7dcb2784 fixed CS in generated files
afaa13e946 fixed CS on generated container files
7ffd8d3e03 fixed CS on Form PHP templates
0ba1acc82f fixed CS on YAML fixtures
ac9d6cff81 fixed fixtures
33a001e460 switched array() to []
2019-01-16 15:25:07 +01:00
Fabien Potencier 37ab4cd056 fixed CS 2019-01-16 14:43:35 +01:00
Fabien Potencier 1429267f9c fixed short array CS in comments 2019-01-16 14:27:11 +01:00
Fabien Potencier 25240831e2 fixed CS in ExpressionLanguage fixtures 2019-01-16 13:52:19 +01:00
Fabien Potencier ec7dcb2784 fixed CS in generated files 2019-01-16 13:48:01 +01:00
Fabien Potencier afaa13e946 fixed CS on generated container files 2019-01-16 13:30:46 +01:00
Fabien Potencier 7ffd8d3e03 fixed CS on Form PHP templates 2019-01-16 12:03:13 +01:00
Fabien Potencier 0ba1acc82f fixed CS on YAML fixtures 2019-01-16 11:59:17 +01:00
Fabien Potencier ac9d6cff81 fixed fixtures 2019-01-16 11:05:08 +01:00
Fabien Potencier 33a001e460 switched array() to [] 2019-01-16 10:39:14 +01:00
Fabien Potencier c7f46e4795 minor #29892 [TwigBridge] remove unreachable code (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] remove unreachable code

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

Since our version constraint is `^1.37.1|^2.6.2` any Twig version that
is below 2.4.5 must be a Twig 1.x release.

Commits
-------

16f97b9769 remove unreachable code
2019-01-16 09:32:02 +01:00
Fabien Potencier 0f0c30a1c3 bug #29894 [DependencyInjection] the string "0" is a valid service identifier (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] the string "0" is a valid service identifier

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

Commits
-------

caca373383 the string "0" is a valid service identifier
2019-01-15 15:10:59 +01:00
Christian Flothmann caca373383 the string "0" is a valid service identifier 2019-01-15 14:43:24 +01:00
Christian Flothmann 16f97b9769 remove unreachable code
Since our version constraint is `^1.37.1|^2.6.2` any Twig version that
is below 2.4.5 must be a Twig 1.x release.
2019-01-15 14:09:02 +01:00
Fabien Potencier 7789a99968 bug #29885 Update MimeType extensions (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Update MimeType extensions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

5183049b73 updated MimeType extensions
2019-01-14 18:53:36 +01:00
Fabien Potencier 5183049b73 updated MimeType extensions 2019-01-14 18:38:02 +01:00
Fabien Potencier f41f6c39cb minor #29880 [TwigBridge] bump required Twig version (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] bump required Twig version

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

Commits
-------

37e8ccba0f bump required Twig version
2019-01-14 16:28:50 +01:00
Christian Flothmann 37e8ccba0f bump required Twig version 2019-01-14 16:05:06 +01:00
Fabien Potencier facbaa52dc bug #29875 [TwigBridge] fix compatibility with Twig >= 2.6.1 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] fix compatibility with Twig >= 2.6.1

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

Commits
-------

40089fb28f fix compatibility with Twig >= 2.6.1
2019-01-14 11:50:45 +01:00
Christian Flothmann 40089fb28f fix compatibility with Twig >= 2.6.1 2019-01-14 11:10:57 +01:00
Fabien Potencier 51d4ca3756 minor #29864 [Form] SA fix (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #29864).

Discussion
----------

[Form] SA fix

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| 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 -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

1c85707946 [Form] SA fix
2019-01-14 10:46:03 +01:00
Roland Franssen 1c85707946 [Form] SA fix 2019-01-14 10:45:52 +01:00
Fabien Potencier d0bf01ea53 minor #29874 [CssSelector] fix compatibility with PHPUnit 4.8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[CssSelector] fix compatibility with PHPUnit 4.8

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

189da22528 fix compatibility with PHPUnit 4.8
2019-01-14 10:29:25 +01:00
Christian Flothmann 189da22528 fix compatibility with PHPUnit 4.8 2019-01-14 10:12:36 +01:00
Fabien Potencier 057890d41e bug #29873 [Debug] remove return type hint for PHP 5 compatibility (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] remove return type hint for PHP 5 compatibility

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

1f31471ffe remove return type hint for PHP 5 compatibility
2019-01-14 09:59:05 +01:00
Christian Flothmann 1f31471ffe remove return type hint for PHP 5 compatibility 2019-01-14 09:43:48 +01:00
Fabien Potencier 3ea4901516 bug #29837 Fix SwiftMailerHandler to support Monolog's latest reset functionality (Seldaek)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix SwiftMailerHandler to support Monolog's latest reset functionality

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

Monolog 1.24 added the ResettableInterface which is meant to support resetting handlers. Reset should also flush as if the request was ending, and it can be used for long running workers for example in between each job that is processed. Due to SwiftMailer's spool however the emails in case of errors are right now only sent at the very end of the worker's lifetime.

For older Monolog versions, this will be ignored, and is thus harmless.

Commits
-------

ada2d83b67 Fix SwiftMailerHandler to support Monolog's latest reset functionality
2019-01-13 17:54:10 +01:00
Fabien Potencier b06967e64f minor #29798 Component CssSelector tests (vladis84)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29798).

Discussion
----------

Component CssSelector tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

c7410bef29 Component CssSelector tests
2019-01-13 17:50:42 +01:00
Gordienko Vladislav c7410bef29 Component CssSelector tests 2019-01-13 17:50:36 +01:00
Fabien Potencier ea68e28cf0 bug #29853 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused" (mmarynich)
This PR was merged into the 3.4 branch.

Discussion
----------

Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused"

This reverts commit 44e9a91f30, reversing
changes made to 91b28ff081.

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

4.2.2 release changed the way tagged service are injected

As asked by @nicolas-grekas https://github.com/symfony/symfony/issues/29836#issuecomment-453464500

Commits
-------

b3e17d2101 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)"
2019-01-13 17:45:27 +01:00
Fabien Potencier 6573cd35b4 minor #29849 [Validator] Fixed exception wording (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed exception wording

| 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

Commits
-------

8266262c9c Fixed exception wording
2019-01-13 17:39:55 +01:00
Fabien Potencier 37c6ae8923 bug #29833 [DebugClassLoader] expose proxyfied findFile() method (fancyweb)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29833).

Discussion
----------

[DebugClassLoader] expose proxyfied findFile() method

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

As bad as it is, some third party libraries expect that at least one autoload function will be the Composer one and have behaviors that relies on the public `findFile` method.

When the `DebugClassLoader` wraps the Composer `ClassLoader`, the function `findFile` is currently lost. So it becomes impossible to use the `DebugClassLoader` with these libraries.

This is for example the case in Drupal 😢 (cf 83bc30ac40/lib/Drupal/Component/ClassFinder/ClassFinder.php).

Fixing these bad implementations in third party libraries can take forever as things move way slower than in Symfony. This is why I think supporting this case directly in Symfony is better. It's easy and will make the `DebugClassLoader` compatible with more cases.

What could be done to go further in this direction would be to proxify any method implementend by wrapped class loaders.

Commits
-------

4f690a31c6 [DebugClassLoader] Readd findFile() method
2019-01-13 17:36:53 +01:00
Thomas Calvet 4f690a31c6 [DebugClassLoader] Readd findFile() method 2019-01-13 17:36:47 +01:00