Permalink
Commits on Nov 23, 2013
  1. Merge branch '2.3'

    fabpot committed Nov 23, 2013
    * 2.3: (24 commits)
      Add german translation for several validators (Greater/Equal/Less)
      No Entity Manager defined exception
      fixed CS
      [Acl] Fix for issue #9433
      [Validator] fix docblock typos
      [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
      Removed useless check if self::$trustProxies is set
      Fix mistake in translation's service definition.
      if handler_id is identical to null fix
      CS fix
      Fixed ModelChoiceList tests in Propel1 bridge.
      [AclProvider] Fix incorrect behaviour when partial results returned from cache
      Check if the pipe array is empty before calling stream_select()
      [Intl] fixed datetime test as described in #9455
      bumped Symfony version to 2.3.8
      updated VERSION for 2.3.7
      updated CHANGELOG for 2.3.7
      re-factor Propel1 ModelChoiceList
      [Form] Added method Form::getClickedButton() to remove memory leak in FormValidator
      [Locale] fixed the failing test described in #9455
      ...
    
    Conflicts:
    	src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
    	src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php
    	src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php
    	src/Symfony/Bridge/Propel1/Tests/Propel1TestCase.php
    	src/Symfony/Component/Form/Tests/CompoundFormTest.php
    	src/Symfony/Component/HttpKernel/Kernel.php
    	src/Symfony/Component/Process/Process.php
  2. Merge branch '2.2' into 2.3

    fabpot committed Nov 23, 2013
    * 2.2:
      No Entity Manager defined exception
      fixed CS
      [Acl] Fix for issue #9433
      [Validator] fix docblock typos
      [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
      Fix mistake in translation's service definition.
      if handler_id is identical to null fix
      CS fix
      Fixed ModelChoiceList tests in Propel1 bridge.
      [AclProvider] Fix incorrect behaviour when partial results returned from cache
      Check if the pipe array is empty before calling stream_select()
      re-factor Propel1 ModelChoiceList
      [Locale] fixed the failing test described in #9455
      [Process] fix phpdoc and timeout of 0
      bug #9445 [BrowserKit] fixed protocol-relative url redirection
    
    Conflicts:
    	src/Symfony/Component/BrowserKit/Tests/ClientTest.php
    	src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php
  3. minor #9588 Add missing german translation for validators (Danez)

    fabpot committed Nov 23, 2013
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    Add missing german translation for validators
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9575
    | License       | MIT
    | Doc PR        |
    
    Some validators do not have german translation yet.
    
    Commits
    -------
    
    11fd126 Add german translation for several validators (Greater/Equal/Less)
  4. feature #9587 [SecurityBundle] Added csrf_token_generator and csrf_to…

    fabpot committed Nov 23, 2013
    …ken_id as new (shieldo)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [SecurityBundle] Added csrf_token_generator and csrf_token_id as new
    
    names for csrf_provider and intention options
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | #9176
    | License       | MIT
    | Doc PR        | n/a
    
    Commits
    -------
    
    f2f15f5 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new names for csrf_provider and intention options
  5. [SecurityBundle] Added csrf_token_generator and csrf_token_id as new

    shieldo committed Nov 22, 2013
    names for csrf_provider and intention options
  6. [DomCrawler] fixed a PHPDoc

    fabpot committed Nov 23, 2013
  7. feature #9578 [DomCrawler] Fixes `attr` method returning empty string…

    fabpot committed Nov 23, 2013
    … for missing attributes (aik099)
    
    This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #9578).
    
    Discussion
    ----------
    
    [DomCrawler] Fixes `attr` method returning empty string for missing attributes
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Bug discovered on Behat/MinkBrowserKitDriver#32.
    
    Commits
    -------
    
    51d23fa [DomCrawler] Fixes `attr` method returning empty string for missing attributes
  8. bug #9565 [Debug] Fixed ClassNotFoundFatalErrorHandler which could ca…

    fabpot committed Nov 23, 2013
    …use a fatal error (jakzal)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9104
    | License       | MIT
    | Doc PR        | -
    
    It might happen that `require_once` will include a file second time (for example with links or case-changed paths). Therefore we need to check if a class exists before requiring the file.
    
    I also removed an unused argument from two methods (`$loader`).
    
    Commits
    -------
    
    0baae4c [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error.
  9. bug #9525 Cache Warmup Breaks Namespaced Kernel (rdohms)

    fabpot committed Nov 23, 2013
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    Cache Warmup Breaks Namespaced Kernel
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | [yes]
    | New feature?  | [no]
    | BC breaks?    | [no]
    | Deprecations? | [no]
    | Tests pass?   | have not tried yet
    | License       | MIT
    | Fixed tickets | further fixes #1431
    
    My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.
    
    When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.
    
    However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.
    
    1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
    2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)
    
    The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.
    
    What are your thoughts on this? If this sounds reasonable i'll do further enhancements and check tests.
    
    Commits
    -------
    
    9e7788e Cache Warmup Breaks Namespaced Kernel
Commits on Nov 22, 2013
  1. [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fata…

    jakzal committed Nov 21, 2013
    …l error.
    
    It might happen that require_once will include a file second time (for
    example with links or case-changed paths). Therefore we need to check
    if a class exists before requiring the file.
  2. bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99)

    fabpot committed Nov 22, 2013
    This PR was merged into the 2.2 branch.
    
    Discussion
    ----------
    
    [BrowserKit] fixed protocol-relative url redirection
    
    Fixed redirects to protocol relative URLs, e.g. //www.example.org.  Previously the code would treat this as a relative URL.
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9445
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    e8b5c84 bug #9445 [BrowserKit] fixed protocol-relative url redirection
  3. minor #9487 unify constructor initialization style throughout symfony…

    fabpot committed Nov 22, 2013
    … (Tobion)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    unify constructor initialization style throughout symfony
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | n/a
    
    In almost all classes symfony uses property initialization when the value is static. Constructor initialization is only used for things that actually have logic, like passed parameters or dynamic values. IMHO it makes the code much more readable because property definition, phpdoc and default value is in one place. Also one can easily see what the constructor implements for logic like overridden default value of a parent class. Otherwise the real deal is just hidden behind 10 property initializations. One more advantage is that it requires less code. As you can see, the code was almost cut in half (210 additions and 395 deletions).
    I unified it accordingly across symfony. Sometimes it was [not even consistent within one class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Definition/BaseNode.php#L32). At the same time I recognized some errors like missing parent constructor call, or undefined properties or private properties that are not even used.
    
    I then realized that a few Kernel tests were not passing because they were deeply implementation specific like modifying booted flag with a custom `KernelForTest->setIsBooted();`. I improved and refactored the kernel tests in the __second commit__.
    
    __Third commit__ unifies short ternary operator, e.g. `$foo ?: new Foo()`. __Forth commit__ unifies missing parentheses, e.g. `new Foo()`.
    
    Commits
    -------
    
    077a089 unify missing parentheses
    2888594 unify short ternary operator
    2a9daff [HttpKernel] better written kernel tests
    111ac18 unify constructor initialization style throughout symfony
  4. bug #9535 No Entity Manager defined exception (armetiz)

    fabpot committed Nov 22, 2013
    This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9535).
    
    Discussion
    ----------
    
    No Entity Manager defined exception
    
    This PR is linked to this issue : symfony#9534
    
    Commits
    -------
    
    719ccb7 No Entity Manager defined exception
  5. No Entity Manager defined exception

    armetiz committed with fabpot Nov 19, 2013
  6. fixed CS

    fabpot committed Nov 22, 2013
  7. minor #9481 [HttpFoundation] fixed the issue described in #9480 (andr…

    fabpot committed Nov 22, 2013
    …emaha)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [HttpFoundation] fixed the issue described in #9480
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9480
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    7d35ce3 [HttpFoundation] fixed the issue described in #9480
  8. fixed CS

    fabpot committed Nov 22, 2013
  9. bug #9485 [Acl] Fix for issue #9433 (guilro)

    fabpot committed Nov 22, 2013
    This PR was squashed before being merged into the 2.2 branch (closes #9485).
    
    Discussion
    ----------
    
    [Acl] Fix for issue #9433
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9433
    | License       | MIT
    | Doc PR        |
    
    Two new test for issue #9433 :
    `testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()`
    `testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()`
    
    The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database.
    
    All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database.
    
    Commits
    -------
    
    a38fab9 [Acl] Fix for issue #9433
  10. [Acl] Fix for issue #9433

    guilro committed with fabpot Nov 9, 2013
  11. minor #9466 [Process] fix phpdoc and timeout of 0 (Tobion)

    fabpot committed Nov 22, 2013
    This PR was merged into the 2.2 branch.
    
    Discussion
    ----------
    
    [Process] fix phpdoc and timeout of 0
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | n/a
    
    getTimeout says it returns null when it's disabled. But passing 0 or 0.0 also disabled timeouts. So it should be treated as null as well. also it says it returns integer whereas it returns float.
    
    Commits
    -------
    
    1758010 [Process] fix phpdoc and timeout of 0
  12. bug #9516 [AclProvider] Fix incorrect behavior when partial results r…

    fabpot committed Nov 22, 2013
    …eturned from cache (superdav42)
    
    This PR was merged into the 2.2 branch.
    
    Discussion
    ----------
    
    [AclProvider] Fix incorrect behavior when partial results returned from cache
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9515
    | License       | MIT
    | Doc PR        | none
    
    [AclProvider] Fix incorrect behavior when partial results returned from cache
    
    findAcls wasn't throwing the NotAllAclsFoundException with the partial result when some acls were retrieved from the cache. This will fix that behavior. Ideally we would update it to cache items that were not found so it wouldn't have to query the db every time for non existent items, but I'm not sure if that is possible.
    I'm not sure if the ACL cache is being used very much, I didn't find any docs about it but it seems to work except for this issue. It might be more appropriate to merge the fix in master if no one is relying on it to work in 2.2.
    
    Commits
    -------
    
    edae59c [AclProvider] Fix incorrect behaviour when partial results returned from cache
  13. minor #9554 [DependencyInjection] removed the unused Reference and Pa…

    fabpot committed Nov 22, 2013
    …rameter classes use statements from the compiled container class (hhamon)
    
    This PR was merged into the 2.2 branch.
    
    Discussion
    ----------
    
    [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    7730d8d [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
  14. minor #9542 unify and fix callable phpdoc throughout symfony (Tobion)

    fabpot committed Nov 22, 2013
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    unify and fix callable phpdoc throughout symfony
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | n/a
    
    I unified the phpdoc to use "callable" as type. It wasn't done consistently. It varied between mixed, callback, callable.
    I think callable is best because php 5.4 even has a typehint callable.
    
    Commits
    -------
    
    6d5ddce unify and fix callable phpdoc throughout symfony
  15. feature #9546 [FrameworkBundle] use the new request_stack service in …

    fabpot committed Nov 22, 2013
    …the GlobalVariables object (hhamon)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] use the new request_stack service in the GlobalVariables object
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    9c2ce49 [FrameworkBundle] use the new request_stack object in the GlobalVariables object
  16. bug #9566 [Console] Revert BC-break for verbose option value (chEbba)

    fabpot committed Nov 22, 2013
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [Console] Revert BC-break for verbose option value
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #9285
    | License       | MIT
    | Doc PR        | ~
    
    Closes #9285
    
    ----
    
    PR #8835 "fixed" the input value for verbosity option with `VALUE_OPTIONAL`. And syntax like
    ```
    cli.php -v command
    cli.php --verbose command
    ```
    Is broken now, because `ArgvInput` tries to use argument as verbose value (#9285).
    For now i added a test for this case and revert this changes.
    
    Commits
    -------
    
    432bbe1 [Console] Revert a28eb8 because of BC break
    5e03e9a [Console] Add test for --verbose before argument
  17. minor #9563 [Security] optimized ExpressionVoter (fabpot)

    fabpot committed Nov 22, 2013
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [Security] optimized ExpressionVoter
    
    Commits
    -------
    
    a8c74d1 [Security] optimized ExpressionVoter
Commits on Nov 21, 2013
  1. bug #9553 [FrameworkBundle] use the new request_stack service to get …

    fabpot committed Nov 21, 2013
    …the Request object in the base Controller class (hhamon)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | ~
    | License       | MIT
    | Doc PR        | ~
    
    Commits
    -------
    
    2e07338 [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class
  2. [FrameworkBundle] use the new request_stack service to get the Reques…

    hhamon committed Nov 20, 2013
    …t object in the base Controller class
  3. feature #9541 [Translation] make IdentityTranslater consistent with n…

    fabpot committed Nov 21, 2013
    …ormal translator (Tobion)
    
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    [Translation] make IdentityTranslater consistent with normal translator
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | n/a
    
    The MessageSelector should not be required in the constructor of the IdentityTranslator because it's also optional for the [Translator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Translator.php#L64).
    I also fixed the TranslatorInterface phpdoc and the IdentityTranslator params similar to symfony@90a20d7
    
    Commits
    -------
    
    7cdb260 [Translation] make IdentityTranslater consistent with normal translator
  4. minor #9540 [Security] Added a missing field in SimpleAuthenticationH…

    fabpot committed Nov 21, 2013
    …andler (jakzal)
    
    This PR was squashed before being merged into the master branch (closes #9540).
    
    Discussion
    ----------
    
    [Security] Added a missing field in SimpleAuthenticationHandler
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | -
    | License       | MIT
    | Doc PR        | -
    
    Added tests and made a small CS fix as a bonus.
    
    Btw, the properties are protected. Do we really want to provide extension points here?
    
    Commits
    -------
    
    d553347 [Security] Added a missing field in SimpleAuthenticationHandler