Skip to content

Commit 3bc5c9e

Browse files
committed
Merge branch '4.2'
* 4.2: update years in license files Fix: Adjust DocBlock \"ParserTest->getParserTestData()\" -> only some more tests access the container getting it from the kernel Replace slave and master by replica and primary Fix erasing cookies issue [Lock] Pedantic improvements for lock [EventDispatcher] Fixed phpdoc on interface update year in license files [VarExporter] fix exporting array indexes [SecurityBundle] Fix traceable voters [Console] Fix help text for single command applications Fix random test failure on lock improve error message when using test client without the BrowserKit component Fixed minor typos in an error message [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset. Fixed minor typos Fix: Method can also return null [Stopwatch] Fixed phpdoc for category name
2 parents 100838a + fbcb106 commit 3bc5c9e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2018 Fabien Potencier
1+
Copyright (c) 2004-2019 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

Tests/OptionsResolverTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,9 +2181,9 @@ public function testResolveMultipleNestedOptions()
21812181
->setRequired(array('dbname', 'host'))
21822182
->setDefaults(array(
21832183
'port' => 3306,
2184-
'slaves' => function (OptionsResolver $resolver) {
2184+
'replicas' => function (OptionsResolver $resolver) {
21852185
$resolver->setDefaults(array(
2186-
'host' => 'slave1',
2186+
'host' => 'replica1',
21872187
'port' => 3306,
21882188
));
21892189
},
@@ -2196,14 +2196,14 @@ public function testResolveMultipleNestedOptions()
21962196
'dbname' => 'test',
21972197
'host' => 'localhost',
21982198
'port' => null,
2199-
'slaves' => array('host' => 'slave2'),
2199+
'replicas' => array('host' => 'replica2'),
22002200
),
22012201
));
22022202
$expectedOptions = array(
22032203
'name' => 'custom',
22042204
'database' => array(
22052205
'port' => null,
2206-
'slaves' => array('port' => 3306, 'host' => 'slave2'),
2206+
'replicas' => array('port' => 3306, 'host' => 'replica2'),
22072207
'dbname' => 'test',
22082208
'host' => 'localhost',
22092209
),
@@ -2332,7 +2332,7 @@ public function testNormalizeNestedValue()
23322332
public function testFailsIfCyclicDependencyBetweenSameNestedOption()
23332333
{
23342334
$this->resolver->setDefault('database', function (OptionsResolver $resolver, Options $parent) {
2335-
$resolver->setDefault('slaves', $parent['database']);
2335+
$resolver->setDefault('replicas', $parent['database']);
23362336
});
23372337
$this->resolver->resolve();
23382338
}
@@ -2375,9 +2375,9 @@ public function testFailsIfCyclicDependencyBetweenNormalizerAndNestedOption()
23752375
public function testFailsIfCyclicDependencyBetweenNestedOptions()
23762376
{
23772377
$this->resolver->setDefault('database', function (OptionsResolver $resolver, Options $parent) {
2378-
$resolver->setDefault('host', $parent['slave']['host']);
2378+
$resolver->setDefault('host', $parent['replica']['host']);
23792379
});
2380-
$this->resolver->setDefault('slave', function (OptionsResolver $resolver, Options $parent) {
2380+
$this->resolver->setDefault('replica', function (OptionsResolver $resolver, Options $parent) {
23812381
$resolver->setDefault('host', $parent['database']['host']);
23822382
});
23832383
$this->resolver->resolve();
@@ -2418,22 +2418,22 @@ public function testResolveLazyOptionWithTransitiveDefaultDependency()
24182418
'ip' => null,
24192419
'database' => function (OptionsResolver $resolver, Options $parent) {
24202420
$resolver->setDefault('host', $parent['ip']);
2421-
$resolver->setDefault('master_slave', function (OptionsResolver $resolver, Options $parent) {
2421+
$resolver->setDefault('primary_replica', function (OptionsResolver $resolver, Options $parent) {
24222422
$resolver->setDefault('host', $parent['host']);
24232423
});
24242424
},
2425-
'secondary_slave' => function (Options $options) {
2426-
return $options['database']['master_slave']['host'];
2425+
'secondary_replica' => function (Options $options) {
2426+
return $options['database']['primary_replica']['host'];
24272427
},
24282428
));
24292429
$actualOptions = $this->resolver->resolve(array('ip' => '127.0.0.1'));
24302430
$expectedOptions = array(
24312431
'ip' => '127.0.0.1',
24322432
'database' => array(
24332433
'host' => '127.0.0.1',
2434-
'master_slave' => array('host' => '127.0.0.1'),
2434+
'primary_replica' => array('host' => '127.0.0.1'),
24352435
),
2436-
'secondary_slave' => '127.0.0.1',
2436+
'secondary_replica' => '127.0.0.1',
24372437
);
24382438
$this->assertSame($expectedOptions, $actualOptions);
24392439
}

0 commit comments

Comments
 (0)