Skip to content
Permalink
6.2
Switch branches/tags

Commits on Jun 10, 2022

  1. minor #46637 [Security] Fix tests (chalasr)

    This PR was merged into the 6.2 branch.
    
    Discussion
    ----------
    
    [Security] Fix tests
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.2
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Same as #46624 for FormLoginAuthenticator et al.
    
    Commits
    -------
    
    c884399 [Security] Fix tests
    nicolas-grekas committed Jun 10, 2022
  2. [Security] Fix tests

    chalasr authored and nicolas-grekas committed Jun 10, 2022
  3. bug #46628 [DependencyInjection] fix dumped container (nicolas-grekas)

    This PR was merged into the 6.2 branch.
    
    Discussion
    ----------
    
    [DependencyInjection] fix dumped container
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.2
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | Fix #46627
    | License       | MIT
    | Doc PR        | -
    
    Introduced in #46459
    
    Commits
    -------
    
    8e1db2a [DependencyInjection] fix dumped container
    nicolas-grekas committed Jun 10, 2022

Commits on Jun 9, 2022

  1. Merge branch '6.1' into 6.2

    * 6.1:
      Fix tests related to Doctrine method renaming
    chalasr committed Jun 9, 2022
  2. Merge branch '6.0' into 6.1

    * 6.0:
      Fix tests related to Doctrine method renaming
    chalasr committed Jun 9, 2022
  3. Merge branch '5.4' into 6.0

    * 5.4:
      Fix tests related to Doctrine method renaming
    chalasr committed Jun 9, 2022
  4. minor #46629 Fix tests related to Doctrine method renaming (jderusse)

    This PR was merged into the 5.4 branch.
    
    Discussion
    ----------
    
    Fix tests related to Doctrine method renaming
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 5.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | /
    | License       | MIT
    | Doc PR        | /
    
    Method used to create table has been renamed in doctrine/dbal#5416
    
    Commits
    -------
    
    05be7b2 Fix tests related to Doctrine method renaming
    chalasr committed Jun 9, 2022
  5. minor #46624 [Security] Workaround segfault (chalasr)

    This PR was merged into the 6.2 branch.
    
    Discussion
    ----------
    
    [Security] Workaround segfault
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.2
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    For some reason, this patch avoids the segfault we have on the 6.2 security-http test suite (PHP 8.1).
    I didn't debug it further. Should be reported to php anyway I suppose.
    
    Commits
    -------
    
    498000e [Security] Workaround segfault
    nicolas-grekas committed Jun 9, 2022
  6. Merge branch '6.1' into 6.2

    * 6.1:
      [HttpClient] Copy as curl fixes
      [Messenger] Remove redundant interface in DoctrineReceiver
      [FrameworkBundle] Disable Serializer data collect by default
      [HttpClient][WebProfilerBundle] Catch errors when encoding body for curl command line
      [Routing] Fix $requirements PHPDoc for SCA
      Fix choice filter error when loading mix of grouped and non-grouped choices
      [Mime] Allow url as a path in the DataPart::fromPath
      Fix getting class constraints on debug command
    nicolas-grekas committed Jun 9, 2022
  7. bug #46570 [HttpClient][WebProfilerBundle] Catch errors when encoding…

    … body for c… (Phillip Look)
    
    This PR was merged into the 6.1 branch.
    
    Discussion
    ----------
    
    [HttpClient][WebProfilerBundle] Catch errors when encoding body for c…
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.1
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       |
    | License       | MIT
    | Doc PR        |
    
    In Symfony 6.1 a [button to copy a request as a cURL command](#43931) was introduced for the profiler.
    
    But if I post a binary file containing null characters using the curl-http-client the `HttpClientDataCollector` throws an error.
    ```
    Warning: Uncaught ValueError: escapeshellarg(): Argument #1 ($arg) must not contain any null bytes
    ```
    
    My solution is to catch the `ValueError` in this situation and to return `null` as the resulting curl command. Returning `null` seems to be the standard handling for unexpectad values in this data collector.
    
    Commits
    -------
    
    36e6fa0 [HttpClient][WebProfilerBundle] Catch errors when encoding body for curl command line
    nicolas-grekas committed Jun 9, 2022
  8. bug #46583 [HttpClient] Copy as curl fixes (HypeMC)

    This PR was squashed before being merged into the 6.1 branch.
    
    Discussion
    ----------
    
    [HttpClient] Copy as curl fixes
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.1
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    The "Copy as curl" button doesn't work as expected in some cases:
    
    1) it ignores the `query` option:
        ```php
        $httpClient->request('GET', 'https://symfony.com?foo=fooval&bar=barval', [
            'query' => [
                'bar' => 'newbarval',
                'foobar' => [
                    'baz' => 'bazval',
                    'qux' => 'quxval',
                ],
            ],
        ]);
        ```
        ```
        curl \
          --compressed \
          --request GET \
          --url 'https://symfony.com?foo=fooval&bar=barval' \
          --header 'accept: */*' \
          --header 'user-agent: Symfony HttpClient/Curl' \
          --header 'accept-encoding: gzip'
        ```
    2) it fails if the body is a multidimensional array or object:
        ```php
        $httpClient->request('POST', 'https://symfony.com', [
            'body' => [
                'bar' => 'newbarval',
                'foobar' => [
                    'baz' => 'bazval',
                    'qux' => 'quxval',
                ],
                'bazqux' => ['bazquxval1', 'bazquxval2'],
            ],
        ]);
        ```
        ```
        Warning: Array to string conversion
        ```
    
    Commits
    -------
    
    0bc7caf [HttpClient] Copy as curl fixes
    nicolas-grekas committed Jun 9, 2022
  9. [HttpClient] Copy as curl fixes

    HypeMC authored and nicolas-grekas committed Jun 9, 2022
  10. bug #46625 [FrameworkBundle] Disable Serializer data collect by defau…

    …lt (chalasr)
    
    This PR was merged into the 6.1 branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Disable Serializer data collect by default
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.1
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | Fix #46471
    | License       | MIT
    | Doc PR        | TODO
    
    The serializer data collector introduced in 6.1. causes a BC break for some (see fixed ticket).
    This PR adds a `framework.profiler.collect_serializer_data` option defaulting to `false`, allowing people to fix their code before activating it.
    
    Next steps:
    - deprecate the `ObjectNormalizer` autowiring alias on 6.2 and fix the docs accordingly
    - deprecate the option
    
    Build failures unrelated.
    
    Commits
    -------
    
    d0cf759 [FrameworkBundle] Disable Serializer data collect by default
    nicolas-grekas committed Jun 9, 2022
  11. Merge branch '6.0' into 6.1

    * 6.0:
      [Messenger] Remove redundant interface in DoctrineReceiver
      Fix choice filter error when loading mix of grouped and non-grouped choices
      [Mime] Allow url as a path in the DataPart::fromPath
      Fix getting class constraints on debug command
    nicolas-grekas committed Jun 9, 2022
  12. Merge branch '5.4' into 6.0

    * 5.4:
      [Messenger] Remove redundant interface in DoctrineReceiver
      Fix choice filter error when loading mix of grouped and non-grouped choices
      [Mime] Allow url as a path in the DataPart::fromPath
      Fix getting class constraints on debug command
    nicolas-grekas committed Jun 9, 2022
  13. bug #46545 Fix getting class constraints on debug command (loic425)

    This PR was merged into the 5.4 branch.
    
    Discussion
    ----------
    
    Fix getting class constraints on debug command
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 5.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | Partially #46544
    | License       | MIT
    | Doc PR        |
    <!--
    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 the latest branch.
     - 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).
    -->
    
    Currently, Symfony `debug:validator` command does not show constraints that are configured on the class. It only shows constraints of class properties.
    
    So with this fix, we add class constraints on the output tables. `-` symbol is used on the `Property`column to show that the constraint is not linked to a property.
    
    Before
    <img width="1253" alt="before" src="https://user-images.githubusercontent.com/8329789/172346784-04b23d69-3443-4cef-9619-c9417a6fccc1.png">
    
    After
    <img width="1518" alt="after" src="https://user-images.githubusercontent.com/8329789/172346181-4febe7ff-1e49-4fa2-bf98-aa08d495f52d.png">
    
    Commits
    -------
    
    6330076 Fix getting class constraints on debug command
    nicolas-grekas committed Jun 9, 2022
  14. Merge branch '4.4' into 5.4

    * 4.4:
      [Messenger] Remove redundant interface in DoctrineReceiver
      [Mime] Allow url as a path in the DataPart::fromPath
    nicolas-grekas committed Jun 9, 2022
  15. bug #46548 [Mime] Allow url as a path in the DataPart::fromPath (wkania)

    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [Mime] Allow url as a path in the DataPart::fromPath
    
    | Q             | A
    | ------------- | ---
    | Branch?       |  4.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | N/A
    | License       | MIT
    | Doc PR        | N/A
    
    While switching from the Swift Mailer to the Symfony Mailer I encounter a bug `Symfony\Component\Mime\Exception\InvalidArgumentException`.
    Steps to reproduce:
    1. I have created an email with an attachment that is a remote file and saw `An exception has been thrown during the rendering of a template`.
    2. Also when I have visited tab E-mails in the Symfony Profiler, saw the same Symfony Exception page
    
    DataPart can't be created from url,  even if `fopen` can open url.
    Apparently, before Symfony [4.4.11](#36304) this worked with URLs. At least in the context of email with attachments.
    PHP doesn't support rewind on non-local streams, so calling multiple times method `getBody` from `TextPart` would return an empty string. So in another context, it worked partially.
    
    Additional notes:
    1. Network example based on [this](https://github.com/symfony/symfony/blob/60ce5a3dfbd90fad60cd39fcb3d7bf7888a48659/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php#L165)
    2. Base64Encoder chunk split base64 encoded string so I only check the first line
    
    Commits
    -------
    
    12bf8cb [Mime] Allow url as a path in the DataPart::fromPath
    nicolas-grekas committed Jun 9, 2022
  16. minor #46626 [Messenger] Remove redundant interface in DoctrineReceiv…

    …er (HeahDude)
    
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [Messenger] Remove redundant interface in DoctrineReceiver
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | ~
    | License       | MIT
    | Doc PR        | ~
    
    `ListableReceiverInterface extends ReceiverInterface`
    
    Commits
    -------
    
    2dc8e6d [Messenger] Remove redundant interface in DoctrineReceiver
    nicolas-grekas committed Jun 9, 2022
  17. bug #46576 Fix choice filter error when loading mix of grouped and no…

    …n-grouped choices (BreyndotEchse)
    
    This PR was merged into the 5.4 branch.
    
    Discussion
    ----------
    
    Fix choice filter error when loading mix of grouped and non-grouped choices
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 5.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | License       | MIT
    
    **How to reproduce this bug:**
    ```php
    $choiceType = $builder->create('test', ChoiceType::class, [
        'choice_loader' => new CallbackChoiceLoader(fn() => [
            'Foo',
            'Optgroup' => [
                'Bar',
                'Baz',
            ],
        ]),
        'choice_filter' => fn() => true,
    ]);
    $choiceType->getForm()->createView();
    ```
    **TypeError:**
    ```
    Argument 1 passed to Symfony\Component\Form\ChoiceList\ArrayChoiceList::getChoicesForValues() must be of the type array, string given, called in ~/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php on line 39
    ```
    
    Commits
    -------
    
    24c65bf Fix choice filter error when loading mix of grouped and non-grouped choices
    fabpot committed Jun 9, 2022
  18. minor #46618 [Security] Centralize max username length enforcement (c…

    …halasr)
    
    This PR was merged into the 6.2 branch.
    
    Discussion
    ----------
    
    [Security] Centralize max username length enforcement
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.2
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Cleans up the max username length enforcement across the board. Authenticators do not need to check it on their own since #46584.
    
    Commits
    -------
    
    9fd1e82 [Security] Centralize max username length enforcement
    fabpot committed Jun 9, 2022
  19. minor #46622 [Routing] Fix $requirements PHPDoc for SCA (fancyweb)

    This PR was merged into the 6.1 branch.
    
    Discussion
    ----------
    
    [Routing] Fix $requirements PHPDoc for SCA
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.1
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    ```
    Parameter $requirements of attribute class Symfony\Component\Routing\Annotation\Route constructor expects array<string>, array<string, string|Symfony\Component\Routing\Requirement\EnumRequirement> given.
    ```
    
    We officially support `\Stringable` since we introduced `EnumRequirement` in 6.1.
    
    It looks like we started supporting it in 5.0 through type coercion (614e824#diff-f82bb2cf9b0e716ac5f670438837154457d6fd24f0b99b0189c6fa3deca3ce46R535). Target 6.1 or 5.4? 🤔
    
    Commits
    -------
    
    21daba0 [Routing] Fix $requirements PHPDoc for SCA
    fabpot committed Jun 9, 2022

Commits on Jun 8, 2022

  1. Merge branch '6.1' into 6.2

    * 6.1:
      [Console] Fix tests
      use the outermost wrapping DBAL connection
      [Console] Fix deprecation when description is null
      [Console] Escape % in command name & description from getDefault*()
      [FrameworkBundle] Fix XML cache config
    chalasr committed Jun 8, 2022
  2. [HttpClient][WebProfilerBundle] Catch errors when encoding body for c…

    …url command line
    Phillip Look committed Jun 8, 2022
  3. minor #46623 [Console] Fix tests (chalasr)

    This PR was merged into the 6.1 branch.
    
    Discussion
    ----------
    
    [Console] Fix tests
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.1
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    5b18222 [Console] Fix tests
    chalasr committed Jun 8, 2022
  4. [Console] Fix tests

    chalasr committed Jun 8, 2022
  5. Merge branch '6.0' into 6.1

    * 6.0:
      use the outermost wrapping DBAL connection
      [Console] Fix deprecation when description is null
      [Console] Escape % in command name & description from getDefault*()
      [FrameworkBundle] Fix XML cache config
    chalasr committed Jun 8, 2022
  6. Merge branch '5.4' into 6.0

    * 5.4:
      use the outermost wrapping DBAL connection
      [Console] Fix deprecation when description is null
      [Console] Escape % in command name & description from getDefault*()
      [FrameworkBundle] Fix XML cache config
    chalasr committed Jun 8, 2022
  7. Merge branch '4.4' into 5.4

    * 4.4:
      [Console] Escape % in command name & description from getDefault*()
      [FrameworkBundle] Fix XML cache config
    chalasr committed Jun 8, 2022
  8. minor #46605 Add missing UPGRADE notes for the Security Helper (chalasr)

    This PR was merged into the 6.2 branch.
    
    Discussion
    ----------
    
    Add missing UPGRADE notes for the Security Helper
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.2
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    b3cc70b Add missing UPGRADE notes for the Security Helper
    chalasr committed Jun 8, 2022
Older