Skip to content

Commit

Permalink
Merge branch '4.7.x' into 5.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Dec 20, 2023
2 parents 894f6a7 + 6bec2f0 commit e045946
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
24 changes: 18 additions & 6 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('w')->end()
->integerNode('wtimeout')->end()
// Deprecated options
->booleanNode('fsync')->info('Deprecated. Please use the "j" option instead.')->end()
->scalarNode('safe')->info('Deprecated. Please use the "w" option instead.')->end()
->booleanNode('fsync')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "fsync" is deprecated. Use "j" option instead.')
->end()
->scalarNode('safe')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "safe" is deprecated. Use "w" option instead.')
->end()
->end()
->end()
->arrayNode('controller_resolver')
Expand Down Expand Up @@ -313,10 +317,18 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode): void
->scalarNode('w')->end()
->integerNode('wTimeoutMS')->end()
// Deprecated options
->booleanNode('fsync')->info('Deprecated. Please use the "journal" option instead.')->end()
->booleanNode('slaveOkay')->info('Deprecated. Please use the "readPreference" option instead.')->end()
->integerNode('timeout')->info('Deprecated. Please use the "connectTimeoutMS" option instead.')->end()
->integerNode('wTimeout')->info('Deprecated. Please use the "wTimeoutMS" option instead.')->end()
->booleanNode('fsync')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "fsync" is deprecated. Use "journal" option instead.')
->end()
->booleanNode('slaveOkay')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "slaveOkay" is deprecated. Use "readPreference" option instead.')
->end()
->integerNode('timeout')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "timeout" is deprecated. Use "connectTimeoutMS" option instead.')
->end()
->integerNode('wTimeout')
->setDeprecated('doctrine/mongodb-odm-bundle', '4.7', 'Option "wTimeout" is deprecated. Use "wTimeoutMS" option instead.')
->end()
->end()
->validate()
->ifTrue(static function ($v): bool {
Expand Down
5 changes: 4 additions & 1 deletion Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ public function testDefaults(): void
$this->assertEquals($defaults, $options);
}

/** @dataProvider provideFullConfiguration */
/**
* @dataProvider provideFullConfiguration
* @group legacy
*/
public function testFullConfiguration(array $config): void
{
$processor = new Processor();
Expand Down

0 comments on commit e045946

Please sign in to comment.