8000 Merge branch '2.7' into 2.8 · devrck/symfony@546ec68 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 546ec68

Browse files
Merge branch '2.7' into 2.8
* 2.7: [ci] Testing with UTC hides bugs [DI] Fix error when trying to resolve a DefinitionDecorator [Validator] improve and added more Indonesian translation.
2 parents d987c40 + e968d0f commit 546ec68

29 files changed

+136
-88
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ before_install:
4747
# A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line
4848
- 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
4949
- if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
50+
- if [[ ! $skip ]]; then echo date.timezone = Europe/Paris >> $INI_FILE; fi
5051
- if [[ ! $skip ]]; then echo memory_limit = -1 >> $INI_FILE; fi
5152
- if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi
5253
- if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi

appveyor.yml

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

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,10 @@ public function findDefinition($id)
859859
*/
860860
public function createService(Definition $definition, $id, $tryProxy = true)
861861
{
862+
if ('Symfony\Component\DependencyInjection\Definition' !== get_class($definition)) {
863+
throw new RuntimeException(sprintf('Constructing service "%s" from a %s is not supported at build time.', $id, get_class($definition)));
864+
}
865+
862866
if ($definition->isSynthetic()) {
863867
throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
864868
}

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\InactiveScopeException;
2425
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
@@ -430,6 +431,20 @@ public function testResolveServices()
430431
$this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions');
431432
}
432433

434+
/**
435< 10000 /code>+
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
436+
* @expectedExceptionMessage Constructing service "foo" from a Symfony\Component\DependencyInjection\DefinitionDecorator is not supported at build time.
437+
*/
438+
public function testResolveServicesWithDecoratedDefinition()
439+
{
440+
$builder = new ContainerBuilder();
441+
$builder->setDefinition('grandpa', new Definition('stdClass'));
442+
$builder->setDefinition('parent', new DefinitionDecorator('grandpa'));
443+
$builder->setDefinition('foo', new DefinitionDecorator('parent'));
444+
445+
$builder->get('foo');
446+
}
447+
433448
public function testMerge()
434449
{
435450
$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
}

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testSubmitFromSingleTextDateTimeWithDefaultFormat()
8080
public function testSubmitFromSingleTextDateTime()
8181
{
8282
// we test against "de_AT", so we need the full implementation
83-
IntlTestHelper::requireFullIntl($this);
83+
IntlTestHelper::requireFullIntl($this, false);
8484

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

@@ -101,7 +101,7 @@ public function testSubmitFromSingleTextDateTime()
101101
public function testSubmitFromSingleTextString()
102102
{
103103
// we test against "de_AT", so we need the full implementation
104-
IntlTestHelper::requireFullIntl($this);
104+
IntlTestHelper::requireFullIntl($this, false);
105105

106106
\Locale::setDefault('de_AT');
107107

@@ -122,7 +122,7 @@ public function testSubmitFromSingleTextString()
122122
public function testSubmitFromSingleTextTimestamp()
123123
{
124124
// we test against "de_AT", so we need the full implementation
125-
IntlTestHelper::requireFullIntl($this);
125+
IntlTestHelper::requireFullIntl($this, false);
126126

127127
\Locale::setDefault('de_AT');
128128

@@ -145,7 +145,7 @@ public function testSubmitFromSingleTextTimestamp()
145145
public function testSubmitFromSingleTextRaw()
146146
{
147147
// we test against "de_AT", so we need the full implementation
148-
IntlTestHelper::requireFullIntl($this);
148+
IntlTestHelper::requireFullIntl($this, false);
149149

150150
\Locale::setDefault('de_AT');
151151

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

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

@@ -431,7 +431,7 @@ public function testSetDataWithNegativeTimezoneOffsetStringInput()
431431
public function testSetDataWithNegativeTimezoneOffsetDateTimeInput()
432432
{
433433
// we test against "de_AT", so we need the full implementation
434-
IntlTestHelper::requireFullIntl($this);
434+
IntlTestHelper::requireFullIntl($this, false);
435435

436436
\Locale::setDefault('de_AT');
437437

@@ -505,7 +505,7 @@ public function testMonthsOptionShortFormat()
505505
public function testMonthsOptionLongFormat()
506506
{
507507
// we test against "de_AT", so we need the full implementation
508-
IntlTestHelper::requireFullIntl($this);
508+
IntlTestHelper::requireFullIntl($this, false);
509509

510510
\Locale::setDefault('de_AT');
511511

@@ -525,7 +525,7 @@ public function testMonthsOptionLongFormat()
525525
public function testMonthsOptionLongFormatWithDifferentTimezone()
526526
{
527527
// we test against "de_AT", so we need the full implementation
528-
IntlTestHelper::requireFullIntl($this);
528+
IntlTestHelper::requireFullIntl($this, false);
529529

530530
\Locale::setDefault('de_AT');
531531

@@ -631,7 +631,7 @@ public function testIsPartiallyFilledReturnsTrueIfChoiceAndDayEmpty()
631631
public function testPassDatePatternToView()
632632
{
633633
// we test against "de_AT", so we need the full implementation
634-
IntlTestHelper::requireFullIntl($this);
634+
IntlTestHelper::requireFullIntl($this, false);
635635

636636
\Locale::setDefault('de_AT');
637637

@@ -644,7 +644,7 @@ public function testPassDatePatternToView()
644644
public function testPassDatePatternToViewDifferentFormat()
645645
{
646646
// we test against "de_AT", so we need the full implementation
647-
IntlTestHelper::requireFullIntl($this);
647+
IntlTestHelper::requireFullIntl($this, false);
648648

649649
\Locale::setDefault('de_AT');
650650

@@ -692,7 +692,7 @@ public function testDontPassDatePatternIfText()
692692
public function testDatePatternFormatWithQuotedStrings()
693693
{
694694
// we test against "es_ES", so we need the full implementation
695-
IntlTestHelper::requireFullIntl($this);
695+
IntlTestHelper::requireFullIntl($this, false);
696696

697697
\Locale::setDefault('es_ES');
698698

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class IntegerTypeTest extends TestCase
1818
{
1919
protected function setUp()
2020
{
21-
IntlTestHelper::requireIntl($this);
21+
IntlTestHelper::requireIntl($this, false);
2222

2323
parent::setUp();
2424
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class LanguageTypeTest 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