Permalink
Commits on Aug 24, 2016
  1. @nicolas-grekas

    minor #19722 [ExpressionLanguage] Move the ::dump method to the Node …

    …classe to ease its usage (lyrixx)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Example (for @nicolas-grekas :trollface: )
    
    ```php
    <?php
    
    require __DIR__.'/vendor/autoload.php';
    
    use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
    use Symfony\Component\ExpressionLanguage\Node\NameNode;
    
    $el = new ExpressionLanguage();
    
    $expression = $el->parse('a + b + 12', ['a','b']);
    
    function dump_with_highlight($node)
    {
        $dump = '';
    
        foreach ($node->toArray() as $v) {
            if (is_scalar($v)) {
                $dump .= $v;
            } elseif ($v instanceof NameNode) {
                $dump .= sprintf('`%s`', dump_with_highlight($v));
            } else {
                $dump .= dump_with_highlight($v);
            }
        }
    
        return $dump;
    }
    
    echo dump_with_highlight($expression->getNodes());
    ```
    Result:
    
    ```
    ((<strong>a</strong> + <strong>b</strong>) + 12)
    ```
    
    Commits
    -------
    
    b6d0050 [ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage
    nicolas-grekas committed Aug 24, 2016
  2. @lyrixx

    [ExpressionLanguage] Move the ::dump method to the Node classe to eas…

    …e its usage
    lyrixx committed Aug 24, 2016
Commits on Aug 23, 2016
  1. @fabpot

    feature #19714 [VarDumper] Handle "title" attribute on virtual proper…

    …ties (nicolas-grekas)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [VarDumper] Handle "title" attribute on virtual properties
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | New feature?  | yes
    | Tests pass?   | yes
    | License       | MIT
    
    As seen with @wouterj , it would be better to *not* display the stack level in front of each stack line.
    This PR does just that, and moves the stack level to a title attribute in HtmlDumper.
    
    ![capture du 2016-08-23 14-09-43](https://cloud.githubusercontent.com/assets/243674/17891395/cc40b088-693b-11e6-8523-89ff51be929a.png)
    
    Commits
    -------
    
    19bcf63 [VarDumper] Handle "title" attribute on virtual properties
    fabpot committed Aug 23, 2016
  2. @fabpot

    feature #19687 [FrameworkBundle] Use relative paths in templates path…

    …s cache (tgalopin)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Use relative paths in templates paths cache
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #3079
    | License       | MIT
    | Doc PR        | -
    
    This implements the usage of relative paths instead of absolute ones in `var/cache/*/templates.php`, important for ability to build the cache in a different context than where it will be used.
    
    This PR transforms the following `templates.php`:
    
    ``` php
    <?php return array (
      ':default:index.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/default/index.html.twig',
      '::base.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/base.html.twig',
    );
    ```
    
    Into:
    
    ``` php
    <?php return array (
      ':default:index.html.twig' => __DIR__.'/../../../app/Resources/views/default/index.html.twig',
      '::base.html.twig' => __DIR__.'/../../../app/Resources/views/base.html.twig',
    );
    ```
    
    I also added tests for the TemplateCachePathsWarmer and improved tests for the TemplateLocator.
    
    Commits
    -------
    
    6f6139c [FrameworkBundle] Use relative paths in templates paths cache
    fabpot committed Aug 23, 2016
  3. @fabpot

    minor #19638 [DependencyInjection] Factorize listing of setters (dung…

    …las)
    
    This PR was squashed before being merged into the 3.2-dev branch (closes #19638).
    
    Discussion
    ----------
    
    [DependencyInjection] Factorize listing of setters
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | n/a
    
    Add a new method to list setters of a class.
    
    Commits
    -------
    
    163fbf4 [DependencyInjection] Factorize listing of setters
    fabpot committed Aug 23, 2016
  4. @dunglas @fabpot
  5. @nicolas-grekas

    Merge branch '3.1'

    * 3.1:
      [ClassLoader] Fix tests
      [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
      [DependencyInjection] PhpDumper::isFrozen inconsistency
      [DI] Cleanup array_key_exists
      include dynamic services in list of alternatives
      [Debug] Swap dumper services at bootstrap
    nicolas-grekas committed Aug 23, 2016
  6. @nicolas-grekas

    Merge branch '2.8' into 3.1

    * 2.8:
      [ClassLoader] Fix tests
      [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
      [DependencyInjection] PhpDumper::isFrozen inconsistency
      [DI] Cleanup array_key_exists
      include dynamic services in list of alternatives
      [Debug] Swap dumper services at bootstrap
    nicolas-grekas committed Aug 23, 2016
  7. @nicolas-grekas

    Merge branch '2.7' into 2.8

    * 2.7:
      [ClassLoader] Fix tests
      [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
      [DependencyInjection] PhpDumper::isFrozen inconsistency
      [DI] Cleanup array_key_exists
      include dynamic services in list of alternatives
      [Debug] Swap dumper services at bootstrap
    nicolas-grekas committed Aug 23, 2016
  8. @nicolas-grekas

    minor #19710 [ClassLoader] Fix tests (nicolas-grekas)

    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [ClassLoader] Fix tests
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Tests pass?   | yes
    | License       | MIT
    
    As discussed right now on php-internals, this string is ignored and the docs only tells about null.
    
    Commits
    -------
    
    0f95708 [ClassLoader] Fix tests
    nicolas-grekas committed Aug 23, 2016
  9. @nicolas-grekas

    [VarDumper] Handle "title" attribute on virtual properties

    nicolas-grekas committed Aug 23, 2016
  10. @nicolas-grekas

    [ClassLoader] Fix tests

    nicolas-grekas committed Aug 23, 2016
  11. @nicolas-grekas

    bug #19647 [Debug] Swap dumper services at bootstrap (lyrixx)

    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [Debug] Swap dumper services at bootstrap
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    ---
    
    This commit fix a bug when using debug function too soon.
    For example, if you call dump function during kernel::boot() the
    dump output will be sent to stderr, even in a web context.
    
    With this patch, the data collector is used by default, so the
    dump output is send to the WDT. In a CLI context, if dump is used
    too soon, the datacollector will buffer it, and release it at the
    end of the script. So in this case everything will be visible by the
    end used.
    
    Commits
    -------
    
    d80589c [Debug] Swap dumper services at bootstrap
    nicolas-grekas committed Aug 23, 2016
  12. @nicolas-grekas

    bug #19685 [DI][2.7] Include dynamic services in alternatives (ro0NL)

    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [DI][2.7] Include dynamic services in alternatives
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | comma-separated list of tickets fixed by the PR, if any
    | License       | MIT
    | Doc PR        | reference to the documentation PR, if any
    
    Commits
    -------
    
    428b5cc include dynamic services in list of alternatives
    nicolas-grekas committed Aug 23, 2016
  13. @nicolas-grekas

    bug #19702 [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 c…

    …hanges (aka "small-bc-breaks") (nicolas-grekas)
    
    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes (aka "small-bc-breaks")
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Bug fix?      | yes
    | Tests pass?   | yes
    | License       | MIT
    
    On PHP 7.2:
    - `is_object()` is going to return `true` for `__PHP_Incomplete_Class` instances
    - `gettype($closed_resource);` returns "resource (closed)"
    
    ping @nikic FYI
    see https://travis-ci.org/symfony/symfony/jobs/154114269 for fixed tests (except the one on ClassLoader which is a BC break on 7.1 that should be fixed there IMHO).
    
    Commits
    -------
    
    feb2cd0 [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
    nicolas-grekas committed Aug 23, 2016
Commits on Aug 22, 2016
  1. @nicolas-grekas

    [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes

    nicolas-grekas committed Aug 22, 2016
  2. @fabpot

    minor #19656 [FrameworkBundle][Debug] Fix default config and cleaning…

    … of traces (nicolas-grekas)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle][Debug] Fix default config and cleaning of traces
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | yes
    | Tests pass?   | yes
    | Fixed tickets | Follow up #19568
    | License       | MIT
    | Doc PR        | -
    
    The default value of `framework.php_errors.log` must be `%kernel.debug%` to have deprecations and silenced errors logged in dev as before.
    
    Cleaning the trace was broken because a closure can't be bound to an internal class.
    
    This PR fixes both issues and enhance trace cleaning a bit by removing arguments from traces so that they take less memory when collected as part of the context of log messages.
    
    Commits
    -------
    
    f640870 [FrameworkBundle][Debug] Fix default config and cleaning of traces
    fabpot committed Aug 22, 2016
  3. @fabpot

    feature #19339 [WebProfilerBundle][Form][DX] To expand the form nodes…

    … that contains children with errors (yceruto)
    
    This PR was squashed before being merged into the 3.2-dev branch (closes #19339).
    
    Discussion
    ----------
    
    [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:
    
    ![first](https://cloud.githubusercontent.com/assets/2028198/17125622/1fd15142-52c3-11e6-830e-17b3e341ba60.png)
    
    This happen because only the root form is expanded and the children are shown collapsed "by default".
    
    **The main problem is to search where is the form with error**.
    
    The purpose of this PR is to show expanded all forms that contains children with error, reducing a little bit the developer's time when debugging.
    
    PR result when we access to the form panel profiler:
    
    ![form-error-result](https://cloud.githubusercontent.com/assets/2028198/17125447/83eb9c0c-52c1-11e6-94bc-a2a7492eea43.png)
    
    In red the full path to the error.
    
    ![form-error-result2](https://cloud.githubusercontent.com/assets/2028198/17125459/a04de95e-52c1-11e6-8980-84a5dcd0914a.png)
    
    Commits
    -------
    
    d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
    fabpot committed Aug 22, 2016
  4. @yceruto @fabpot

    [WebProfilerBundle][Form][DX] To expand the form nodes that contains …

    …children with errors
    yceruto committed with fabpot Jul 11, 2016
  5. @fabpot

    bug #19704 [DependencyInjection] PhpDumper::isFrozen inconsistency (a…

    …llflame)
    
    This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19704).
    
    Discussion
    ----------
    
    [DependencyInjection] PhpDumper::isFrozen inconsistency
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 3.1
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | yes
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    There is a bug (from my prespective) regarding cached container generated by the PhpDumper. ProjectServiceContainer::isFrozen call will be forwarded to the Container::isFrozen method which relies on instance of the parameter bag property. In the cached ProjectServiceContainer parameter bag is undefined afetr intialization hence calls to the isFrozen will result in false unless getParameterBag will be called and then calls to isFrozen will return true onwards.
    This can actually break some compatibility, although it's a bug from my prespective from the very beginning
    
    Commits
    -------
    
    7c0a62c [DependencyInjection] PhpDumper::isFrozen inconsistency
    fabpot committed Aug 22, 2016
  6. @allflame @fabpot
  7. @fabpot

    minor #19689 [DI] Cleanup array_key_exists (ro0NL)

    This PR was squashed before being merged into the 2.7 branch (closes #19689).
    
    Discussion
    ----------
    
    [DI] Cleanup array_key_exists
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | comma-separated list of tickets fixed by the PR, if any
    | License       | MIT
    | Doc PR        | reference to the documentation PR, if any
    
    Investigated this a bit, and to me it looks like left-over code. `null` doesnt end up in `$this->services` by design (this was done in #8582) so it seems. The test added then for regression still passes :)
    
    I cant believe we guarantee BC for users doing `$this->services['id'] = null` (due protected), allowing them to break the design of `has`, `get` and `initialized` right now.
    
    This also happens for `$this->definitions` in `ContainerBuilder`, maybe because `Container` did it alteady.. but im not sure.
    
    Then again, there's this comment: #14470 (comment)
    
    Commits
    -------
    
    3306c70 [DI] Cleanup array_key_exists
    fabpot committed Aug 22, 2016
  8. @ro0NL @fabpot

    [DI] Cleanup array_key_exists

    ro0NL committed with fabpot Aug 21, 2016
  9. @tgalopin

    [FrameworkBundle] Use relative paths in templates paths cache

    tgalopin committed Aug 20, 2016
  10. @nicolas-grekas

    Merge branch '3.1'

    * 3.1:
      [travis] Use 7.0 until 7.1 is fixed
      [DIC] Fix service autowiring inheritance
      [Serializer] Fix denormalization of arrays
      [SecurityBundle] Add missing deprecation notice for form_login.intention
      Verify explicitly that the request IP is a valid IPv4 address
      [WebProfilerBundle] replaces tabs characters by spaces.
    nicolas-grekas committed Aug 22, 2016
  11. @nicolas-grekas

    Merge branch '2.8' into 3.1

    * 2.8:
      [travis] Use 7.0 until 7.1 is fixed
      [DIC] Fix service autowiring inheritance
      [SecurityBundle] Add missing deprecation notice for form_login.intention
      Verify explicitly that the request IP is a valid IPv4 address
    nicolas-grekas committed Aug 22, 2016
  12. @nicolas-grekas

    Merge branch '2.7' into 2.8

    * 2.7:
      [travis] Use 7.0 until 7.1 is fixed
      Verify explicitly that the request IP is a valid IPv4 address
    nicolas-grekas committed Aug 22, 2016
  13. @nicolas-grekas

    minor #19700 [travis] Use PHP 7.0 until 7.1 is fixed (nicolas-grekas)

    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [travis] Use PHP 7.0  until 7.1 is fixed
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.7
    | Tests pass?   | let's see
    | License       | MIT
    
    Commits
    -------
    
    107a9e5 [travis] Use 7.0 until 7.1 is fixed
    nicolas-grekas committed Aug 22, 2016
  14. @nicolas-grekas

    [travis] Use 7.0 until 7.1 is fixed

    nicolas-grekas committed Aug 22, 2016
Commits on Aug 20, 2016
  1. @fabpot

    minor #19676 [Bridge] [Twig] replaces tabs by spaces in Twig form the…

    …mes templates. (hhamon)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates.
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    d88f2a4 [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates.
    fabpot committed Aug 20, 2016
  2. @ro0NL

    include dynamic services in list of alternatives

    ro0NL committed Aug 20, 2016
  3. @hhamon

    [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates.

    hhamon committed Aug 19, 2016
Commits on Aug 19, 2016
  1. @fabpot

    feature #19519 [Cache] Add PDO + Doctrine DBAL adapter (nicolas-grekas)

    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [Cache] Add PDO + Doctrine DBAL adapter
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#6858
    
    This PR adds a PDO adapter for our PSR-6 cache items. The implementation heavily borrows from PdoSessionHandler.
    
    Commits
    -------
    
    82a0de2 [Cache] Add PDO + Doctrine DBAL adapter
    fabpot committed Aug 19, 2016
  2. @fabpot

    feature #19672 [VarDumper] Allow dumping subparts of cloned Data stru…

    …ctures (nicolas-grekas)
    
    This PR was merged into the 3.2-dev branch.
    
    Discussion
    ----------
    
    [VarDumper] Allow dumping subparts of cloned Data structures
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | New feature?  | yes
    | Tests pass?   | yes
    | License       | MIT
    | Doc PR     | symfony/symfony-docs#6891
    
    ping @wouterj: with this, we'll be able to dump only the trace for deprecations in #19614 instead of being forced to dump the full exception right now. See test case.
    We'd do `{{ profiler_dump(log.context.seek('trace')) }}` in `logger.html.twig`.
    
    Commits
    -------
    
    8f2f440 [VarDumper] Allow dumping subparts of cloned Data structures
    fabpot committed Aug 19, 2016
  3. @fabpot

    bug #19643 [DependencyInjection] Fix service autowiring inheritance (…

    …chalasr)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [DependencyInjection] Fix service autowiring inheritance
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 2.8
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #19615
    | License       | MIT
    | Doc PR        | n/a
    
    This makes services inherit the `autowire` attribute from their parent and fix the ability to override it from the child.
    
    Fixed cases:
    
    - Simple inheritance
    ```yaml
    parent:
        class: Foo
        abstract: true
        autowire: true
    
    child:
        class: Foo
    ```
    
    - Set in the child (only)
    ```yaml
    parent:
        class: Foo
        abstract: true
    
    child:
        class: Foo
        autowire: true
    ```
    
    - Set in the parent, changed in the child
    ```yaml
    parent:
        class: Foo
        abstract: true
        autowire: true
    
    child:
        class: Foo
        autowire: false
    ```
    
    Commits
    -------
    
    fb95bdc [DIC] Fix service autowiring inheritance
    fabpot committed Aug 19, 2016