Skip to content

Commit f19bc06

Browse files
committed
Merge remote-tracking branch 'upstream/5.4.x' into fix-kms-xsd-docs-alignment
2 parents e24dd48 + e09b2a2 commit f19bc06

File tree

8 files changed

+22
-20
lines changed

8 files changed

+22
-20
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ updates:
66
interval: "weekly"
77
labels:
88
- "CI"
9-
target-branch: "5.1.x"

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111
jobs:
1212
coding-standards:
1313
name: "Coding Standards"
14-
uses: "doctrine/.github/.github/workflows/coding-standards.yml@7.1.0"
14+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@7.3.0"

.github/workflows/composer-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ on:
1515
jobs:
1616
composer-lint:
1717
name: "Composer Lint"
18-
uses: "doctrine/.github/.github/workflows/composer-lint.yml@7.1.0"
18+
uses: "doctrine/.github/.github/workflows/composer-lint.yml@7.3.0"

.github/workflows/release-on-milestone-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@7.1.0"
11+
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@7.3.0"
1212
secrets:
1313
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
1414
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ on:
1515

1616
jobs:
1717
static-analysis:
18-
uses: "doctrine/.github/.github/workflows/phpstan.yml@7.1.0"
18+
uses: "doctrine/.github/.github/workflows/phpstan.yml@7.3.0"

docs/config.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Sample Configuration
4949
5050
.. code-block:: php
5151
52+
use Symfony\Config\DoctrineMongodbConfig;
5253
use function Symfony\Component\DependencyInjection\Loader\Configurator\env;
5354
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
54-
use Symfony\Config\DoctrineMongodbConfig;
5555
5656
return static function (DoctrineMongodbConfig $config): void {
5757
$config->connection('default')
@@ -142,9 +142,9 @@ If you wish to use memcached to cache your metadata, you need to configure the
142142
143143
.. code-block:: php
144144
145-
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
146145
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
147146
use Symfony\Config\DoctrineMongodbConfig;
147+
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
148148
149149
return static function (DoctrineMongodbConfig $config): void {
150150
$config->defaultDatabase('hello_' . param('kernel.environment'));
@@ -260,8 +260,8 @@ The following configuration shows a bunch of mapping examples:
260260
261261
.. code-block:: php
262262
263-
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
264263
use Symfony\Config\DoctrineMongodbConfig;
264+
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
265265
266266
return static function (DoctrineMongodbConfig $config): void {
267267
$config->documentManager('default')
@@ -475,8 +475,8 @@ following syntax:
475475
476476
.. code-block:: php
477477
478-
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
479478
use Symfony\Config\DoctrineMongodbConfig;
479+
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
480480
481481
return static function (DoctrineMongodbConfig $config): void {
482482
$config->defaultDatabase('hello_' . param('kernel.environment'));
@@ -624,15 +624,6 @@ Otherwise you will get a *auth failed* exception.
624624
]);
625625
};
626626
627-
Specifying a context service
628-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
629-
630-
The MongoDB driver supports receiving a stream context to set SSL and logging options. This can be used to authenticate using SSL certificates.
631-
632-
.. seealso::
633-
634-
For full documentation and configuration examples for Client-Side Field-Level Encryption (CSFLE) and Queryable Encryption (QE), see :doc:`csfle_qe`
635-
636627
Full Default Configuration
637628
--------------------------
638629

@@ -917,6 +908,11 @@ Full Default Configuration
917908
])
918909
};
919910
911+
.. seealso::
912+
913+
For full documentation and configuration examples for Client-Side Field-Level
914+
Encryption (CSFLE) and Queryable Encryption (QE), see :doc:`csfle_qe`
915+
920916
.. _`Custom types`: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/current/reference/custom-mapping-types.html
921917
.. _`define it as an environment variable`: https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables
922918
.. _`connection string`: https://docs.mongodb.com/manual/reference/connection-string/#urioption.authSource

src/DependencyInjection/Configuration.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode): void
333333
->arrayNode('driver_options')
334334
->performNoDeepMerging()
335335
->children()
336-
->scalarNode('context')->defaultNull()->end()
336+
->scalarNode('context')
337+
->defaultNull()
338+
->setDeprecated('doctrine/mongodb-odm-bundle', '5.4', 'The "context" driver option is deprecated and will be removed in 3.0. This option is ignored by the MongoDB driver version 2.')
337339
->arrayNode('autoEncryption')
338340
->children()
339341
->booleanNode('bypassAutoEncryption')->end()

tests/DependencyInjection/ConfigurationTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ public function testDefaults(): void
6161
$this->assertEquals($defaults, $options);
6262
}
6363

64-
/** @dataProvider provideFullConfiguration */
64+
/**
65+
* @dataProvider provideFullConfiguration
66+
* @group legacy
67+
*/
6568
public function testFullConfiguration(array $config): void
6669
{
70+
self::expectDeprecation('Since doctrine/mongodb-odm-bundle 5.4: The "context" driver option is deprecated and will be removed in 3.0. This option is ignored by the MongoDB driver version 2.');
71+
6772
$processor = new Processor();
6873
$configuration = new Configuration();
6974
$options = $processor->processConfiguration($configuration, [$config]);

0 commit comments

Comments
 (0)