8000 Merge branch '2.8' into 3.1 · src-run/symfony@2e6618b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e6618b

Browse files
Merge branch '2.8' into 3.1
* 2.8: [ci] Testing with UTC hides bugs [DI] Fix error when trying to resolve a DefinitionDecorator [DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider [Validator] improve and added more Indonesian translation.
2 parents 74aa126 + 546ec68 commit 2e6618b

30 files changed

+144
-87
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ before_install:
5151
# A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line
5252
- if [[ ! $deps && $PHP = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi
5353
- if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
54+
- if [[ ! $skip ]]; then echo date.timezone = Europe/Paris >> $INI_FILE; fi
5455
- if [[ ! $skip ]]; then echo memory_limit = -1 >> $INI_FILE; fi
5556
- if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi
5657
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi

UPGRADE-3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ UPGRADE FROM 2.x to 3.0
253253
closures, but the closure is now resolved in the type instead of in the
254254
loader.
255255

256+
* Using the entity provider with a Doctrine repository implementing `UserProviderInterface` is not supported anymore.
257+
You should make the repository implement `UserLoaderInterface` instead.
258+
256259
### EventDispatcher
257260

258261
* The method `getListenerPriority($eventName, $listener)` has been added to the

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ install:
2929
- cd ..
3030
- copy /Y php.ini-development php.ini-min
3131
- echo max_execution_time=1200 >> php.ini-min
32-
- echo date.timezone="UTC" >> php.ini-min
32+
- echo date.timezone="America/Los_Angeles" >> php.ini-min
3333
- echo extension_dir=ext >> php.ini-min
3434
- copy /Y php.ini-min php.ini-max
3535
- echo extension=php_openssl.dll >> php.ini-max

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ CHANGELOG
1818
* removed passing a query builder closure to `ORMQueryBuilderLoader`
1919
* removed `loader` and `property` options of the `DoctrineType`
2020

21+
2.8.0
22+
-----
23+
24+
* deprecated using the entity provider with a Doctrine repository implementing UserProviderInterface
25+
* added UserLoaderInterface for loading users through Doctrine.
26+
2127
2.7.0
2228
-----
2329

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,10 @@ public function findDefinition($id)
794794
*/
795795
private function createService(Definition $definition, $id, $tryProxy = true)
796796
{
797+
if ('Symfony\Component\DependencyInjection\Definition' !== get_class($definition)) {
798+
throw new RuntimeException(sprintf('Constructing service "%s" from a %s is not supported at build time.', $id, get_class($definition)));
799+
}
800+
797801
if ($definition->isSynthetic()) {
798802
throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
799803
}

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\DependencyInjection\ContainerBuilder;
2020
use Symfony\Component\DependencyInjection\ContainerInterface;
2121
use Symfony\Component\DependencyInjection\Definition;
22+
use Symfony\Component\DependencyInjection\DefinitionDecorator;
2223
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
2324
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
2425
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
@@ -380,6 +381,20 @@ public function testResolveServices()
380381
$this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions');
381382
}
382383

384+
/**
385+
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
386+
* @expectedExceptionMessage Constructing service "foo" from a Symfony\Component\DependencyInjection\DefinitionDecorator is not supported at build time.
387+
*/
388+
public function testResolveServicesWithDecoratedDefinition()
389+
{
390+
$builder = new ContainerBuilder();
391+
$builder->setDefinition('grandpa', new Definition('stdClass'));
392+
$builder->setDefinition('parent', new DefinitionDecorator('grandpa'));
393+
$builder->setDefinition('foo', new DefinitionDecorator('parent'));
394+
395+
$builder->get('foo');
396+
}
397+
383398
public function testMerge()
384399
{
385400
$container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo')));

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testTransformWithRounding($input, $output, $roundingMode)
8787
public function testReverseTransform()
8888
{
8989
// Since we test against "de_AT", we need the full implementation
90-
IntlTestHelper::requireFullIntl($this);
90+
IntlTestHelper::requireFullIntl($this, false);
9191

9292
\Locale::setDefault('de_AT');
9393

@@ -109,7 +109,7 @@ public function testReverseTransformEmpty()
109109
public function testReverseTransformWithGrouping()
110110
{
111111
// Since we test against "de_DE", we need the full implementation
112-
IntlTestHelper::requireFullIntl($this);
112+
IntlTestHelper::requireFullIntl($this, false);
113113

114114
\Locale::setDefault('de_DE');
115115

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MoneyToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase
1919
public function testTransform()
2020
{
2121
// Since we test against "de_AT", we need the full implementation
22-
IntlTestHelper::requireFullIntl($this);
22+
IntlTestHelper::requireFullIntl($this, false);
2323

2424
\Locale::setDefault('de_AT');
2525

@@ -47,7 +47,7 @@ public function testTransformEmpty()
4747
public function testReverseTransform()
4848
{
4949
// Since we test against "de_AT", we need the full implementation
50-
IntlTestHelper::requireFullIntl($this);
50+
IntlTestHelper::requireFullIntl($this, false);
5151

5252
\Locale::setDefault('de_AT');
5353

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function provideTransformations()
4242
public function testTransform($from, $to, $locale)
4343
{
4444
// Since we test against other locales, we need the full implementation
45-
IntlTestHelper::requireFullIntl($this);
45+
IntlTestHelper::requireFullIntl($this, false);
4646

4747
\Locale::setDefault($locale);
4848

@@ -68,7 +68,7 @@ public function provideTransformationsWithGrouping()
6868
public function testTransformWithGrouping($from, $to, $locale)
6969
{
7070
// Since we test against other locales, we need the full implementation
71-
IntlTestHelper::requireFullIntl($this);
71+
IntlTestHelper::requireFullIntl($this, false);
7272

7373
\Locale::setDefault($locale);
7474

@@ -80,7 +80,7 @@ public function testTransformWithGrouping($from, $to, $locale)
8080
public function testTransformWithScale()
8181
{
8282
// Since we test against "de_AT", we need the full implementation
83-
IntlTestHelper::requireFullIntl($this);
83+
IntlTestHelper::requireFullIntl($this, false);
8484

8585
\Locale::setDefault('de_AT');
8686

@@ -185,7 +185,7 @@ public function transformWithRoundingProvider()
185185
public function testTransformWithRounding($scale, $input, $output, $roundingMode)
186186
{
187187
// Since we test against "de_AT", we need the full implementation
188-
IntlTestHelper::requireFullIntl($this);
188+
IntlTestHelper::requireFullIntl($this, false);
189189

190190
\Locale::setDefault('de_AT');
191191

@@ -197,7 +197,7 @@ public function testTransformWithRounding($scale, $input, $output, $roundingMode
197197
public function testTransformDoesNotRoundIfNoScale()
198198
{
199199
// Since we test against "de_AT", we need the full implementation
200-
IntlTestHelper::requireFullIntl($this);
200+
IntlTestHelper::requireFullIntl($this, false);
201201

202202
\Locale::setDefault('de_AT');
203203

@@ -212,7 +212,7 @@ public function testTransformDoesNotRoundIfNoScale()
212212
public function testReverseTransform($to, $from, $locale)
213213
{
214214
// Since we test against other locales, we need the full implementation
215-
IntlTestHelper::requireFullIntl($this);
215+
IntlTestHelper::requireFullIntl($this, false);
216216

217217
\Locale::setDefault($locale);
218218

@@ -227,7 +227,7 @@ public function testReverseTransform($to, $from, $locale)
227227
public function testReverseTransformWithGrouping($to, $from, $locale)
228228
{
229229
// Since we test against other locales, we need the full implementation
230-
IntlTestHelper::requireFullIntl($this);
230+
IntlTestHelper::requireFullIntl($this, false);
231231

232232
\Locale::setDefault($locale);
233233

@@ -242,7 +242,7 @@ public function testReverseTransformWithGrouping($to, $from, $locale)
242242
public function testReverseTransformWithGroupingAndFixedSpaces()
243243
{
244244
// Since we test against other locales, we need the full implementation
245-
IntlTestHelper::requireFullIntl($this);
245+
IntlTestHelper::requireFullIntl($this, false);
246246

247247
\Locale::setDefault('ru');
248248

@@ -254,7 +254,7 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
254254
public function testReverseTransformWithGroupingButWithoutGroupSeparator()
255255
{
256256
// Since we test against "de_AT", we need the full implementation
257-
IntlTestHelper::requireFullIntl($this);
257+
IntlTestHelper::requireFullIntl($this, false);
258258

259259
\Locale::setDefault('de_AT');
260260

@@ -374,7 +374,7 @@ public function testReverseTransformDoesNotRoundIfNoScale()
374374
public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
375375
{
376376
// Since we test against other locales, we need the full implementation
377-
IntlTestHelper::requireFullIntl($this);
377+
IntlTestHelper::requireFullIntl($this, false);
378378

379379
\Locale::setDefault('fr');
380380
$transformer = new NumberToLocalizedStringTransformer(null, true);
@@ -394,7 +394,7 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
394394
public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
395395
{
396396
// Since we test against "de_DE", we need the full implementation
397-
IntlTestHelper::requireFullIntl($this);
397+
IntlTestHelper::requireFullIntl($this, false);
398398

399399
\Locale::setDefault('de_DE');
400400

@@ -409,7 +409,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
409409
public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep()
410410
{
411411
// Since we test against "de_DE", we need the full implementation
412-
IntlTestHelper::requireFullIntl($this);
412+
IntlTestHelper::requireFullIntl($this, false);
413413

414414
\Locale::setDefault('de_DE');
415415

@@ -421,7 +421,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGro
421421
public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed()
422422
{
423423
// Since we test against other locales, we need the full implementation
424-
IntlTestHelper::requireFullIntl($this);
424+
IntlTestHelper::requireFullIntl($this, false);
425425

426426
\Locale::setDefault('fr');
427427
$transformer = new NumberToLocalizedStringTransformer();
@@ -433,7 +433,7 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupin
433433
public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma()
434434
{
435435
// Since we test against other locales, we need the full implementation
436-
IntlTestHelper::requireFullIntl($this);
436+
IntlTestHelper::requireFullIntl($this, false);
437437

438438
\Locale::setDefault('bg');
439439
$transformer = new NumberToLocalizedStringTransformer(null, true);
@@ -585,7 +585,7 @@ public function testReverseTransformDisallowsCenteredExtraCharacters()
585585
public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
586586
{
587587
// Since we test against other locales, we need the full implementation
588-
IntlTestHelper::requireFullIntl($this);
588+
IntlTestHelper::requireFullIntl($this, false);
589589

590590
\Locale::setDefault('ru');
591591

@@ -601,7 +601,7 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
601601
public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage()
602602
{
603603
// Since we test against other locales, we need the full implementation
604-
IntlTestHelper::requireFullIntl($this);
604+
IntlTestHelper::requireFullIntl($this, false);
605605

606606
\Locale::setDefault('ru');
607607

@@ -628,7 +628,7 @@ public function testReverseTransformDisallowsTrailingExtraCharacters()
628628
public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
629629
{
630630
// Since we test against other locales, we need the full implementation
631-
IntlTestHelper::requireFullIntl($this);
631+
IntlTestHelper::requireFullIntl($this, false);
632632

633633
\Locale::setDefault('ru');
634634

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testTransformWithInteger()
5353
public function testTransformWithScale()
5454
{
5555
// Since we test against "de_AT", we need the full implementation
56-
IntlTestHelper::requireFullIntl($this);
56+
IntlTestHelper::requireFullIntl($this, false);
5757

5858
\Locale::setDefault('de_AT');
5959

@@ -92,7 +92,7 @@ public function testReverseTransformWithInteger()
9292
public function testReverseTransformWithScale()
9393
{
9494
// Since we test against "de_AT", we need the full implementation
95-
IntlTestHelper::requireFullIntl($this);
95+
IntlTestHelper::requireFullIntl($this, false);
9696

9797
\Locale::setDefault('de_AT');
9898

src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CountryTypeTest extends TestCase
1919
{
2020
protected function setUp()
2121
{
22-
IntlTestHelper::requireIntl($this);
22+
IntlTestHelper::requireIntl($this, false);
2323

2424
parent::setUp();
2525
}

src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CurrencyTypeTest extends TestCase
1919
{
2020
protected function setUp()
2121
{
22-
IntlTestHelper::requireIntl($this);
22+
IntlTestHelper::requireIntl($this, false);
2323

2424
parent::setUp();
2525
}

0 commit comments

Comments
 (0)
0