Skip to content
Permalink
Branch: master
Commits on Feb 14, 2020
  1. feature #35673 [Process] Add getter for process starttime (dompie)

    nicolas-grekas committed Feb 14, 2020
    This PR was squashed before being merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [Process] Add getter for process starttime
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | Deprecations? | no
    | Tickets       | issue #35531
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
    
    Add a getter for process start time.
    
    Commits
    -------
    
    3b9ed3e [Process] Add getter for process starttime
  2. minor #35715 [Contracts] add missing changelog entries (nicolas-grekas)

    nicolas-grekas committed Feb 14, 2020
    This PR was merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [Contracts] add missing changelog entries
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    9181c3a [Contracts] add missing changelog entries
  3. [Contracts] add missing changelog entries

    nicolas-grekas committed Feb 14, 2020
  4. [symfony/contracts] Reference one main CHANGELOG in each contracts

    nicolas-grekas authored and fabpot committed Feb 13, 2020
Commits on Feb 13, 2020
  1. [ErrorHandler] silence warning when zend.assertions=-1

    nicolas-grekas committed Feb 13, 2020
Commits on Feb 11, 2020
  1. Merge branch '5.0'

    nicolas-grekas committed Feb 11, 2020
    * 5.0:
      [HttpClient] fix "undefined variable"
      [HttpClient] remove useless code in test
      [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
      [HttpClient] fix HttpClientDataCollector when handling canceled responses
      [Security] Fix exception name in doc comments
  2. Merge branch '4.4' into 5.0

    nicolas-grekas committed Feb 11, 2020
    * 4.4:
      [HttpClient] fix "undefined variable"
      [HttpClient] remove useless code in test
      [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
      [HttpClient] fix HttpClientDataCollector when handling canceled responses
      [Security] Fix exception name in doc comments
  3. Merge branch '3.4' into 4.4

    nicolas-grekas committed Feb 11, 2020
    * 3.4:
      [Security] Fix exception name in doc comments
  4. [HttpClient] remove useless code in test

    nicolas-grekas committed Feb 11, 2020
  5. [HttpClient] fix getting response content after its destructor throwe…

    nicolas-grekas committed Feb 11, 2020
    …d an HttpExceptionInterface
  6. [DomCrawler] fix leftover

    nicolas-grekas committed Feb 11, 2020
  7. bug #35672 [HttpClient] fix HttpClientDataCollector when handling can…

    nicolas-grekas committed Feb 11, 2020
    …celed responses (thematchless)
    
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [HttpClient] fix HttpClientDataCollector when handling canceled responses
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    small addition to the already merged #35562
    
    Commits
    -------
    
    7088ef7 [HttpClient] fix HttpClientDataCollector when handling canceled responses
  8. feature #35192 [PhpUnitBridge] Add the ability to expect a deprecatio…

    nicolas-grekas committed Feb 11, 2020
    …n inside a test (fancyweb)
    
    This PR was merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [PhpUnitBridge] Add the ability to expect a deprecation inside a test
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | todo
    
    Replaces #25757
    
    Proposed implementation uses a dedicated trait for a better DX. Using `$this->expectDeprecation()` feels natural.
    
    Unfortunately it is not currently possible to test the cases that should produce errors or risky, so there are some things that are not testable here. I plan to propose another feature for the PhpUnitBridge to be able to test those kind of things. If it's accepted, we will then be able to strenghten the tests of this one.
    
    Commits
    -------
    
    a3a9280 [PhpUnitBridge] Add the ability to expect a deprecation inside a test
Commits on Feb 10, 2020
  1. feature #35611 [Console] Moved estimated & remaining calculation logi…

    nicolas-grekas committed Feb 10, 2020
    …c to separate get method (peterjaap)
    
    This PR was squashed before being merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [Console] Moved estimated & remaining calculation logic to separate get method
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    
    This way, we can use `getEstimated()`and `getRemaining()` to get easy access to the estimated / remaining number of seconds to be used in our placeholder definition set with `setPlaceholderFormatterDefinition` without having to redefine the calculation ourself.
    
    Example before;
    
    ```php
    ProgressBar::setPlaceholderFormatterDefinition(
        'eta',
        function (ProgressBar $progressBar) {
            $estimated = round((time() - $progressBar->getStartTime()) / ($progressBar->getProgress() ?: 0.1) * $progressBar->getMaxSteps());
            return date('H:i:s', strtotime('+' . $estimated . ' seconds'));
        }
    );
    ```
    
    Example after;
    
    ```php
    ProgressBar::setPlaceholderFormatterDefinition(
        'eta',
        function (ProgressBar $progressBar) {
            return date('H:i:s', strtotime('+' . $this->getEstimated() . ' seconds'));
        }
    );
    ```
    
    Commits
    -------
    
    19958fb [Console] Moved estimated & remaining calculation logic to separate get method
Commits on Feb 9, 2020
  1. [FrameworkBundle] fix typo

    nicolas-grekas committed Feb 9, 2020
  2. feature #30501 [FrameworkBundle][Routing] added Configurators to hand…

    nicolas-grekas committed Feb 9, 2020
    …le template and redirect controllers (HeahDude)
    
    This PR was merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | let's see
    | Fixed tickets | partially #24640, #25145
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#11120
    
    While working on symfony/symfony-docs#11085, I felt bad about the long notations required for simple [redirects](https://symfony.com/doc/current/routing/redirect_in_config.html) and [templates rendering](https://symfony.com/doc/current/templating/render_without_controller.html) template actions, but I love and use those features since always. Then I gave it a try yesterday night and now I realised I missed #24640 and that #25145 has been closed x).
    
    So here we go, here's my WIP. WDYT of this implementation? ping @javiereguiluz?
    
    I'm going to open the PR in the docs so we can discuss the DX changes there too, and keep focus on the code here.
    
    Cheers!
    
    EDIT
    ----
    This PR now only update PHP-DSL configurators.
    
    ______________
    
    TODO:
    
    - [x] gather reviews
    - ~[x] fix xml schema~
    - [x] add some tests
    - ~[ ] handle xsd auto discovery~
    - [x] rebase on top of #30507
    - [x] ~add shortcuts for #30514~
    
    Commits
    -------
    
    de74794 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers
Commits on Feb 8, 2020
  1. Merge branch '5.0'

    nicolas-grekas committed Feb 8, 2020
    * 5.0:
      Add missing symfony/mime to require-dev
      [Validator] Added the missing Mongolian translations
      [ErrorHandler] Never throw on warnings triggered by assert() and set assert.exception=1 in Debug::enable()
      refactor(Process): fromShellCommandLine
      [Mailer] Do not ping the SMTP server before sending every message
  2. Merge branch '4.4' into 5.0

    nicolas-grekas committed Feb 8, 2020
    * 4.4:
      Add missing symfony/mime to require-dev
      [Validator] Added the missing Mongolian translations
      [ErrorHandler] Never throw on warnings triggered by assert() and set assert.exception=1 in Debug::enable()
      refactor(Process): fromShellCommandLine
      [Mailer] Do not ping the SMTP server before sending every message
  3. Add missing symfony/mime to require-dev

    nicolas-grekas committed Feb 8, 2020
  4. Merge branch '3.4' into 4.4

    nicolas-grekas committed Feb 8, 2020
    * 3.4:
      [Validator] Added the missing Mongolian translations
  5. [Contracts/Deprecation] don't use assert(), rename to trigger_depreca…

    nicolas-grekas committed Feb 8, 2020
    …tion()
Commits on Feb 7, 2020
  1. [ErrorHandler] Never throw on warnings triggered by assert() and set …

    nicolas-grekas committed Feb 7, 2020
    …assert.exception=1 in Debug::enable()
  2. [VarDumper] fix transient failure

    nicolas-grekas committed Feb 7, 2020
  3. minor #34058 [YAML] Improve performance of YAML parser (NamelessCoder)

    nicolas-grekas committed Feb 7, 2020
    This PR was merged into the 5.1-dev branch.
    
    Discussion
    ----------
    
    [YAML] Improve performance of YAML parser
    
    | Q             | A
    | ------------- | ---
    | Branch?       | master
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | License       | MIT
    
    Optimise various methods and conditions to use best
    performing alternatives where possible. Roughly:
    
    * Uses methods that do not copy memory, e.g. strncmp
      as alternative for strpos matching beginning of string.
    * Switches order of some conditions to put the cheapest
      checks first in order.
    * Checks input before calling trim() - despite the function
      returning the same string as input, it still costs memory
      and introduces unnecessary overhead.
    * Extracts variables for repeated identical function calls.
    * Uses negative substring offsets instead of strlen + substr.
    * Replaces single-char substr usages with substring access.
    
    Profiling method
    -----------------
    
    Profiled using a custom script which splits and parses all provided `fixture` files from the YAML component's test directory, then profiled this through Blackfire and identified frequent method calls.
    
    Refactoring strategy
    --------------------
    
    Most important change: switching strpos to strncmp to avoid scanning a full (and potentially very long) YAML line for occurrence of a substring.
    
    Whenever possible, I've gone for PHP methods that do not copy memory and replaced some instances of function calls which could be replaced with substring access.
    
    In methods which are called frequently I've gone for guard clauses to prevent further processing if a YAML line is, for example, empty. Such as avoiding trim() on already empty lines.
    
    Profiling results
    ----------------
    
    A Blackfire profiling delta can be seen on https://blackfire.io/profiles/compare/90fd3005-8b9f-4534-8bd8-1e66832bf247/graph. Taken with 200 samples which render every YAML fixture from the component's test dir.
    
    Commits
    -------
    
    7a7c966 [YAML] Improve performance of YAML parser
  4. Merge branch '5.0'

    nicolas-grekas committed Feb 7, 2020
    * 5.0:
      Fix typo
  5. Merge branch '4.4' into 5.0

    nicolas-grekas committed Feb 7, 2020
    * 4.4:
      Fix typo
  6. Fix typo

    nicolas-grekas committed Feb 7, 2020
  7. Merge branch '5.0'

    nicolas-grekas committed Feb 7, 2020
    * 5.0:
      [travis] fix patching return types of symfony/contracts
      [FrameworkBundle] fix fix fix deps=low
      [FrameworkBundle] fix fix deps=low
      [FrameworkBundle] fix deps=low
  8. Merge branch '4.4' into 5.0

    nicolas-grekas committed Feb 7, 2020
    * 4.4:
      [travis] fix patching return types of symfony/contracts
      [FrameworkBundle] fix fix fix deps=low
      [FrameworkBundle] fix fix deps=low
      [FrameworkBundle] fix deps=low
  9. minor #35630 [travis] fix patching return types of symfony/contracts …

    nicolas-grekas committed Feb 7, 2020
    …(nicolas-grekas)
    
    This PR was merged into the 4.4 branch.
    
    Discussion
    ----------
    
    [travis] fix patching return types of symfony/contracts
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.4
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Fixing failing builds like https://travis-ci.org/symfony/symfony/jobs/647233182
    
    Commits
    -------
    
    076a2a0 [travis] fix patching return types of symfony/contracts
  10. [travis] fix patching return types of symfony/contracts

    nicolas-grekas committed Feb 7, 2020
  11. Merge branch '3.4' into 4.4

    nicolas-grekas committed Feb 7, 2020
    * 3.4:
      [FrameworkBundle] fix fix fix deps=low
      [FrameworkBundle] fix fix deps=low
      [FrameworkBundle] fix deps=low
Older
You can’t perform that action at this time.