Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 2, 2015
  1. @nicolas-grekas

    Merge branch '2.7' into 2.8

    nicolas-grekas authored
    * 2.7:
      [Locale] Fix Intl requirement
      Better Iban Validation
    
    Conflicts:
    	src/Symfony/Component/Locale/composer.json
    	src/Symfony/Component/Validator/Constraints/Iban.php
  2. @nicolas-grekas

    Fix "[Form] Add flexibility for EntityType"

    nicolas-grekas authored
    This fixes commit e0a1294.
  3. @Tobion

    minor #15429 Remove the duplicated rendering of deprecation messages …

    Tobion authored
    …in the profiler (stof)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    Remove the duplicated rendering of deprecation messages in the profiler
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | n/a
    
    The issue was already fixed in the 2.7 branch in #14990 but the fix was lost in 2.8 because of a wrong conflict resolution when merging branches.
    
    Commits
    -------
    
    4fefd3d Remove the duplicated rendering of deprecation messages in the profiler
Commits on Aug 1, 2015
  1. @stof
  2. @nicolas-grekas
  3. @fabpot

    bug #13828 [Validator] Improve Iban Validation (afurculita)

    fabpot authored
    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [Validator] Improve Iban Validation
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #13802
    | License       | MIT
    | Doc PR        |
    
    This PR adds 2 more checks for better IBAN validation: the validation of the country code (represented by the first 2 letters) and the format validation according to the country format regex based on http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf.
    
    Commits
    -------
    
    07b38de Better Iban Validation
  4. @fabpot

    feature #13990 [Form] Add flexibility for EntityType (raziel057)

    fabpot authored
    This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #13990).
    
    Discussion
    ----------
    
    [Form] Add flexibility for EntityType
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Sometimes it can be usefull to return null rather than a QueryBuilder from the closure attached to the ``query_builder`` attribute of an EntityType.
    
    For example, if I have the following method in a "DelegateRepository", which can return a QueryBuilder or null:
    
    ```php
    public function getQbForOfficers()
    {
        $permanentMeeting = $this->getEntityManager()->getRepository('MyBundle:PermanentMeeting')->findOneBy(array());
    
        if ($permanentMeeting === null || $permanentMeeting->getMeeting() === null) {
            return null;
        }
    
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->select('p')
            ->from('MyBundle:Delegate', 'p')
            ->andWhere('p.meeting = :meetingId')
            ->setParameter('meetingId', $permanentMeeting->getMeeting()->getId());
    
        return $qb;
    }
    ```
    
    To be able to present a list without entries when creating an entity field like this:
    
    ```php
    $event->getForm()->add('officers', 'entity', array(
    	'class' => 'MyBundle:Delegate',
    	'property' => 'fullName',
    	'query_builder' => function(EntityRepository $er) use ($meeting, $delegationId) {
    	    return $er->getQbForOfficers();
    	}
    )));
    ```
    
    Rather than using the "choices" attributes (more verbose and which requires the injection of the entityManager):
    
    ```php
    $qb = $this->entityManager->getRepository('PTCNoventoBundle:Delegate')->getQbForOfficers();
    
    $officers = ($qb !== null) ? $qb->getQuery()->getResult() : array();
    
    $event->getForm()->add('officers', 'entity', array(
    	'class' => 'PTCNoventoBundle:Delegate',
    	'property' => 'fullName',
    	'choices' => $officers,
    ));
    ```
    
    Commits
    -------
    
    e0a1294 [Form] Add flexibility for EntityType
  5. @raziel057 @fabpot

    [Form] Add flexibility for EntityType

    raziel057 authored fabpot committed
  6. @fabpot

    feature #15382 [Console] Use readline for user input when available #…

    fabpot authored
    …DX (michaelperrin)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Console] Use readline for user input when available #DX
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Given I am entering data in an user input
    When I use left and right keys to make some changes in what I have typed
    Then the cursor should move accordingly instead of adding characters at the end of the line
    
    To make it simple: using the arrow keys (←  →)  to make changes to what I already typed would be much handier than getting `^[[D` and `^[[C` characters in the terminal and having to delete all chars to type everything again.
    
    I could not add any extra tests to this as the STDIN can't be used during tests. But they are not breaking and I tried again all types of questions (text, choices, hidden) by myself.
    
    Note that `readline` can't be used for hidden questions, as `stty -echo` is not taken into account.
    
    Commits
    -------
    
    0534899 [Console] Fix Symfony coding standards violations
    8b63d62 [Console] Use readline for user input when available
  7. @michaelperrin
  8. @michaelperrin

    [Console] Use readline for user input when available

    michaelperrin authored michaelperrin committed
    This allows to use arrow keys in the terminal instead of having weird characters
  9. @nicolas-grekas

    Merge branch '2.7' into 2.8

    nicolas-grekas authored
    * 2.7:
      [Locale] Add missing @group legacy annotations
      Fix security-acl deps
      Fix doctrine mapping validation type error
      Remove skipping of tests based on ICU data version whenever possible
      Fix the handling of null as locale in the stub intl classes
      do not dump leading backslashes in class names
      fix issue #15377
      Skip ::class constant
      [Config] type specific check for emptiness
    
    Conflicts:
    	src/Symfony/Bridge/Twig/composer.json
    	src/Symfony/Bundle/SecurityBundle/composer.json
    	src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
    	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
    	src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
  10. @nicolas-grekas
  11. @nicolas-grekas
  12. @nicolas-grekas
  13. @afurculita

    Better Iban Validation

    afurculita authored
    Added more country-based tests, added new error type
    
    The error type `NOT_SUPPORTED_COUNTRY_CODE_ERROR` has been added for the
    IBANs from unsupported countries, for which we don't have defined a
    format. We will not check anymore if a country code against the Intl
    component.
    The tests have been completed with more tests for each contry we have
    formats defined.
    
    The  4 character length check and the case check has been removed. The message code constants
    
    `TOO_SHORT_ERROR` and `INVALID_CASE_ERROR` has been deprecated
  14. @nicolas-grekas

    Merge branch '2.3' into 2.7

    nicolas-grekas authored
    * 2.3:
      Fix security-acl deps
      Fix doctrine mapping validation type error
      Remove skipping of tests based on ICU data version whenever possible
      Fix the handling of null as locale in the stub intl classes
      do not dump leading backslashes in class names
      Skip ::class constant
      [Config] type specific check for emptiness
    
    Conflicts:
    	src/Symfony/Bridge/Twig/composer.json
    	src/Symfony/Bundle/SecurityBundle/composer.json
    	src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
    	src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
    	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
    	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php
    	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
    	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
    	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
    	src/Symfony/Component/Locale/Tests/LocaleTest.php
    	src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
    	src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
    	src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
  15. @nicolas-grekas

    Fix security-acl deps

    nicolas-grekas authored
  16. @fabpot

    minor #15412 Remove skipping of tests based on ICU data version whene…

    fabpot authored
    …ver possible (stof)
    
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    Remove skipping of tests based on ICU data version whenever possible
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | n/a
    
    Many tests being skipped based on the ICU data version don't actually need it. They might be testing code paths not relying on Intl, or not performing assertions on the values depending on the ICU data and so not dependant on the exact ICU version being used.
    
    this is somewhat related to #14259 as it allows to reduce the number of tests not running on Travis.
    
    Commits
    -------
    
    7994513 Remove skipping of tests based on ICU data version whenever possible
  17. @fabpot

    bug #15380 do not dump leading backslashes in class names (xabbuh)

    fabpot authored
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    do not dump leading backslashes in class names
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #15001
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    ad6cb10 do not dump leading backslashes in class names
  18. @fabpot

    bug #15376 [ClassMapGenerator] Skip ::class constant (WouterJ)

    fabpot authored
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    [ClassMapGenerator] Skip ::class constant
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #15351
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    a336f0e Skip ::class constant
  19. @nicolas-grekas

    Fix typo

    nicolas-grekas authored
  20. @fabpot

    feature #15013 [Security] Removed security-acl from the core (iltar)

    fabpot authored
    This PR was squashed before being merged into the 2.8 branch (closes #15013).
    
    Discussion
    ----------
    
    [Security] Removed security-acl from the core
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | part of #14718
    | License       | MIT
    | Doc PR        | ~
    
    The `Security\Acl` is removed from the core and is loaded from its own repository. All tests were passing and this is fully backwards compatible. I have removed all but the Test files in the first step and added the dependency to verify the Test were still working with the package dependency. The second step was to remove the remaining test files and tests are still running for both the Bundle and the Framework. Once the Read-Only repository is a full standalone repository, this PR can be merged.
    
    - [x] Remove component from the core
    - [ ] Remove read-only from https://github.com/symfony/security-acl
    
    Once this PR is merged, I can start working on splitting the SecurityBundle and extracting the ACL part to the AclBundle.
    
    /cc @fabpot
    
    Commits
    -------
    
    b26a449 [Security] Removed security-acl from the core
  21. @iltar @fabpot

    [Security] Removed security-acl from the core

    iltar authored fabpot committed
  22. @fabpot

    bug #15389 [securityBundle] Compare roles strictly when computing inh…

    fabpot authored
    …erited roles (bokonet)
    
    This PR was merged into the 2.7 branch.
    
    Discussion
    ----------
    
    [securityBundle] Compare roles strictly when computing inherited roles
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #15377
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    5179acc fix issue #15377
  23. @fabpot

    fixed typos

    fabpot authored
  24. @fabpot

    feature #15079 [Form] Deprecated FormTypeInterface::getName() and pas…

    fabpot authored
    …sing of type instances (webmozart)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Form] Deprecated FormTypeInterface::getName() and passing of type instances
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | #5321, #15008
    | License       | MIT
    | Doc PR        | TODO
    
    #### Type Names
    
    This PR deprecates the definition of the `getName()` method of form types. See #15008 for a more detailed description.
    
    Before:
    
    ```php
    class MyType extends AbstractType
    {
        public function getName()
        {
            return 'mytype';
        }
    
        // ...
    }
    ```
    
    After:
    
    ```php
    class MyType extends AbstractType
    {
        // ...
    }
    ```
    
    You should always reference other types by their fully-qualified class names. Thanks to PHP 5.5, that's easy:
    
    Before:
    
    ```php
    $form = $this->createFormBuilder()
        ->add('name', 'text')
        ->add('age', 'integer')
        ->getForm();
    ```
    
    After:
    
    ```php
    $form = $this->createFormBuilder()
        ->add('name', TextType::class)
        ->add('age', IntegerType::class)
        ->getForm();
    ```
    
    #### Type Instances
    
    Furthermore, passing of type instances is deprecated.
    
    Before:
    
    ```php
    $form = $this->createForm(new AuthorType());
    ```
    
    After:
    
    ```php
    $form = $this->createForm(AuthorType::class);
    ```
    
    #### DIC Aliases
    
    When registering a type in the DIC, you should omit the "alias" attribute now.
    
    Before:
    
    ```xml
    <service id="my.type" class="Vendor\Type\MyType">
        <tag name="form.type" alias="mytype" />
        <argument type="service" id="some.service.id" />
    </service>
    ```
    
    After:
    
    ```xml
    <service id="my.type" class="Vendor\Type\MyType">
        <tag name="form.type" />
        <argument type="service" id="some.service.id" />
    </service>
    ```
    
    Types without dependencies don't need to be registered in the DIC as they can be instantiated right away.
    
    #### Template Block Prefixes
    
    By default, the class name of the type in underscore notation minus "Type" suffix is used as Twig template block prefix (e.g. `UserProfileType` => `user_profile_*`). If you want to customize that, overwrite the new `getBlockPrefix()` method in your type:
    
    ```php
    class UserProfileType extends AbstractType
    {
        public function getBlockPrefix()
        {
            return 'profile';
        }
    
        // ...
    }
    ```
    
    Commits
    -------
    
    3d9e5de [Form] Deprecated FormTypeInterface::getName() and passing of type instances
  25. @fabpot

    feature #15418 [Debug] Deprecate ExceptionHandler::createResponse (ni…

    fabpot authored
    …colas-grekas)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Debug] Deprecate ExceptionHandler::createResponse
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets | #15414
    | License       | MIT
    | Doc PR        | -
    
    This does deprecate a behavior that might be specialized by someone somewhere, but I seriously doubt anyone did. It complicated the implementation for no gain IMHO.
    
    Commits
    -------
    
    a4d2d31 [Debug] Deprecate ExceptionHandler::createResponse
  26. @nicolas-grekas
  27. @nicolas-grekas

    Merge branch '2.7' into 2.8

    nicolas-grekas authored
    * 2.7:
      [Debug] cleanup ExceptionHandlerTest
      bumped Symfony version to 2.7.4
      updated VERSION for 2.7.3
      updated CHANGELOG for 2.7.3
      fixed typo in translation keys
      Fix the return value on error for intl methods returning arrays
      Fix merge
      Fix missing _route parameter notice in RouterListener logging case
    
    Conflicts:
    	src/Symfony/Component/Debug/composer.json
    	src/Symfony/Component/HttpKernel/Kernel.php
  28. @fabpot

    feature #15123 [2.8][FrameworkBundle] Allow parameter use_cookies in …

    fabpot authored
    …session configuration (derrabus)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [2.8][FrameworkBundle] Allow parameter use_cookies in session configuration
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #13668
    | License       | MIT
    | Doc PR        | none
    
    This PR adds support for the `use_cookies` parameter to the session configuration of Symfony's FrameworkBundle. It is a rebase of #13671 against the 2.8 branch.
    
    Commits
    -------
    
    08bf50a Allow parameter use_cookies in session configuration.
  29. @fabpot

    feature #14987 [FrameworkBundle] Configurable Serializer name convert…

    fabpot authored
    …er (dunglas)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Configurable Serializer name converter
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | n/a
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#5483
    
    - [x] Add tests
    
    Commits
    -------
    
    e500a71 [FrameworkBundle] Configurable Serializer name converter
  30. @fabpot

    feature #15285 [Config] deprecate cannotBeEmpty() for boolean and num…

    fabpot authored
    …eric nodes (xabbuh)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [Config] deprecate cannotBeEmpty() for boolean and numeric nodes
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | yes
    | Tests pass?   | yes
    | Fixed tickets |
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    d4473f3 [Config] deprecate cannotBeEmpty() for boolean and numeric nodes
  31. @fabpot

    bug #15170 [Config] type specific check for emptiness (xabbuh)

    fabpot authored
    This PR was merged into the 2.3 branch.
    
    Discussion
    ----------
    
    [Config] type specific check for emptiness
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | no
    | BC breaks?    | no
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #13736
    | License       | MIT
    | Doc PR        |
    
    Commits
    -------
    
    0199fbf [Config] type specific check for emptiness
  32. @fabpot

    feature #15372 [FrameworkBundle] Change the default value of cookie_h…

    fabpot authored
    …ttponly (jderusse)
    
    This PR was merged into the 2.8 branch.
    
    Discussion
    ----------
    
    [FrameworkBundle] Change the default value of cookie_httponly
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | yes
    | Deprecations? | no
    | Tests pass?   | yes
    | Fixed tickets | #15303
    | License       | MIT
    | Doc PR        | symfony/symfony-docs#5561
    
    Commits
    -------
    
    a7bef1e Change the default value of cookie_httponly to fix #15303
Something went wrong with that request. Please try again.