Commit Graph

44248 Commits

Author SHA1 Message Date
Craig Duncan
a7864489b0 Mysqli doesn't support the named parameters used by PdoAdapter 2020-01-27 09:15:09 +00:00
Nicolas Grekas
d695b43b98 minor #35471 Fix displaying anonymous classes on PHP >= 7.4.2 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix displaying anonymous classes on PHP >= 7.4.2

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

Commits
-------

dd94b386a9 Fix displaying anonymous classes on PHP >= 7.4.2
2020-01-25 13:38:50 +01:00
Nicolas Grekas
dd94b386a9 Fix displaying anonymous classes on PHP >= 7.4.2 2020-01-25 13:32:28 +01:00
Nicolas Grekas
a1e105ee6c minor #35396 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion (guilliamxavier)
This PR was submitted for the 4.4 branch but it was merged into the 4.3 branch instead.

Discussion
----------

[DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yesish
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/31047#issuecomment-575548372
| License       | MIT
| Doc PR        | -

(Targetting 4.4 because 4.3 is already almost EOM)

Commits
-------

0d47fdfb49 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
2020-01-23 11:55:20 +01:00
Guilliam Xavier
0d47fdfb49 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion 2020-01-23 11:55:13 +01:00
Nicolas Grekas
c2e17645c2 Merge branch '3.4' into 4.3
* 3.4:
  Fix testing with mongodb
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
2020-01-23 11:52:31 +01:00
Nicolas Grekas
d90a503160 minor #35450 Fix testing with mongodb (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix testing with mongodb

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

Commits
-------

28cd964ac9 Fix testing with mongodb
2020-01-23 11:33:58 +01:00
Nicolas Grekas
28cd964ac9 Fix testing with mongodb 2020-01-23 11:22:55 +01:00
Fabien Potencier
a1eb0d3c44 bug #35428 [Cache] fix checking for igbinary availability (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] fix checking for igbinary availability

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

As reported by @andrerom in a2c924d772 (r36427445)

Commits
-------

09818e99ac [Cache] fix checking for igbinary availability
2020-01-22 10:38:05 +01:00
Fabien Potencier
1e9aad0670 minor #35432 [4.3] Minor Travis configuration cosmetic patch (romainneutron)
This PR was merged into the 4.3 branch.

Discussion
----------

[4.3] Minor Travis configuration cosmetic patch

| Q             | A
| ------------- | ---
| Branch?       | 4.3 (Does not appear in previous versions)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no

The Travis configuration is organized in steps: each step begins with a comment followed by the commands to run.
The ` # List all PHP extensions with versions` is empty, its content has been put in the next section, without comment title.

This patch fixes this minor issue

Commits
-------

3918f23307 Minor Travis cosmetic patch
2020-01-22 10:36:15 +01:00
Romain Neutron
3918f23307
Minor Travis cosmetic patch 2020-01-22 10:20:58 +01:00
Nicolas Grekas
09818e99ac [Cache] fix checking for igbinary availability 2020-01-22 08:40:03 +01:00
Fabien Potencier
f2cf444fb0 bumped Symfony version to 4.3.11 2020-01-21 14:21:51 +01:00
Fabien Potencier
cb6fc75d4d
Merge pull request #35412 from fabpot/release-4.3.10
released v4.3.10
2020-01-21 14:14:01 +01:00
Fabien Potencier
83a0727346 updated VERSION for 4.3.10 2020-01-21 14:13:44 +01:00
Fabien Potencier
7a676b04f6 updated CHANGELOG for 4.3.10 2020-01-21 14:13:32 +01:00
Fabien Potencier
6aec780351 bumped Symfony version to 3.4.38 2020-01-21 14:12:52 +01:00
Fabien Potencier
1bd873459b
Merge pull request #35411 from fabpot/release-3.4.37
released v3.4.37
2020-01-21 13:30:09 +01:00
Fabien Potencier
10663730ae updated VERSION for 3.4.37 2020-01-21 13:29:51 +01:00
Fabien Potencier
c7333d0aa6 update CONTRIBUTORS for 3.4.37 2020-01-21 13:29:48 +01:00
Fabien Potencier
a3cc5e50c0 updated CHANGELOG for 3.4.37 2020-01-21 13:29:39 +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
31410c7273 minor #35409 [Messenger] Add missing documentation link in README (pyrech)
This PR was submitted for the 4.4 branch but it was merged into the 4.3 branch instead.

Discussion
----------

[Messenger] Add missing documentation link in README

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (lower was experimental)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

5714eaa0de Add link to messenger documentation in its README
2020-01-21 11:11:20 +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
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
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
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
Robin Chalas
6cc377ff3d bug #35343 [Security] Fix RememberMe with null password (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix RememberMe with null password

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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

Similar to #35335 for branch 3.4

Commits
-------

820eb357c8 Fix RememberMe with null password
2020-01-16 01:14:41 +01:00
Jérémy Derussé
820eb357c8
Fix RememberMe with null password 2020-01-14 22:28:32 +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
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
Nicolas Grekas
6b95ea61a0 minor #35334 [FrameworkBundle] remove messenger cache if not enabled (dmaicher)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] remove messenger cache if not enabled

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes/no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
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.
-->

I noticed on one of my apps that I have a cache pool related to the symfony messenger integration although I'm not using the messenger at all.

```
bin/console debug:container cache.messenger.restart_workers_signal

Information for Service "cache.messenger.restart_workers_signal"
================================================================

 An adapter that collects data about all cache calls.

 ---------------- --------------------------------------------------
  Option           Value
 ---------------- --------------------------------------------------
  Service ID       cache.messenger.restart_workers_signal
  Class            Symfony\Component\Cache\Adapter\TraceableAdapter
  Tags             cache.pool
                   kernel.reset (method: reset)
  Public           no
  Synthetic        no
  Lazy             no
  Shared           yes
  Abstract         no
  Autowired        no
  Autoconfigured   no
 ---------------- -----------------------------------------
```

So this PR removes the definition of the service in case the messenger integration is disabled.

Commits
-------

f81161df8d [FrameworkBundle] remove messenger cache if not enabled
2020-01-14 17:22:33 +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
Nicolas Grekas
ec0333c081 bug #35324 [HttpClient] Fix strict parsing of response status codes (Armando-Walmeric)
This PR was submitted for the master branch but it was squashed and merged into the 4.3 branch instead.

Discussion
----------

[HttpClient] Fix strict parsing of response status codes

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

If you wait a strict Http code response by the server were you request, but the server response isn't strict and only return HTTP/1.1 200 we have a problem without sense to be strict on regular expression.

Commits
-------

4aa953600f [HttpClient] Fix strict parsing of response status codes
2020-01-13 18:23:15 +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
Christian Flothmann
45461c73bf fix PHP const mapping keys using the inline notation 2020-01-13 09:00:59 +01:00
Fabien Potencier
764c91bd9f bug #35304 [HttpKernel] Fix that no-cache MUST revalidate with the origin (mpdude)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix that no-cache MUST revalidate with the origin

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

From [RFC 7234 Section 5.2.2](https://tools.ietf.org/html/rfc7234#section-5.2.2)

> The "no-cache" response directive indicates that the response MUST NOT be used to satisfy a subsequent request without successful validation on the origin server.  This allows an origin server to prevent a cache from using it to satisfy a request without contacting it, even by caches that have been configured to send stale responses.

This is unconditional – the response must be revalidated right away.

(`must-revalidate`, to the contrary, requires revalidation only once the response has become stale.)

Commits
-------

c8bdcb3408 Fix that no-cache requires positive validation with the origin, even for fresh responses
2020-01-11 08:35:43 +01:00
Matthias Pigulla
c8bdcb3408 Fix that no-cache requires positive validation with the origin, even for fresh responses 2020-01-10 22:32:00 +00:00
Robin Chalas
1d25a25109 Merge branch '3.4' into 4.3
* 3.4:
  Avoid stale-if-error if kernel.debug = true, because it hides errors
  [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor
  [DI] deferred exceptions in ResolveParameterPlaceHoldersPass
2020-01-10 22:48:14 +01:00
Fabien Potencier
d079389267 minor #35289 [Workflow] Fix configuration node reference for "initial_marking" (phansys)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Fix configuration node reference for "initial_marking"

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Related to       | #30890
| License       | MIT

Commits
-------

452f92540b [Workflow] Fix configuration node reference for "initial_marking"
2020-01-10 12:35:58 +01:00
Fabien Potencier
a0b976f28a bug #35299 Avoid stale-if-error in FrameworkBundle's HttpCache if kernel.debug = true (mpdude)
This PR was merged into the 3.4 branch.

Discussion
----------

Avoid `stale-if-error` in FrameworkBundle's HttpCache if kernel.debug = true

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

When working with the `HttpCache` in development, error messages may not become visible if a `public` response has been successfully generated for the same URL before.

This is because the `HttpCache` from the `HttpKernel` component by default sets `stale_if_error` to 60 seconds.

At least when using the `HttpCache` subclass from the `FrameworkBundle`, we know about the `kernel.debug` setting and its intention to support local development. In that case, we could set the *default* `stale-if-error` value to 0.

Commits
-------

3a23ec89c3 Avoid stale-if-error if kernel.debug = true, because it hides errors
2020-01-10 12:27:06 +01:00
Matthias Pigulla
3a23ec89c3 Avoid stale-if-error if kernel.debug = true, because it hides errors 2020-01-10 10:52:55 +00:00