Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 4, 2015
  1. @fabpot

    minor #15184 [DependencyInjection] Remove deprecated code (dosten)

    fabpot authored
    This PR was merged into the 3.0-dev branch.
    
    Discussion
    ----------
    
    [DependencyInjection] Remove deprecated code
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | License       | MIT
    
    This code has been removed in #14155 but seems that a wrong merge didn't removed it.
    
    Commits
    -------
    
    f2fef91 Removed deprecated code
Commits on Jul 2, 2015
  1. @dosten

    Removed deprecated code

    dosten authored
  2. @nicolas-grekas

    Merge branch '2.8'

    nicolas-grekas authored
    * 2.8:
      [VarDumper] Ingore PHPUnit and Prophecy object when they are nested
      [2.8] Fix lowest deps
    
    Conflicts:
    	.travis.yml
    	src/Symfony/Bundle/FrameworkBundle/composer.json
    	src/Symfony/Bundle/SecurityBundle/composer.json
  3. @nicolas-grekas

    feature #15175 [VarDumper] Ingore PHPUnit and Prophecy object when th…

    nicolas-grekas authored
    …ey are nested (lyrixx)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [VarDumper] Ingore PHPUnit and Prophecy object when they are nested
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    The purpose of this PR is to ignore nested PHPUnit/Prophecy object when `dump`ing.
    
    Reproducer:
    
    ```php
    $a = $this->getMock('Datetime');
    $b = $this->prophesize('Datetime')->reveal();
    $std = new \stdClass;
    $std->my = 'property';
    $std->a = $a;
    $std->b = $b;
    
    die(dump($a, $b, $std));
    ```
    
    =>
    
    ```
    {#86
      +"my": "property"
      +"a": Mock_Datetime_8ba7f351 {#22 …5}
      +"b": Double\DateTime\P1 {#90 …1}
    }
    ```
    
    Commits
    -------
    
    2bea373 [VarDumper] Ingore PHPUnit and Prophecy object when they are nested
  4. @nicolas-grekas

    minor #15173 [2.8] Fix lowest deps (nicolas-grekas)

    nicolas-grekas authored
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [2.8] Fix lowest deps
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Looks like that by testing the lowest deps on 5.3, we missed some constraints in our test suite.
    
    Commits
    -------
    
    a036a77 [2.8] Fix lowest deps
  5. @lyrixx
  6. @nicolas-grekas

    [2.8] Fix lowest deps

    nicolas-grekas authored
  7. @nicolas-grekas

    Merge branch '2.8'

    nicolas-grekas authored
    * 2.8:
      [travis] start hhvm first
      [DX] [Security] Renamed Token#getKey() to getSecret()
      [Validator] always evaluate binary format when changed
    
    Conflicts:
    	.travis.yml
    	src/Symfony/Component/Security/Http/composer.json
  8. @nicolas-grekas

    Merge branch '2.7' into 2.8

    nicolas-grekas authored
    * 2.7:
      [travis] start hhvm first
      [Validator] always evaluate binary format when changed
  9. @nicolas-grekas

    Merge branch '2.6' into 2.7

    nicolas-grekas authored
    * 2.6:
      [travis] start hhvm first
      [Validator] always evaluate binary format when changed
    
    Conflicts:
    	.travis.yml
  10. @nicolas-grekas

    Merge branch '2.3' into 2.6

    nicolas-grekas authored
    * 2.3:
      [travis] start hhvm first
  11. @nicolas-grekas
Commits on Jul 1, 2015
  1. @fabpot

    feature #15141 [DX] [Security] Renamed Token#getKey() to getSecret() …

    fabpot authored
    …(WouterJ)
    
    This PR was squashed before being merged into the 2.8 branch (closes #15141).
    
    Discussion
    ----------
    
    [DX] [Security] Renamed Token#getKey() to getSecret()
    
    There are 2 very vague parameter names in the authentication process: `$providerKey` and `$key`. Some tokens/providers have the first one, some tokens/providers the second one and some both. An overview:
    
    | Token | `providerKey` | `key`
    | --- | --- | ---
    | `AnonymousToken` | - | yes
    | `PreAuth...Token` | yes | -
    | `RememberMeToken` | yes | yes
    | `UsernamePasswordToken` | yes | -
    
    Both names are extremely general and their PHPdocs contains pure no-shit-sherlock-descriptions :squirrel: (like "The key."). This made me and @iltar think it's just an inconsistency and they have the same meaning.
    ...until we dived deeper into the code and came to the conclusion that `$key` has a Security task (while `$providerKey` doesn't really). If it takes people connected to Symfony internals 30+ minutes to find this out, it should be considered for an improvement imo.
    
    So here is our suggestion: **Rename `$key` to `$secret`**. This explains much better what the value of the string has to be (for instance, it's important that the string is not easily guessable and cannot be found out, according to the Spring docs). It also explains the usage better (it's used as a replacement for credentials and to hash the RememberMeToken).
    
    **Tl;dr**: `$key` and `$providerKey` are too general names, let's improve DX by renaming them. This PR tackles `$key` by renaming it to `$secret`.
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    *My excuse for the completely unrelated branch name*
    
    Commits
    -------
    
    24e0eb6 [DX] [Security] Renamed Token#getKey() to getSecret()
  2. @WouterJ @fabpot

    [DX] [Security] Renamed Token#getKey() to getSecret()

    WouterJ authored fabpot committed
  3. @nicolas-grekas

    Fix merge

    nicolas-grekas authored
  4. @nicolas-grekas

    Merge branch '2.8'

    nicolas-grekas authored
    * 2.8: (65 commits)
      [VarDumper] Fix tests for HHVM
      Update DateTimeToArrayTransformer.php
      Mock microtime() and time() in transient tests
      Azerbaijani language pluralization rule
      Move HHVM tests out of the allowed failures
      Fix merge
      [2.6] Towards 100% HHVM compat
      [Security/Http] Fix test
      [Stopwatch] Fix test
      Minor fixes
      [Validator] Added missing error codes and turned codes into UUIDs
      Towards 100% HHVM compat
      Warmup twig templates in non-standard paths (closes #12507)
      [Bridge/PhpUnit] Enforce a consistent locale
      Fix param order of assertEquals (expected, actual) in test for Finder\Glob
      Fix choice translation domain for expanded choice widget
      unify default AccessDeniedExeption message
      trigger event with right user (add test)
      [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
      fixed CS
      ...
    
    Conflicts:
    	UPGRADE-2.8.md
    	src/Symfony/Bridge/ProxyManager/composer.json
    	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
    	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
    	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
    	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
    	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
    	src/Symfony/Bundle/FrameworkBundle/Resources/config/old_assets.xml
    	src/Symfony/Bundle/FrameworkBundle/Resources/config/test.xml
    	src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.xml
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.json
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.md
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt
    	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.xml
    	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php
    	src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml
    	src/Symfony/Bundle/SecurityBundle/composer.json
    	src/Symfony/Component/Debug/ErrorHandler.php
    	src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php
    	src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
    	src/Symfony/Component/DependencyInjection/Definition.php
    	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
    	src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
    	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
    	src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
    	src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/legacy-services9.dot
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy-services6.xml
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy-services9.xml
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy-services6.yml
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy-services9.yml
    	src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
    	src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
    	src/Symfony/Component/Form/ResolvedFormType.php
    	src/Symfony/Component/Form/Tests/CompoundFormTest.php
    	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
    	src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
    	src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
  5. @fabpot

    bug #15115 [Validator] always evaluate binary format when changed (xa…

    fabpot authored
    …bbuh)
    
    This PR was merged into the 2.6 branch.
    
    Discussion
    ----------
    
    [Validator] always evaluate binary format when changed
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #13891
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    2ad7e67 [Validator] always evaluate binary format when changed
  6. @xabbuh
  7. @nicolas-grekas

    Merge branch '2.7' into 2.8

    nicolas-grekas authored
    * 2.7:
      Update DateTimeToArrayTransformer.php
      Mock microtime() and time() in transient tests
      Azerbaijani language pluralization rule
      Move HHVM tests out of the allowed failures
  8. @nicolas-grekas
  9. @nicolas-grekas

    Merge branch '2.6' into 2.7

    nicolas-grekas authored
    * 2.6:
      Update DateTimeToArrayTransformer.php
      Mock microtime() and time() in transient tests
      Azerbaijani language pluralization rule
      Move HHVM tests out of the allowed failures
  10. @nicolas-grekas

    Merge branch '2.3' into 2.6

    nicolas-grekas authored
    * 2.3:
      Update DateTimeToArrayTransformer.php
      Mock microtime() and time() in transient tests
      Azerbaijani language pluralization rule
      Move HHVM tests out of the allowed failures
  11. @fabpot

    minor #15166 Mock microtime() and time() in transient tests (nicolas-…

    fabpot authored
    …grekas)
    
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    Mock microtime() and time() in transient tests
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    8319ca3 Mock microtime() and time() in transient tests
  12. @fabpot

    minor #15164 Move HHVM tests out of the allowed failures (nicolas-gre…

    fabpot authored
    …kas)
    
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    Move HHVM tests out of the allowed failures
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    2.3, 2.6 and 2.7 are now green on HHVM, let's ensure this remains always true!
    
    Commits
    -------
    
    ff2ead1 Move HHVM tests out of the allowed failures
  13. @fabpot

    bug #15163 Update DateTimeToArrayTransformer.php (zhil)

    fabpot authored
    This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15163).
    
    Discussion
    ----------
    
    Update DateTimeToArrayTransformer.php
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | none
    | License       | MIT
    | Doc PR        | none
    
    php have annoying bug with timezone handling. Some timezones (like US/Eastern, US/Central, US/Mountain) are considered "not standard" and not parsed in some cases.
    For example, code
    ```
    php -r '$d = new \DateTime("2015-07-01 16:11", new \DateTimeZone("US/Eastern")); print $d->format("r");'
    ```
    return output
    ```
    Wed, 01 Jul 2015 16:11:00 -0400
    ```
    
    However, code
    ```
    php -r '$d = new \DateTime("2015-07-01 16:11 US/Eastern"); print $d->format("r");'
    ```
    throw exception
    ```
    Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-07-01 16:11 US/Eastern) at position 17 (U): The timezone could not be found in the database'
    ```
    
    Thats why timezone US/Eastern works in some cases and didnt work in other cases.
    This PR fix usage of US/Eastern in code like
    
    ```
    $formBuilder->add("createdTimestamp", "datetime", ['view_timezone'=$user->timezone])
    ```
    
    Commits
    -------
    
    27b824a Update DateTimeToArrayTransformer.php
  14. @zhil @fabpot

    Update DateTimeToArrayTransformer.php

    zhil authored fabpot committed
  15. @nicolas-grekas
  16. @fabpot

    bug #15150 [Translation] Azerbaijani language pluralization rule is w…

    fabpot authored
    …rong (shehi)
    
    This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15150).
    
    Discussion
    ----------
    
    [Translation] Azerbaijani language pluralization rule is wrong
    
    In AZ, as in TR, pluralization is always 0:
    
    0 kitab (zero books)
    1 kitab (1 book)
    3 kitab (3 books)
    104 kitab (104 books)
    
    Apparently ZF ruleset was wrong in the first place :)
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #15152
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    efd927a Azerbaijani language pluralization rule
  17. @shehi @fabpot

    Azerbaijani language pluralization rule

    shehi authored fabpot committed
    In AZ, as in TR, pluralization is always 0: 
    
    0 kitab (zero books)
    1 kitab (1 book)
    3 kitab (3 books)
    104 kitab (104 books)
    
    Apparently ZF ruleset was wrong in the first place :)
  18. @aitboudad

    Merge remote-tracking branch 'origin/2.7' into 2.8

    aitboudad authored
    Conflicts:
    	src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
    	src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php
  19. @nicolas-grekas
  20. @nicolas-grekas

    Fix merge

    nicolas-grekas authored
  21. @nicolas-grekas

    Merge branch '2.6' into 2.7

    nicolas-grekas authored
    * 2.6:
      [2.6] Towards 100% HHVM compat
      [Security/Http] Fix test
      [Stopwatch] Fix test
      Minor fixes
      Towards 100% HHVM compat
      unify default AccessDeniedExeption message
      trigger event with right user (add test)
      [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
      [Form] Fixed: Data mappers always receive forms indexed by their names
    
    Conflicts:
    	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
    	src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
    	src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
  22. @fabpot

    feature #15154 [Validator] Added missing error codes and turned codes…

    fabpot authored
    … into UUIDs (webmozart)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Validator] Added missing error codes and turned codes into UUIDs
    
    Reopened #12388 on the 2.8 branch.
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    With the current implementation of error codes, checking which error occurred is unnecessarily complex:
    
    ```php
    if ($violation->getConstraint() instanceof Length && Length::TOO_SHORT_ERROR === $violation->getCode()) {
        // ...
    }
    ```
    
    Also, the code is completely missing for some constraints. This is fixed now. By using UUIDs, the check is reduced to:
    
    ```php
    if (Length::TOO_SHORT_ERROR === $violation->getCode()) {
        // ...
    }
    ```
    
    Also, APIs can simply output the error code and the name of the error without needing to point to the constraint as well.
    
    Before:
    
    ```json
    [
        {
            "code": "1",
            "name": "TOO_SHORT_ERROR",
            "message": "This value is too short. ...",
            "constraint": "Symfony\\Component\\Validator\\Constraints\\Length"
        }
    ]
    ```
    
    After:
    
    ```json
    [
        {
            "code": "9ff3fdc4-b214-49db-8718-39c315e33d45",
            "name": "TOO_SHORT_ERROR",
            "message": "This value is too short. ..."
        }
    ]
    ```
    
    This makes it possible to implement a service on symfony.com which looks up error codes, e.g.
    
    symfony.com/error?code=9ff3fdc4-b214-49db-8718-39c315e33d45
    
    Such a URL could redirect directly to the documentation of the appropriate constraint. We could even support user-submitted error codes which redirect to the documentation of that constraint.
    
    Commits
    -------
    
    8874e88 [Validator] Added missing error codes and turned codes into UUIDs
  23. @fabpot

    bug #15159 [2.6] Towards 100% HHVM compat (nicolas-grekas)

    fabpot authored
    This PR was merged into the 2.6 branch.
    
    Discussion
    ----------
    
    [2.6] Towards 100% HHVM compat
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9917, #11418
    | License       | MIT
    | Doc PR        | -
    
    Failing components:
    - [x] HttpFoundation
    - [x] HttpKernel
    - [x] VarDumper
    
    Related HHVM issues:
    - facebook/hhvm#5563
    
    Commits
    -------
    
    8a78255 [2.6] Towards 100% HHVM compat
Something went wrong with that request. Please try again.