Commit Graph

38312 Commits

Author SHA1 Message Date
Nicolas Grekas
9f93a38fff Merge branch '5.0'
* 5.0:
  [SecurityBundle] fix tests
2020-01-21 12:48:14 +01:00
Nicolas Grekas
1038e707cb Merge branch '4.4' into 5.0
* 4.4:
  [SecurityBundle] fix tests
2020-01-21 12:48:06 +01:00
Nicolas Grekas
5521d3d458 [SecurityBundle] fix tests 2020-01-21 12:47:55 +01:00
Nicolas Grekas
a8cc059c76 Merge branch '5.0'
* 5.0:
  [Yaml] Throw on unquoted exclamation mark
  Use supportsClass where possible
2020-01-21 12:13:09 +01:00
Nicolas Grekas
6c1265cdaa Merge branch '4.4' into 5.0
* 4.4:
  [Yaml] Throw on unquoted exclamation mark
  Use supportsClass where possible
2020-01-21 12:12:28 +01:00
Nicolas Grekas
9d33550945 Merge branch '4.3' into 4.4
* 4.3:
  [Yaml] Throw on unquoted exclamation mark
  Use supportsClass where possible
2020-01-21 12:12:16 +01:00
Nicolas Grekas
79d9bdac35 bug #35364 [Yaml] Throw on unquoted exclamation mark (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Yaml] Throw on unquoted exclamation mark

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |
| Tickets       | https://github.com/symfony/symfony/issues/35344
| License       | MIT
| Doc PR        | -

Commits
-------

6b4147c991 [Yaml] Throw on unquoted exclamation mark
2020-01-21 12:09:03 +01:00
Nicolas Grekas
c7a1916661 Merge branch '3.4' into 4.3
* 3.4:
  Use supportsClass where possible
2020-01-21 12:08:18 +01:00
Nicolas Grekas
fb0be81b7a bug #35065 [Security] Use supportsClass in addition to UnsupportedUserException (linaori)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Use supportsClass in addition to UnsupportedUserException

| Q             | A
| ------------- | ---
| Branch?       | 3.4+
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35045
| License       | MIT
| Doc PR        | ~

This PR fixes the issue where user providers rely on just the UnsupportedUserException from `refreshUser()`, causing a flow where users are wrongfully re-authenticated.

There's one issue where `refreshUser()` can do far more sophisticated checks on the user class, which it will never reach if the class is not supported. As far as I know it was never intended to support instances that are rejected by `supportsClass()`, though people could've implemented this (by accident). So the question is more if we should add a BC layer for this; for example:

```php
try {
    $refreshedUser = $provider->refreshUser($user);
    $newToken = clone $token;
    $newToken->setUser($refreshedUser);

    if (!$provider->supportsClass($userClass)) {
        if ($this->shouldCheckSupportsClass) {
            continue;
        }
        // have to think of a proper deprecation here for 6.0
        @trigger_error('Provider %s does not support user class %s via supportsClass() while it does support it via refreshUser .. please set option X and fix %s::supportsUser() ', E_USER_DEPRECATED);
    }
```
This would prevent behavior from breaking but also means we can't fix this on anything less than 5.1.

Commits
-------

d3942cbe17 Use supportsClass where possible
2020-01-21 12:02:57 +01:00
Nicolas Grekas
b5d52a3db7 Merge branch '5.0'
* 5.0:
  Add link to messenger documentation in its README
  [HttpKernel] restore compat with clock mocking
2020-01-21 11:12:13 +01:00
Nicolas Grekas
c8c6c92129 Merge branch '4.4' into 5.0
* 4.4:
  Add link to messenger documentation in its README
  [HttpKernel] restore compat with clock mocking
2020-01-21 11:12:04 +01:00
Nicolas Grekas
c6a5d3d564 Merge branch '4.3' into 4.4
* 4.3:
  Add link to messenger documentation in its README
  [HttpKernel] restore compat with clock mocking
2020-01-21 11:11:47 +01:00
Loïck Piera
5714eaa0de Add link to messenger documentation in its README 2020-01-21 11:11:13 +01:00
Nicolas Grekas
c80a7ad042 [HttpKernel] restore compat with clock mocking 2020-01-21 11:03:13 +01:00
Nicolas Grekas
29791d4dfa Merge branch '5.0'
* 5.0:
  [Filesystem] chown and chgrp should also accept int as owner and group
  [DI] Fix EnvVar not loaded when Loader requires an env var
  Fixed #34713 Move new messages to intl domain when possible
  [FrameworkBundle] Fix small typo in output comment
  chown and chgrp should also accept int as owner and group
  Revert "Fixed translations file dumper behavior"
  Fix RememberMe with null password
  [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages
  Set booted flag to false when test kernel is unset
  [FrameworkBundle] remove messenger cache if not enabled
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
  [HttpClient] Fix strict parsing of response status codes
  fix PHP const mapping keys using the inline notation
  [SecurityBundle] Drop duplicated code
  [FrameworkBundle] Make sure one can use fragments.hinclude_default_template
  Fix that no-cache requires positive validation with the origin, even for fresh responses
  Improve upgrading instructions for deprecated router options
  [DI] Suggest typed argument when binding fails with untyped argument
2020-01-21 09:44:52 +01:00
Nicolas Grekas
3ccb3bf96a Merge branch '4.4' into 5.0
* 4.4:
  [DI] Fix EnvVar not loaded when Loader requires an env var
  Fixed #34713 Move new messages to intl domain when possible
  [FrameworkBundle] Fix small typo in output comment
  chown and chgrp should also accept int as owner and group
  Revert "Fixed translations file dumper behavior"
  Fix RememberMe with null password
  [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages
  Set booted flag to false when test kernel is unset
  [FrameworkBundle] remove messenger cache if not enabled
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
  [HttpClient] Fix strict parsing of response status codes
  fix PHP const mapping keys using the inline notation
  [SecurityBundle] Drop duplicated code
  [FrameworkBundle] Make sure one can use fragments.hinclude_default_template
  Fix that no-cache requires positive validation with the origin, even for fresh responses
  Improve upgrading instructions for deprecated router options
  [DI] Suggest typed argument when binding fails with untyped argument
2020-01-21 09:40:24 +01:00
Nicolas Grekas
039feed98a bug #35351 Revert #34797 "Fixed translations file dumper behavior" and fix #34713 (yceruto)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Revert #34797 "Fixed translations file dumper behavior" and fix #34713

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35264
| License       | MIT
| Doc PR        | -

Revert https://github.com/symfony/symfony/pull/34797

See also https://github.com/symfony/symfony/issues/35328

It's very likely that the new way will be completely different from this one that is being reverted. That's why I'm reverting rather than fixing it.

Commits
-------

9ca872054b Fixed #34713 Move new messages to intl domain when possible
56e79fefa1 Revert "Fixed translations file dumper behavior"
2020-01-21 09:30:33 +01:00
Nicolas Grekas
947947e455 minor #35377 [FrameworkBundle] Fix small typo in output comment (jschaedl)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix small typo in output comment

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- 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):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - 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 master.
-->

Commits
-------

d18f5ed851 [FrameworkBundle] Fix small typo in output comment
2020-01-21 09:27:18 +01:00
Filippo Tessarotto
eba5a0c390 [Filesystem] chown and chgrp should also accept int as owner and group 2020-01-21 09:26:25 +01:00
Fabien Potencier
a43c222cce Merge branch '4.3' into 4.4
* 4.3:
  chown and chgrp should also accept int as owner and group
  Fix RememberMe with null password
  [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
  fix PHP const mapping keys using the inline notation
  Fix that no-cache requires positive validation with the origin, even for fresh responses
2020-01-21 09:20:44 +01:00
Fabien Potencier
f1230757c3 Merge branch '3.4' into 4.3
* 3.4:
  chown and chgrp should also accept int as owner and group
  Fix RememberMe with null password
  [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
  fix PHP const mapping keys using the inline notation
  Fix that no-cache requires positive validation with the origin, even for fresh responses
2020-01-21 09:20:29 +01:00
Fabien Potencier
52f77d2a93 Merge branch '5.0'
* 5.0:
  Fix #35385: Fix Console typehint
  Fix RememberMe with null password
  [String] add missing encoding when calling mb_ord()
2020-01-21 08:39:56 +01:00
Fabien Potencier
9198b9dc97 Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] remove messenger cache if not enabled
  [HttpClient] Fix strict parsing of response status codes
  [DI] Suggest typed argument when binding fails with untyped argument
2020-01-21 08:39:36 +01:00
Nicolas Grekas
ff174dfec3 minor #35178 [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Risky errors when there are no assertions are added before the test end listeners are called (ie, before the code in endTest is executed) so forcing beStrictAboutTestsThatDoNotTestAnything to false when there is a expectedDeprecation annotation is enough.

If the goal is to reset the value to the original value, then I think we should not do it since we basically "lie" to the next listeners. Let's assume that when a test expect a deprecation, it can have 0 assertions. Also this flag is not used anymore by PHPUnit after we reset it.

Ref https://github.com/symfony/symfony/pull/21786 btw

Commits
-------

fb48bbc05b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code
2020-01-20 13:28:41 +01:00
Nicolas Grekas
940bba0860 bug #35335 [Security] Fix RememberMe with null password (jderusse)
This PR was merged into the 5.0 branch.

Discussion
----------

[Security] Fix RememberMe with null password

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | yes
| Tickets       | NA
| License       | MIT
| Doc PR        | NA

From `UserInterface` the method getPassword may return null, while generateCookieHash requires a string.
This PR changes the signature of the methods to allows null password

Commits
-------

a7d0d82768 Fix RememberMe with null password
2020-01-20 13:23:27 +01:00
Nicolas Grekas
0dcf2fcdf5 bug #35339 [String] add missing encoding when calling mb_ord() (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

[String] add missing encoding when calling mb_ord()

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

759e20e6d3 [String] add missing encoding when calling mb_ord()
2020-01-20 13:22:08 +01:00
Nicolas Grekas
e21b1538f3 bug #35355 [DI] Fix EnvVar not loaded when Loader requires an env var (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Fix EnvVar not loaded when Loader requires an env var

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #35348
| License       | MIT
| Doc PR        | NA

When an EnvVarLoader has a dependency on an Env Var tried to be loaded (which is the case for SodiumVault that is configured with `default::SYMFONY_DECRYPTION_SECRET`) the Loader is not usable.

What happens:
- when trying to resolve `SYMFONY_DECRYPTION_SECRET`, the EnvVarProcessor iterates over loaders
- given SodiumVaultLoaders requires the same env variable `SYMFONY_DECRYPTION_SECRET`, it throws a `ParameterCircularReferenceException`
- letting the $loaders generator invalid

This PR, refactor the way loaders are iterated in order to rewind on failure.

Commits
-------

e119aa6c48 [DI] Fix EnvVar not loaded when Loader requires an env var
2020-01-20 13:17:50 +01:00
Jérémy Derussé
e119aa6c48 [DI] Fix EnvVar not loaded when Loader requires an env var 2020-01-20 11:32:09 +01:00
Yonel Ceruto
9ca872054b Fixed #34713 Move new messages to intl domain when possible 2020-01-19 19:23:22 -05:00
Dmitry Danilson
75dbaf0cc5 Fix #35385: Fix Console typehint 2020-01-19 18:13:19 +07:00
Jan Schädlich
d18f5ed851 [FrameworkBundle] Fix small typo in output comment 2020-01-18 08:29:24 +01:00
Thomas Calvet
6b4147c991 [Yaml] Throw on unquoted exclamation mark 2020-01-17 12:30:02 +01:00
Nicolas Grekas
f889c1167f minor #35369 [Filesystem] chown and chgrp should also accept int as owner and group (3.4) (Slamdunk)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] chown and chgrp should also accept int as owner and group (3.4)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Reference: https://github.com/symfony/symfony/pull/35356#issuecomment-575526299

Commits
-------

6b811e6b4c chown and chgrp should also accept int as owner and group
2020-01-17 12:07:25 +01:00
Filippo Tessarotto
6b811e6b4c chown and chgrp should also accept int as owner and group 2020-01-17 09:50:08 +01:00
Fabien Potencier
b493997b71 minor #35340 [Validator] Fix plurals for sr_Latn validation messages (knezmilos13)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fix plurals for sr_Latn validation messages

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35276
| License       | MIT

validators.sr_Latn.xlf (Serbian, written with latin script) has wrong plurals for all validation message translations that require them (only two where there should be three). This commit fixes that by adding the missing third plural-translation.

Commits
-------

207cdafd54 [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages
2020-01-16 10:23:40 +01:00
Jérémy Jarrié
0421e01ae1 [Messenger] Messenger redis local sock dsn 2020-01-16 10:19:52 +01:00
Yonel Ceruto
56e79fefa1 Revert "Fixed translations file dumper behavior" 2020-01-15 08:29:06 -05:00
Jérémy Derussé
820eb357c8
Fix RememberMe with null password 2020-01-14 22:28:32 +01:00
Jérémy Derussé
a7d0d82768
Fix RememberMe with null password 2020-01-14 22:27:30 +01:00
knezmilos13
207cdafd54 [Validator] Fix plurals for sr_Latn (Serbian language written in latin script) validation messages 2020-01-14 19:27:07 +01:00
Nicolas Grekas
759e20e6d3 [String] add missing encoding when calling mb_ord() 2020-01-14 18:54:59 +01:00
Nicolas Grekas
477e843790 bug #34223 [DI] Suggest typed argument when binding fails with untyped argument (gudfar)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Suggest typed argument when binding fails with untyped argument

| Q             | A
| ------------- | ---
| Branch?       |  4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |  #33470
| License       | MIT

I've added a condition that looks for arguments and if the typehint doesn’t match, throws an `InvalidArgumentException`

Commits
-------

0e92399daa [DI] Suggest typed argument when binding fails with untyped argument
2020-01-14 17:43:06 +01:00
Thiago Cordeiro
6f4684f618 Set booted flag to false when test kernel is unset 2020-01-14 17:26:06 +01:00
David Maicher
f81161df8d [FrameworkBundle] remove messenger cache if not enabled 2020-01-14 15:28:35 +01:00
Thomas Calvet
fb48bbc05b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove some unneeded code 2020-01-14 15:27:59 +01:00
Grégoire Pineau
b350c80fc3 feature #35322 [Workflow] Added a way to not fire the announce event (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Workflow] Added a way to not fire the announce event

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #35286
| License       | MIT
| Doc PR        |

Commits
-------

d31939d01d [Workflow] Added a way to not fire the annonce event
2020-01-14 11:48:13 +01:00
Armando
4aa953600f [HttpClient] Fix strict parsing of response status codes 2020-01-13 18:23:05 +01:00
Fabien Potencier
db3134eba4 bug #35318 [Yaml] fix PHP const mapping keys using the inline notation (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix PHP const mapping keys using the inline notation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35179
| License       | MIT
| Doc PR        |

Commits
-------

45461c73bf fix PHP const mapping keys using the inline notation
2020-01-13 14:54:16 +01:00
Grégoire Pineau
d31939d01d [Workflow] Added a way to not fire the annonce event 2020-01-13 14:50:42 +01:00
Grégoire Pineau
b4776d6558 [Workflow] Make many internal services as hidden 2020-01-13 14:48:05 +01:00