Commit Graph

59062 Commits

Author SHA1 Message Date
Rokas Mikalkėnas 78d51dec13 [PropertyInfo] PhpStan extractor nested object fix 2021-12-22 11:30:30 +02:00
Fabien Potencier d3eeb83b13 bug #44752 [Security/Http] Fix cookie clearing on logout (maxhelias)
This PR was merged into the 5.3 branch.

Discussion
----------

[Security/Http] Fix cookie clearing on logout

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

I think this was forgotten or a merge issue when the component was refactored :
- Original PR : https://github.com/symfony/symfony/pull/36252
- PR that added this file : https://github.com/symfony/symfony/pull/36243#discussion_r399646893

Commits
-------

d1aa32a2a1 [Security/Http] Fix cookie clearing on logout
2021-12-22 07:46:12 +01:00
Alexander M. Turek de9b7e5314 Merge branch '5.4' into 6.0
* 5.4:
  [Mime] Relaxing in-reply-to header validation
  [WebProfilerBundle] fix Email HTML preview
  fix test to actually use data provider
2021-12-22 01:01:56 +01:00
Alexander M. Turek d17ae344e7 Merge branch '5.3' into 5.4
* 5.3:
  [Mime] Relaxing in-reply-to header validation
  fix test to actually use data provider
2021-12-22 01:01:28 +01:00
Alexander M. Turek 4d4d7065e0 Merge branch '4.4' into 5.3
* 4.4:
  [Mime] Relaxing in-reply-to header validation
2021-12-22 01:01:04 +01:00
Fabien Potencier 33399e6a32 bug #44745 [EventDispatcher][HttpFoundation] Restore return type to covariant IteratorAggregate implementations (derrabus)
This PR was merged into the 6.0 branch.

Discussion
----------

[EventDispatcher][HttpFoundation] Restore return type to covariant IteratorAggregate implementations

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follows #44731
| License       | MIT
| Doc PR        | N/A

Commits
-------

0f2b5bba8b Restore return type to covariant IteratorAggregate implementations
2021-12-21 22:29:25 +01:00
Fabien Potencier 3526a32473 bug #44732 [Mime] Relaxing in-reply-to header validation (ThomasLandauer)
This PR was submitted for the 6.1 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Mime] Relaxing in-reply-to header validation

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | no
| New feature?  | ?
| Deprecations? | no
| Tickets       | Fix #37361
| License       | MIT
| Doc PR        | not necessary

@nicolas-grekas
1. Is it OK to just use `UnstructuredHeader`?
2. Some tests at `IdentificationHeaderTest` are irrelevant now (but still pass) - should I remove them? And create some new test cases in `UnstructuredHeaderTest`? Or rely on every aspect being tested with other headers there, and don't add anything?

Commits
-------

04ddc126f3 [Mime] Relaxing in-reply-to header validation
2021-12-21 22:27:20 +01:00
ThomasLandauer 04ddc126f3 [Mime] Relaxing in-reply-to header validation 2021-12-21 22:27:02 +01:00
Fabien Potencier a42dbe3899 bug #44714 [WebProfilerBundle] fix Email HTML preview (94noni)
This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[WebProfilerBundle] fix Email HTML preview

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/issues/44696 Fix https://github.com/symfony/symfony/issues/44703
| License       | MIT

## First issue:

When swapping the order of `base64` & `charset=utf-8` it works well
Friendly ping @lyrixx as PR author

## Second issue:

Friendly ping @Art4 as issue author

As the `Mime\Email` is:

```php
    /**
     * @return resource|string|null
     */
    public function getHtmlBody()
    {
        return $this->html;
    }
```

Commits
-------

fe1aee8851 [WebProfilerBundle] fix Email HTML preview
2021-12-21 22:22:13 +01:00
Antoine Makdessi fe1aee8851 [WebProfilerBundle] fix Email HTML preview 2021-12-21 22:22:06 +01:00
Kevin Bond ea3ea82274
minor #44758 [FrameworkBundle] Fix test to actually use data provider (kbond)
This PR was merged into the 5.3 branch.

Discussion
----------

[FrameworkBundle] Fix test to actually use data provider

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

#44682 didn't actually use the data provider.

Commits
-------

6cafac4e19 fix test to actually use data provider
2021-12-21 16:06:45 -05:00
Kevin Bond 6cafac4e19
fix test to actually use data provider 2021-12-21 14:56:28 -05:00
Maxime Hélias d1aa32a2a1 [Security/Http] Fix cookie clearing on logout 2021-12-21 17:44:44 +01:00
Alexander M. Turek 57d644d793 Merge branch '5.4' into 6.0
* 5.4:
  Don't rely on session service in tests
  [Mime] Fix encoding filenames in multipart/form-data
  Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY
  [Lock] Create tables in transaction only if supported by driver
  [Validator] Improve French translation
  [HttpFoundation] Take php session.cookie settings into account
  [Translations] Add missing translations for Galician (gl)
  [ErrorHandler] fix on patching return types on Windows
  [DependencyInjection] fix linting callable classes
  alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware`
  restore the overriden locale on tearDown - avoid interfering with any configured value
  [Serializer] Improve UidNormalizer denormalize error message
  [DependencyInjection] Cast tag value to string
2021-12-21 14:16:58 +01:00
Alexander M. Turek bfbc5a6645 minor #44749 [HttpKernel] Don't rely on session service in tests (derrabus)
This PR was merged into the 5.4 branch.

Discussion
----------

[HttpKernel] Don't rely on session service in tests

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Follow-up to #44518
| License       | MIT
| Doc PR        | N/A

The test introduced by #44518 makes use of the deprecated session service mechanism. Instead, I've attached the session to the request. This allows us to merge the test up to 6.0 and beyond without breaking it.

Commits
-------

e963594e71 Don't rely on session service in tests
2021-12-21 14:14:24 +01:00
Alexander M. Turek e963594e71 Don't rely on session service in tests 2021-12-21 14:05:49 +01:00
Alexander M. Turek dff5206145 Merge branch '5.3' into 5.4
* 5.3:
  [Mime] Fix encoding filenames in multipart/form-data
  [Validator] Improve French translation
  [Translations] Add missing translations for Galician (gl)
  [DependencyInjection] fix linting callable classes
  alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware`
  restore the overriden locale on tearDown - avoid interfering with any configured value
  [DependencyInjection] Cast tag value to string
2021-12-21 12:59:32 +01:00
Alexander M. Turek 16f8703824 Merge branch '4.4' into 5.3
* 4.4:
  [Mime] Fix encoding filenames in multipart/form-data
  [Validator] Improve French translation
  [Translations] Add missing translations for Galician (gl)
  [DependencyInjection] fix linting callable classes
  restore the overriden locale on tearDown - avoid interfering with any configured value
  [DependencyInjection] Cast tag value to string
2021-12-21 12:59:13 +01:00
Alexander M. Turek 0f2b5bba8b Restore return type to covariant IteratorAggregate implementations 2021-12-21 11:43:13 +01:00
Alexander M. Turek 4d164dabc0 minor #44731 [Finder] Restore Finder:getIterator return type PHPDoc (kubawerlos)
This PR was merged into the 6.0 branch.

Discussion
----------

[Finder] Restore Finder:getIterator return type PHPDoc

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

As discussed in the related ticket we want this annotation back. Targeting `6.0` as it is present in `5.4`, was remove during merging `5.4` up to `6.0`.

Commits
-------

a0fa9b1f27 Restore Finder:getIterator return type PHPDoc
2021-12-21 11:34:48 +01:00
Alexander M. Turek c3f10ff99c bug #44737 Fix Psr16Cache not being compatible with non-Symfony cache pools (colinodell)
This PR was merged into the 6.0 branch.

Discussion
----------

Fix Psr16Cache not being compatible with non-Symfony cache pools

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #44736
| License       | MIT
| Doc PR        | n/a

Resolves #44736 by making the Closure nullable so that checks for `null` don't fail when the property is not initialized.

Commits
-------

70be07efec Fix Psr16Cache not being compatible with non-Symfony cache pools
2021-12-21 11:33:31 +01:00
Nicolas Grekas 0d477e96f7 [HttpClient] fix checking for recent curl consts 2021-12-21 10:51:04 +01:00
Colin O'Dell 70be07efec Fix Psr16Cache not being compatible with non-Symfony cache pools 2021-12-20 16:33:40 -05:00
Kuba Werłos a0fa9b1f27 Restore Finder:getIterator return type PHPDoc 2021-12-20 17:21:45 +01:00
Jérôme Tamarelle f5746f1afa [Console] Fix autocompletion of argument with default value 2021-12-20 17:11:12 +01:00
Fabien Potencier 0558be72b8 bug #44728 [Mime] Fix encoding filenames in multipart/form-data (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Fix encoding filenames in multipart/form-data

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

File uploads that use forms have stick to browsers' behavior. This is captured in the WHATWG in their living standard:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data

curl did the same a few weeks ago:
https://github.com/curl/curl/pull/7805

Commits
-------

a58c342fff [Mime] Fix encoding filenames in multipart/form-data
2021-12-20 15:47:34 +01:00
Fabien Potencier 70d96aa0b2 minor #44727 Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY (biozshock)
This PR was merged into the 5.4 branch.

Discussion
----------

Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Right now i assumed that i just need to replace `IS_AUTHENTICATED_ANONYMOUSLY` with `IS_AUTHENTICATED`, which is in fact `PUBLIC_ACCESS` not mentioned at all.

Commits
-------

98947dc5a0 Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY
2021-12-20 15:42:37 +01:00
Nicolas Grekas a58c342fff [Mime] Fix encoding filenames in multipart/form-data 2021-12-20 15:32:01 +01:00
Artem Lopata 98947dc5a0
Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY
Right now i assumed that i just need to replace `IS_AUTHENTICATED_ANONYMOUSLY` with `IS_AUTHENTICATED, which is in fact `PUBLIC_ACCESS` not mentioned at all.
2021-12-20 15:12:35 +01:00
Fabien Potencier bf8a598b35 bug #44602 [Serializer] Improve UidNormalizer denormalize error message (fancyweb)
This PR was merged into the 5.4 branch.

Discussion
----------

[Serializer] Improve UidNormalizer denormalize error message

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

The two catch blocks can be merged. Also we should use ULID when the type is an ULID, and UID when we don't know.

Commits
-------

b97bc531ec [Serializer] Improve UidNormalizer denormalize error message
2021-12-20 11:08:44 +01:00
Fabien Potencier 83dbb47595 bug #44383 [Lock] Create tables in transaction only if supported by driver (martinssipenko)
This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[Lock] Create tables in transaction only if supported by driver

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

Fixed `DoctrineDbalStore` to allow the creation of a lock table within a transaction only if it is supported by the driver.

Commits
-------

9395de94c8 [Lock] Create tables in transaction only if supported by driver
2021-12-20 11:07:06 +01:00
Martins Sipenko 9395de94c8 [Lock] Create tables in transaction only if supported by driver 2021-12-20 11:06:30 +01:00
Fabien Potencier ac4670135c minor #44722 [Validator] Improve French translation (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Improve French translation

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

See https://github.com/symfony/symfony/pull/44720#discussion_r772185884

Commits
-------

292fcfe8f2 [Validator] Improve French translation
2021-12-20 10:52:22 +01:00
Thomas Calvet 292fcfe8f2 [Validator] Improve French translation 2021-12-20 10:31:34 +01:00
Fabien Potencier ccd8014692 bug #44518 [HttpFoundation] Take php session.cookie settings into account (simonchrz)
This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[HttpFoundation] Take php session.cookie settings into account

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| Tickets       | Fix [#44500](https://github.com/symfony/symfony/issues/44500)
| License       | MIT

Fixes issue on SessionListener, not taken session.cookie_* settings into account anymore.

Commits
-------

23bd7a7766 [HttpFoundation] Take php session.cookie settings into account
2021-12-20 10:29:09 +01:00
Simon Chrzanowski 23bd7a7766 [HttpFoundation] Take php session.cookie settings into account 2021-12-20 10:29:05 +01:00
Fabien Potencier 5ed9e82604 minor #44720 [Translations] Add missing translations for Galician (gl) (juanwilde)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Translations] Add missing translations for Galician (gl)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #43718
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - 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 5.x.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

3f5a8bd414 [Translations] Add missing translations for Galician (gl)
2021-12-20 10:22:34 +01:00
Juan González Montes 3f5a8bd414 [Translations] Add missing translations for Galician (gl) 2021-12-20 10:22:31 +01:00
Thomas Calvet 0d6caa5cf6 bug #44719 [ErrorHandler] fix on patching return types on Windows (nicolas-grekas)
This PR was merged into the 5.4 branch.

Discussion
----------

[ErrorHandler] fix on patching return types on Windows

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

And syncing tentative return types from php-src

Commits
-------

58e156912e [ErrorHandler] fix on patching return types on Windows
2021-12-20 09:09:21 +01:00
Robin Chalas 4ebeb8992a
bug #44710 [DependencyInjection] fix linting callable classes (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] fix linting callable classes

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

Commits
-------

87097b8b1c [DependencyInjection] fix linting callable classes
2021-12-19 23:41:31 +01:00
Nicolas Grekas 58e156912e [ErrorHandler] fix on patching return types on Windows 2021-12-19 21:02:00 +01:00
Julien Falque 07fbfbfd98
Run `open_basedir` tests in separate processes 2021-12-19 17:27:15 +01:00
Nicolas Grekas 87097b8b1c [DependencyInjection] fix linting callable classes 2021-12-19 15:56:55 +01:00
Fabien Potencier f2cac74432 bug #44639 [DependencyInjection] Cast tag attribute value to string (ruudk)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Cast tag attribute value to string

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

```
DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated
```
This happens when a tag value is `null` on PHP 8.1.

Commits
-------

8fe5fce3cf [DependencyInjection] Cast tag value to string
2021-12-17 08:23:16 -08:00
Thomas Calvet f91c40a196 bug #44473 [Validator] Restore default locale in ConstraintValidatorTestCase (rodnaph)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Restore default locale in ConstraintValidatorTestCase

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

Previously this code was not resetting the locale after changing it to `en` - which affected other tests which relied on this value being the configured value (however it was configured).

This mirrors the pattern used for the timezone, storing it to be reset on tearDown.

I've based this on 6.1. If it's valid, I'm unsure if it's classed a bug, or needs UPGRADE notes?

Commits
-------

77267c0598 restore the overriden locale on tearDown - avoid interfering with any configured value
2021-12-17 13:18:12 +01:00
Nicolas Grekas a7e4494682 bug #44682 [FrameworkBundle] alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware` (kbond)
This PR was merged into the 5.3 branch.

Discussion
----------

[FrameworkBundle] alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware`

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

When using `cache.adapter.redis_tag_aware` for your `cache.app`, `cache.app.taggable` is unnecessarily decorated with `TagAwareAdapter`. This sets `cache.app.taggable` as an alias to `cache.app` in this case.

Alternative to #44673.

Commits
-------

4b54aa0d93 alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware`
2021-12-17 11:05:31 +01:00
Kevin Bond 4b54aa0d93
alias `cache.app.taggable` to `cache.app` if using `cache.adapter.redis_tag_aware` 2021-12-16 19:14:58 -05:00
Nicolas Grekas d5534b0c13 [6.0] cs fixes 2021-12-16 23:13:01 +01:00
Nicolas Grekas eb749ec88b Merge branch '5.4' into 6.0
* 5.4:
  [5.4] cs fixes
  [5.3] cs fixes
  [Cache] Fix saving items with no expiration through ProxyAdapter
  CS fixes
  [HttpClient] Fix tracing requests made after calling withOptions()
  [Cache] disable lock on CLI
  Revert "feature #41989 [Cache] make `LockRegistry` use semaphores when possible (nicolas-grekas)"
  [HttpKernel] fix how configuring log-level and status-code by exception works
  [VarDumper] add more "transient-on-macos" groups
2021-12-16 23:05:41 +01:00
Nicolas Grekas 646c33fd8e bug #44649 [HttpKernel] fix how configuring log-level and status-code by exception works (nicolas-grekas)
This PR was merged into the 5.4 branch.

Discussion
----------

[HttpKernel] fix how configuring log-level and status-code by exception works

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

This PR replaces #44456, and essentially fixes the way configuring log-level/status-code by exception works: instead of hacking them in the listener, the original exception should be wrapped in an `HttpExceptionInterface`, so that the rest of the code can seamlessly know about the configuration.

Commits
-------

6617be449e [HttpKernel] fix how configuring log-level and status-code by exception works
2021-12-16 23:01:02 +01:00