Skip to content
Permalink
Branch: 4.1
Commits on Jan 29, 2019
  1. Merge pull request #30016 from fabpot/release-4.1.11

    fabpot committed Jan 29, 2019
    released v4.1.11
  2. updated VERSION for 4.1.11

    fabpot committed Jan 29, 2019
  3. updated CHANGELOG for 4.1.11

    fabpot committed Jan 29, 2019
  4. Merge branch '3.4' into 4.1

    nicolas-grekas committed Jan 29, 2019
    * 3.4:
      [HttpKernel] fix nested calls to serialize when using DataCollector
  5. bug #30013 [Routing] dont redirect routes with greedy trailing vars w…

    nicolas-grekas committed Jan 29, 2019
    …ith no explicit slash (nicolas-grekas)
    
    This PR was merged into the 4.1 branch.
    
    Discussion
    ----------
    
    [Routing] dont redirect routes with greedy trailing vars with no explicit slash
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.1
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #29673 #29734 #29575
    | License       | MIT
    | Doc PR        | -
    
    From the linked issue:
    
    > The current logic is the following:
    > - when a route is declared with a trailing slash, the trimmed-slash url is redirected to the one with the slash
    > - when a route is declared with *no* trailing slash, the slashed url is redirected to the trimmed-slash one
    >
    > That includes routes with slash-greedy requirements: when the same greedy requirement matches both the slashed and the trimmed-slash URLs, only one of them is considered the canonical one and a redirection happens.
    >
    > We could fine tune this logic and make an exception when a trailing slash-greedy requirement is declared with no explicit trailing slash after it. (ie disable any redirections for `/foo/{.*}` but keep it for `/foo/{.*}/`. That would mean `/foo/bar` and `/foo/bar/` wouldn't trigger the redirection for route `/foo/{.*}`, breaking the "not-semantics" property of trailing slashes for catch-all routes. Which might be legit afterall.
    
    This PR implements this fine tuning, as that's the most BC behavior (and thus the correct one).
    See #30012 for `testGreedyTrailingRequirement` in action on 3.4 as a proof.
    
    Commits
    -------
    
    2bb8890 [Routing] dont redirect routes with greedy trailing vars with no explicit slash
  6. [Routing] dont redirect routes with greedy trailing vars with no expl…

    nicolas-grekas committed Jan 29, 2019
    …icit slash
  7. Merge branch '3.4' into 4.1

    nicolas-grekas committed Jan 29, 2019
    * 3.4:
      skip native serialize among child and parent serializable objects
      [Routing] backport tests from 4.1
      Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
      Support use of hyphen in asset package name
      Remove gendered pronouns
      Replace gender by eye color in tests
      [Security] dont do nested calls to serialize()
  8. bug #30006 [Security] don't do nested calls to serialize() (nicolas-g…

    nicolas-grekas committed Jan 29, 2019
    …rekas, Renan)
    
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [Security] don't do nested calls to serialize()
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #29951
    | License       | MIT
    | Doc PR        | n/a
    
    The problem (originally reported as `Symfony\Component\Security\Core\Authentication\Token\AbstractToken` issue), may occur also in classes extending `Symfony\Component\Security\Core\Exception\AuthenticationException`
    
    Tasks:
    
    - [x] Skip native serializer (workaround itself)
    - [x] Token test
    - [x] Exception test
    
    Commits
    -------
    
    10256fc skip native serialize among child and parent serializable objects
    41000f1 [Security] dont do nested calls to serialize()
  9. minor #30012 [Routing] backport tests from 4.1 (nicolas-grekas)

    nicolas-grekas committed Jan 29, 2019
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [Routing] backport tests from 4.1
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    c2e0f97 [Routing] backport tests from 4.1
  10. skip native serialize among child and parent serializable objects

    Renan authored and nicolas-grekas committed Jan 28, 2019
  11. [Routing] backport tests from 4.1

    nicolas-grekas committed Jan 29, 2019
  12. bug #30007 [FrameworkBundle] Support use of hyphen in asset package n…

    fabpot committed Jan 29, 2019
    …ame (damaya, XuruDragon)
    
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Support use of hyphen in asset package name
    
    This PR is a continuity of #28128
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #29122
    | License       | MIT
    | Doc PR        | n/a
    
    According to issue symfony/symfony-docs#10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
    ```yaml
    framework:
        assets:
            packages:
                app-client-frontend:
                    version: "%env(FRONTEND_VERSION)%"
                    version_format: '%%2$s/dist/%%1$s'
                    base_urls:
                      - "%env(FRONTEND_URL)%"
    ```
    
    Commits
    -------
    
    5c58b6e Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
    30b6a4f Support use of hyphen in asset package name
  13. minor #30009 [MonologBridge] Remove unused local variable (samnela)

    fabpot committed Jan 29, 2019
    This PR was merged into the 4.1 branch.
    
    Discussion
    ----------
    
    [MonologBridge] Remove unused local variable
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.1
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | n/a
    
    Commits
    -------
    
    5580473 [MonologBridge] Remove unused local variable
Commits on Jan 28, 2019
  1. [MonologBridge] Remove unused local variable

    samnela committed Jan 28, 2019
  2. minor #30003 Remove unreachable code (TysonAndre)

    nicolas-grekas committed Jan 28, 2019
    This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #30003).
    
    Discussion
    ----------
    
    Remove unreachable code
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.2
    | Bug fix?      | (unreachable)
    | New feature?  | no
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no
    | Tests pass?   | n/a (unreachable)    <!-- please add some, will be required by reviewers -->
    | Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
    | License       | MIT
    | Doc PR        |
    
    The try/finally block will either return or throw.
    Additionally, $socket was never defined.
    
    Detected via static analysis
    
    Commits
    -------
    
    2fb8f49 Remove unreachable code
  3. Remove unreachable code

    TysonAndre authored and nicolas-grekas committed Jan 27, 2019
    The try/finally block will either return or throw.
    Additionally, $socket was never defined.
    
    Detected via static analysis
  4. Add PackageNameTest to ConfigurationTest also add in the changelog th…

    XuruDragon committed Jan 28, 2019
    …e corresponding entry to this PR
  5. Support use of hyphen in asset package name

    damaya authored and XuruDragon committed Aug 3, 2018
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no
    | Tests pass?   | yes (Manual tests only)
    | Fixed tickets | #28122
    | License       | MIT
    | Doc PR        | n/a
    
    According to issue symfony/symfony-docs#10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
    ```
    framework:
        assets:
            packages:
                app-client-frontend:
                    version: "%env(FRONTEND_VERSION)%"
                    version_format: '%%2$s/dist/%%1$s'
                    base_urls:
                      - "%env(FRONTEND_URL)%"
    ```
Commits on Jan 27, 2019
  1. minor #29996 Remove gendered pronouns (Raphaëll Roussel)

    fabpot committed Jan 27, 2019
    This PR was squashed before being merged into the 3.4 branch (closes #29996).
    
    Discussion
    ----------
    
    Remove gendered pronouns
    
    | 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        |
    
    Commits
    -------
    
    bc6e0f8 Remove gendered pronouns
  2. Remove gendered pronouns

    Raphaëll Roussel authored and fabpot committed Jan 26, 2019
Commits on Jan 26, 2019
  1. minor #29994 Replace gender by eye color in tests (Raphaëll Roussel)

    nicolas-grekas committed Jan 26, 2019
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    Replace gender by eye color in tests
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4 <!-- see below -->
    | Bug fix?      | yes
    | New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
    | Fixed tickets | #29737   <!-- #-prefixed issue number(s), if any -->
    | License       | MIT
    | Doc PR        | <!-- required for new features -->
    
    <!--
    Write a short README entry for your feature/bugfix here (replace this comment block.)
    This will help people understand your PR and can be used as a start of the Doc PR.
    Additionally:
     - Bug fixes must be submitted against the lowest 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 master branch.
    -->
    
    I've slightly changed @derrabus proposition to use color only because of the potentially racist interpretation when used for a person, open for discussion though.
    
    Commits
    -------
    
    7218034 Replace gender by eye color in tests
  2. Replace gender by eye color in tests

    Raphaëll Roussel
    Raphaëll Roussel committed Jan 26, 2019
Commits on Jan 25, 2019
  1. fix merge

    nicolas-grekas committed Jan 25, 2019
  2. fix merge

    nicolas-grekas committed Jan 25, 2019
  3. Merge branch '3.4' into 4.1

    nicolas-grekas committed Jan 25, 2019
    * 3.4:
      [HttpFoundation] Check file exists before unlink
      [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
      [Translation] Concatenated translation messages
      [Form] ensure compatibility with older PHPUnit mocks
      [Serializer] Docblock about throwing exceptions on serializer
      [Debug][ErrorHandler] Preserve our error handler when a logger set another one
      [Form] Changed UrlType input type to text when default_protocol is not null
      [Bugfix] MemcachedSessionHandler::close() must close connection
  4. bug #29764 [HttpFoundation] Check file exists before unlink (adam-mos…

    nicolas-grekas committed Jan 25, 2019
    …pan)
    
    This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29764).
    
    Discussion
    ----------
    
    [HttpFoundation] Check file exists before unlink
    
    Check file exists to prevent ErrorException
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.6 <!-- see below -->
    | Bug fix?      | yes
    | New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- don't forget to 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        | symfony/symfony-docs#... <!-- required for new features -->
    
    <!--
    Write a short README entry for your feature/bugfix here (replace this comment block.)
    This will help people understand your PR and can be used as a start of the Doc PR.
    Additionally:
     - Bug fixes must be submitted against the lowest 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 master branch.
    -->
    
    Commits
    -------
    
    1954187 [HttpFoundation] Check file exists before unlink
  5. [HttpFoundation] Check file exists before unlink

    adam-mospan authored and nicolas-grekas committed Jan 3, 2019
  6. bug #29783 [HttpFoundation] MemcachedSessionHandler::close() must clo…

    nicolas-grekas committed Jan 25, 2019
    …se connection (grachevko)
    
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [HttpFoundation] MemcachedSessionHandler::close() must close connection
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4 <!-- see below -->
    | Bug fix?      | yes
    | New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
    | BC breaks?    | no     <!-- see https://symfony.com/bc -->
    | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | License       | MIT
    
    Intoduced here #3333
    
    Commits
    -------
    
    38a9d8b [Bugfix] MemcachedSessionHandler::close() must close connection
  7. bug #29844 [Console] Fixed #29835: ConfirmationQuestion with default …

    nicolas-grekas committed Jan 25, 2019
    …true for answer '0' (mrthehud)
    
    This PR was squashed before being merged into the 3.4 branch (closes #29844).
    
    Discussion
    ----------
    
    [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | Almost all, one failure on appveyor?
    | Fixed tickets | #29835
    | License       | MIT
    | Doc PR        | n/a
    
    <!--
    Write a short README entry for your feature/bugfix here (replace this comment block.)
    This will help people understand your PR and can be used as a start of the Doc PR.
    Additionally:
     - Bug fixes must be submitted against the lowest 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 master branch.
    -->
    
    When using the ConfirmationQuestion class to ask a yes / no question,
    if the default is true, and the answer regex is '/^y/i', then any
    value not starting with [yY] is considered false.
    
    This must include "0", which previously would return true, producing results such as:
    ```
    $ php bin/console do:stuff
    $ Do you want to continue? 0 <enter>
    $ Ok, continuing!
    ```
    
    Commits
    -------
    
    a0a7400 [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
  8. [Console] Fixed #29835: ConfirmationQuestion with default true for an…

    mrthehud authored and nicolas-grekas committed Jan 11, 2019
    …swer '0'
  9. bug #29869 [Debug][ErrorHandler] Preserve our error handler when a lo…

    nicolas-grekas committed Jan 25, 2019
    …gger sets another one (fancyweb)
    
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [Debug][ErrorHandler] Preserve our error handler when a logger sets another one
    
    | 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        | -
    
    When logging errors handled by the `ErrorHandler::handleError()` method, the logger can temporarily set its own custom error handler. This is for example the case of `Monolog` in the `StreamHandler` class (cf https://github.com/Seldaek/monolog/blob/ebb804e432e8fe0fe96828f30d89c45581d36d07/src/Monolog/Handler/StreamHandler.php#L101).
    
    However, when the previous error handler is restored by the logger, it "skips" the real previous handler (the `ErrorHandler::handleError()` one) in the pile and goes back directly to the one before. I guess this is because the `restore_error_handler()` call is technically done in the error handler itself, so it logically restore it to the one before and not to itself.
    
    Here is an easy small example that shows the PHP behavior : https://3v4l.org/4OZNZ
    
    The only solution I have found to fix it is to set our error handler everytime an error is logged.
    
    Here are the things I discovered while trying to find a cleaner fix :
    - Setting the same error handler in the error handler itself doesn't actually add it to the pile. This is why adding a check is useless.
    - Checking if the logger modified the error handler is impossible anyway : to get the current error handler, you need to set a new one temporarirly and then revert it. However, when you revert it by calling `restore_error_handler()` you end up having the same problem you are trying to fix...
    - Also trying to get the current error handler in the error handler itself will return NULL if it is itself.
    
    Commits
    -------
    
    b979fff [Debug][ErrorHandler] Preserve our error handler when a logger set another one
  10. bug #29926 [Form] Changed UrlType input type to text when default_pro…

    nicolas-grekas committed Jan 25, 2019
    …tocol is not null (MatTheCat)
    
    This PR was merged into the 3.4 branch.
    
    Discussion
    ----------
    
    [Form] Changed UrlType input type to text when default_protocol is not null
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #29690
    | License       | MIT
    | Doc PR        |
    
    replaces #29691
    
    Commits
    -------
    
    2791edf [Form] Changed UrlType input type to text when default_protocol is not null
  11. bug #29961 [Translation] Concatenated translation messages (Stadly)

    nicolas-grekas committed Jan 25, 2019
    This PR was squashed before being merged into the 3.4 branch (closes #29961).
    
    Discussion
    ----------
    
    [Translation] Concatenated translation messages
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.4
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #29956
    | License       | MIT
    | Doc PR        | none
    
    Concatenated translation messages are now treated correctly.
    
    Commits
    -------
    
    df73ebf [Translation] Concatenated translation messages
Older
You can’t perform that action at this time.