Skip to content
Permalink
Branch: 4.4
Commits on Jun 27, 2019
  1. feature #31065 Add ErrorHandler component (yceruto)

    fabpot committed Jun 27, 2019
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    Add ErrorHandler component
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | no
    | Fixed tickets | #25905, #26448
    | License       | MIT
    | Doc PR        | TODO
    
    Mainly for API-based apps that don't require TwigBundle to get the correct exception response according to the request format (aka `_format` attribute).
    
    ![exception_response](https://user-images.githubusercontent.com/2028198/55509651-713dc700-562a-11e9-8b98-bef3b0229397.gif)
    
    ✔️ [RFC7807](https://tools.ietf.org/html/rfc7807) compliant for JSON and XML formats.
    
    ---
    
    This introduce a new `ErrorRenderer` service that render a `FlattenException` into a given format:
    ```php
    use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRenderer;
    use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
    use Symfony\Component\ErrorHandler\ErrorRenderer\JsonErrorRenderer;
    
    $renderers = [
        new HtmlErrorRenderer(),
        new JsonErrorRenderer(),
        // ...
    ];
    $errorRenderer = new ErrorRenderer($renderers);
    
    return new Response(
        $errorRenderer->render($exception, $request->getRequestFormat()),
        $exception->getStatusCode(),
        $exception->getHeaders()
    );
    ```
    
    The built-in error renderers are:
    
    | Format | Class |
    | --- | --- |
    | html | HtmlErrorRenderer |
    | json | JsonErrorRenderer |
    | xml, atom | XmlErrorRenderer |
    | txt | TxtErrorRenderer |
    
    And you can add your own error renderer by implementing the `ErrorRendererInterface` and tagging it with `error_handler.renderer` in your service definition.
    
    Creating your own error renderer for a built-in format will end up replacing the related built-in error renderer.
    
    Demo: https://github.com/yceruto/error-handler-app ([add custom error renderer](yceruto/error-handler-app@06fc647))
    
    Commits
    -------
    
    7057244 Added ErrorHandler component
Commits on Jun 26, 2019
  1. Merge branch '4.3' into 4.4

    nicolas-grekas committed Jun 26, 2019
    * 4.3:
      Reject phpunit-bridge v5 for now
      Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
  2. Reject phpunit-bridge v5 for now

    nicolas-grekas committed Jun 26, 2019
  3. Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (gr…

    nicolas-grekas committed Jun 26, 2019
    …eg0ire)""
    
    This reverts commit 4814fd3.
  4. Merge branch '4.3' into 4.4

    nicolas-grekas committed Jun 26, 2019
    * 4.3:
      Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"
  5. Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"

    nicolas-grekas committed Jun 26, 2019
    This reverts commit 64b68d4, reversing
    changes made to 3cd795f.
  6. Merge branch '4.3' into 4.4

    nicolas-grekas committed Jun 26, 2019
    * 4.3:
      [PhpUnitBridge] Fix tests
  7. [PhpUnitBridge] Fix tests

    nicolas-grekas committed Jun 26, 2019
  8. Merge branch '4.3' into 4.4

    nicolas-grekas committed Jun 26, 2019
    * 4.3:
      Bump phpunit-bridge
  9. Merge branch '4.2' into 4.3

    nicolas-grekas committed Jun 26, 2019
    * 4.2:
      Bump phpunit-bridge
  10. Merge branch '3.4' into 4.2

    nicolas-grekas committed Jun 26, 2019
    * 3.4:
      Bump phpunit-bridge
  11. Bump phpunit-bridge

    nicolas-grekas committed Jun 26, 2019
  12. Fix typo

    nicolas-grekas committed Jun 26, 2019
  13. Merge branch '4.3' into 4.4

    nicolas-grekas committed Jun 26, 2019
    * 4.3: (34 commits)
      [PhpunitBridge] Read environment variable from superglobals
      [Bridge/PhpUnit] Fix PHP5.5 compat
      [PhpUnitBridge] More accurate grouping
      fixed CS
      Extract unrecoverable exception to interface
      [FrameworkBundle] Fix calling Client::getProfile() before sending a request
      Fix type error
      [Security/Core] require libsodium >= 1.0.14
      [Workflow] re-add workflow.definition tag to workflow services
      [Security/Core] Don't use ParagonIE_Sodium_Compat
      revert #30525 due to performance penalty
      collect called listeners information only once
      [Lock] fix missing inherit docs in RedisStore
      [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
      [Mailgun Mailer] fixed issue when using html body
      [HttpClient] fix timing measurements with NativeHttpClient
      [HttpClient] fix dealing with 1xx informational responses
      add test to avoid regressions
      fix mirroring directory into parent directory
      fix typos
      ...
  14. Merge branch '4.2' into 4.3

    nicolas-grekas committed Jun 26, 2019
    * 4.2:
      [Lock] fix missing inherit docs in RedisStore
      fix accessing session bags
      Add missing rendering of form help block.
  15. Merge branch '3.4' into 4.2

    nicolas-grekas committed Jun 26, 2019
    * 3.4:
      fix accessing session bags
  16. bug #31954 [PhpunitBridge] Read environment variable from superglobal…

    nicolas-grekas committed Jun 26, 2019
    …s (greg0ire)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [PhpunitBridge] Read environment variable from superglobals
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #31857
    | License       | MIT
    | Doc PR        | n/a
    
    The Dotenv component has recently been switched to using superglobals
    instead of putenv(). Let us support both and give priority to
    superglobals.
    
    Commits
    -------
    
    88cfcb5 [PhpunitBridge] Read environment variable from superglobals
  17. [PhpunitBridge] Read environment variable from superglobals

    greg0ire authored and nicolas-grekas committed Jun 8, 2019
    The Dotenv component has recently been switched to using superglobals
    instead of putenv(). Let us support both and give priority to
    superglobals.
    
    Closes #31857
  18. bug #32131 [Mailgun Mailer] fixed issue when using html body (alOneh)

    fabpot committed Jun 26, 2019
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [Mailgun Mailer] fixed issue when using html body
    
    | 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        |
    
    I tested the `symfony/mailgun-mailer` and get an issue when using the `api` scheme with a templated email cause we try to manipulate a stream whereas the `Symfony\Component\Mime\Email::getHtmlBody()` could return also a string (in my case it is one).
    
    The issue :
    
    ```
    stream_get_meta_data() expects parameter 1 to be resource, string given
    ```
    
    Commits
    -------
    
    afbefe1 [Mailgun Mailer] fixed issue when using html body
  19. [Bridge/PhpUnit] Fix PHP5.5 compat

    nicolas-grekas committed Jun 26, 2019
  20. bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)

    fabpot committed Jun 26, 2019
    This PR was squashed before being merged into the 4.3 branch (closes #31730).
    
    Discussion
    ----------
    
    [PhpUnitBridge] More accurate grouping
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | n/a
    
    Sometimes, you cannot easily know if code was written by a vendor or
    directly in the application, for instance if the code comes from a file
    in the cache. In that case, it is better not to classify the deprecation
    as direct or indirect.
    
    @jmsche please test this on your application when you can, I think you might be having that issue.
    
    Commits
    -------
    
    d9f0ba3 [PhpUnitBridge] More accurate grouping
  21. [PhpUnitBridge] More accurate grouping

    greg0ire authored and fabpot committed May 30, 2019
  22. fixed CS

    fabpot committed Jun 26, 2019
  23. bug #31966 [Messenger] Doctrine Connection find and findAll now corre…

    fabpot committed Jun 26, 2019
    …ctly decode headers (TimoBakx)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [Messenger] Doctrine Connection find and findAll now correctly decode headers
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #31916
    | License       | MIT
    | Doc PR        | N/A
    
    The Doctrine transport `Connection` class methods `find` and `findAll` did not JSON-decode the headers of the envelope after retrieving it from Doctrine. The `get` method, however, did this correctly.
    
    I added two tests to verify the results of `find` and `findAll` and then added the JSON-decoding to the `Connection` class. I moved the JSON-decoding to a separate method to avoid duplicate code.
    
    Commits
    -------
    
    3aec2ac [Messenger] Doctrine Connection find and findAll now correctly decode headers
  24. bug #31972 Add missing rendering of form help block. (alexsegura)

    fabpot committed Jun 26, 2019
    This PR was merged into the 4.2 branch.
    
    Discussion
    ----------
    
    Add missing rendering of form help block.
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.2 <!-- see below -->
    | Bug fix?      | yes
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | License       | MIT
    
    <!--
    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):
     - 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 4.4.
     - Legacy code removals go to the master branch.
    -->
    
    When using `bootstrap_3_layout.html.twig` form theme, the help blocks are not rendered.
    
    ```twig
    {% form_theme form 'bootstrap_3_layout.html.twig' %}
    
    {{ form_start(form) }}
      {{ form_row(form.some_field) }} {# <-- no help text is rendered #}
    {{ form_end(form) }}
    ```
    
    Commits
    -------
    
    ff5517e Add missing rendering of form help block.
  25. feature #32126 [Process] Allow writing portable "prepared" command li…

    fabpot committed Jun 26, 2019
    …nes (Simperfit)
    
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [Process] Allow writing portable "prepared" command lines
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | no
    | New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets | #23778  <!-- #-prefixed issue number(s), if any -->
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#11802 <!-- required for new features -->
    
    Hey here, it's me, again !
    
    I've talked with @nicolas-grekas and he gave me a new way of writing this feature that will not be a problem for people using things like {{ toto }} since we are using the linux style of using envvar, the replaced arguments is only replaced when using windows.
    
    This should not break anything and work as expected!
    
    see #24763
    
    This makes `"$FOO"` work seamlessly on Linux and on Windows to reference an env var (that can be provided when calling e.g. the "run" method)
    
    Commits
    -------
    
    3f8354f [Process] Allow writing portable "prepared" command lines
  26. bug #32141 [HttpClient] fix dealing with 1xx informational responses …

    fabpot committed Jun 26, 2019
    …(nicolas-grekas)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [HttpClient] fix dealing with 1xx informational responses
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    I never had a look at 1xx status codes until today.
    This PR fixes reading them when using curl.
    
    If one wonders:
    - `NativeHttpClient` uses `fopen()`, which skips informational parts as allowed by the HTTP spec and doesn't give any way to access their response headers.
    - `CurlHttpClient` allows reading informational responses using the progress callback or via the getInfo() method. That's the way if you need to implement e.g. HTTP 103 early hints.
    
    Commits
    -------
    
    412411d [HttpClient] fix dealing with 1xx informational responses
  27. bug #32138 [Filesystem] fix mirroring directory into parent directory…

    fabpot committed Jun 26, 2019
    … (xabbuh)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [Filesystem] fix mirroring directory into parent directory
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #32089
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    b58a806 fix mirroring directory into parent directory
  28. minor #32143 use proper return types in ErrorHandler and ArgumentReso…

    fabpot committed Jun 26, 2019
    …lver (Tobion)
    
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    use proper return types in ErrorHandler and ArgumentResolver
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | tiny
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Found those things while reviewing #31996 which missed some return types due to using `return` instead of `return null`.
    It's part of fixing #17201 (due to #10717). See also #30869 that somebody was stumbling over.
    
    Commits
    -------
    
    2f9121b use proper return types in ErrorHandler and ArgumentResolver
  29. bug #32137 [HttpFoundation] fix accessing session bags (xabbuh)

    fabpot committed Jun 26, 2019
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [HttpFoundation] fix accessing session bags
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #30682
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    7a4570d fix accessing session bags
  30. bug #32147 [HttpClient] fix timing measurements with NativeHttpClient…

    fabpot committed Jun 26, 2019
    … (nicolas-grekas)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [HttpClient] fix timing measurements with NativeHttpClient
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Align to what curl does.
    
    Commits
    -------
    
    c5c3332 [HttpClient] fix timing measurements with NativeHttpClient
  31. minor #32161 [Lock] fix missing inherit docs in RedisStore (Simperfit)

    fabpot committed Jun 26, 2019
    This PR was merged into the 4.2 branch.
    
    Discussion
    ----------
    
    [Lock] fix missing inherit docs in RedisStore
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.2
    | Bug fix?      | no
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets | none   <!-- #-prefixed issue number(s), 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):
     - 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 4.4.
     - Legacy code removals go to the master branch.
    -->
    
    This is a missing inheritdoc in the RedisStore for the waitAndSave method.
    
    Commits
    -------
    
    71eb8cf [Lock] fix missing inherit docs in RedisStore
  32. bug #32165 revert #30525 due to performance penalty (bendavies)

    fabpot committed Jun 26, 2019
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    revert #30525 due to performance penalty
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets |   <!-- #-prefixed issue number(s), if any -->
    | License       | MIT
    | Doc PR        |
    
    This reverts #30525, because it introduced a large performance penalty.
    
    Here is the effect of that PR when I upgrade my Api Platform project from 4.2.9 to 4.3.1:
    https://blackfire.io/profiles/compare/28bfbc61-3649-4896-bd03-7201239134cd/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=Symfony%5CComponent%5CVarExporter%5CInternal%5CExporter%3A%3Aexport%403&callname=main()
    
    The reverted PR targeted master. This should go in 4.3?
    
    Commits
    -------
    
    3d37cc9 revert #30525 due to performance penalty
  33. minor #32177 [Form] remove comment about to-be-removed method (Tobion)

    fabpot committed Jun 26, 2019
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [Form] remove comment about to-be-removed method
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | no
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets |
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
    
    it is used in master by ButtonBuilder, see #32160 (comment)
    
    Commits
    -------
    
    b80ce9a [Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder
  34. Merge branch '4.2' into 4.3

    fabpot committed Jun 26, 2019
    * 4.2:
      [FrameworkBundle] Fix calling Client::getProfile() before sending a request
      Fix type error
      [Security/Core] Don't use ParagonIE_Sodium_Compat
      collect called listeners information only once
      add test to avoid regressions
      fix typos
      Turkish translation added to Form Component
Older
You can’t perform that action at this time.