This PR was merged into the 2.3 branch.
Discussion
----------
[travis] Build standalone phpunit without symfony/yaml
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
phpunit mixed as a dependency does not work at all. Let's build it standalone, without symfony/yaml.
Commits
-------
4dd0de6 [travis] Build standalone phpunit without symfony/yaml
* 2.7:
Clean wrong whitespaces
[travis] Build phpunit with local components
do not remove space between attributes
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
Fix the retrieval of the default value for variadic arguments
Annotated routes with a variadic parameter
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
Update EngineInterface.php
let Travis builds fail when PHP 7 jobs fail
Conflicts:
.travis.yml
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Added a way to define the priority of service decoration
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10634
| License | MIT
| Doc PR | symfony/symfony-docs#5600
This PR adds a way to define the priority of service decoration, so, the service with the highest priority will be applied first (the default priority is zero).
```yaml
services:
foo:
class: Foo
bar:
class: Bar
arguments: ['@bar.inner']
decorates: foo
public: false
foobar:
class: Foobar
arguments: ['@foobar.inner']
decorates: foo
decoration_priority: 1
public: false
```
This will result in this code:
```php
$this->services['foo'] = new Bar(new Foobar(new Foo)));
```
Commits
-------
75c98cb Added a way to define the priority of service decoration
* 2.3:
Clean wrong whitespaces
[travis] Build phpunit with local components
do not remove space between attributes
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
Fix the retrieval of the default value for variadic arguments
Annotated routes with a variadic parameter
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
Update EngineInterface.php
let Travis builds fail when PHP 7 jobs fail
Conflicts:
.travis.yml
src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
This PR was merged into the 2.3 branch.
Discussion
----------
let Travis builds fail when PHP 7 jobs fail
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ecc3df5 let Travis builds fail when PHP 7 jobs fail
This PR was merged into the 2.3 branch.
Discussion
----------
[travis] Build phpunit with local components
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086
| License | MIT
| Doc PR | -
The tests for PHP7 currently fail because travis ships with a phar phpunit that embeds the yaml components. This one takes priority over the one in the repo. But it is outdated.
The issue arose with PHP7 tests but could have happen with any build.
Commits
-------
ce2a371 [travis] Build phpunit with local components
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Handle false return value from readline
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Following #15382 and as @stof mentioned, the `false` value can be returned by `readline()` and should be handled. This fixes the problem.
Commits
-------
f5ca270 [Console] Handle false return value from readline
This PR was merged into the 2.3 branch.
Discussion
----------
do not remove space between attributes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.
Commits
-------
8d2b888 do not remove space between attributes
This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.
This PR was squashed before being merged into the 2.3 branch (closes#15263).
Discussion
----------
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
| Q | A
| ------------- | ---
| Fixed tickets | #15262
| License | MIT
'proxy-revalidate' is not a header on its own but a 'Cache-Control' directive
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
Commits
-------
6c22f0a [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
This PR was squashed before being merged into the 2.8 branch (closes#15433).
Discussion
----------
Allow to define Enum nodes with 1 single element
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15402
| License | MIT
| Doc PR | -
Commits
-------
68f0818 Allow to define Enum nodes with 1 single element
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 https://github.com/symfony/symfony/pull/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
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13690
| License | MIT
| Doc PR | n/a
This takes the test submitted in #13690 and implements the fix for this bug
Commits
-------
73c5eff Fix the retrieval of the default value for variadic arguments
9b7d4c7 Annotated routes with a variadic parameter
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#15074).
Discussion
----------
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15050
| License | MIT
| Doc PR |
Commits
-------
c314659 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#15080).
Discussion
----------
Update EngineInterface.php
Grammer in doc comment.
Commits
-------
d60b2bb Update EngineInterface.php
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 | https://github.com/symfony/symfony/issues/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
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
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
* 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
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
* 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