1
1
UPGRADE FROM 4.x to 5.0
2
2
=======================
3
3
4
+ ## PHP version and dependencies
5
+
6
+ * Add support for Symfony 7.0 and require at least Symfony 6.4
7
+ * ` doctrine/mongodb-odm ` 2.6 and ` doctrine/persistence ` 3.0 are required
8
+
9
+ ## Annotations
10
+
11
+ * Remove support of Annotation mapping, you should use Attributes or XML instead.
12
+
13
+ ## Commands
14
+
15
+ * All command and compiler pass classes are internal and final. They cannot be
16
+ used directly or extended.
4
17
* The ` doctrine:mongodb:tail-cursor ` command and
5
18
` Doctrine\Bundle\MongoDBBundle\Cursor\TailableCursorProcessorInterface `
6
19
interface have been dropped. You should use
@@ -9,7 +22,41 @@ UPGRADE FROM 4.x to 5.0
9
22
` findBundle ` and ` findBasePathForBundle ` methods from
10
23
` Doctrine\Bundle\MongoDBBundle\Command\DoctrineODMCommand ` have been
11
24
removed without replacement.
12
- * The ` Doctrine\Bundle\MongoDBBundle\Command\DoctrineODMCommand ` class is now
13
- ` @internal ` , you should not extend from this class.
14
- * ` Doctrine\Bundle\MongoDBBundle\EventSubscriber\EventSubscriberInterface ` has
15
- been removed. Use the ` #[AsDocumentListener] ` attribute instead.
25
+
26
+ ## Configuration
27
+
28
+ Remove all ` doctrine_mongodb.odm.* ` parameters.
29
+
30
+ Deprecated options have been removed:
31
+
32
+ | namespace | removed | replaced by |
33
+ | --------------------------| -------------| --------------------|
34
+ | ` default_commit_options ` | ` fsync ` | ` j ` |
35
+ | ` default_commit_options ` | ` safe ` | ` w ` |
36
+ | ` connections.*.options ` | ` fsync ` | ` journal ` |
37
+ | ` connections.*.options ` | ` slaveOkay ` | ` readPreference ` |
38
+ | ` connections.*.options ` | ` timeout ` | ` connectTimeoutMS ` |
39
+ | ` connections.*.options ` | ` wTimeout ` | ` wTimeoutMS ` |
40
+
41
+ ## Event Subscriber
42
+
43
+ * Remove ` Doctrine\Bundle\MongoDBBundle\EventSubscriber\EventSubscriberInterface ` .
44
+ Use the ` #[AsDocumentListener] ` attribute instead.
45
+ * Remove parameters ` $method ` and ` $lazy ` of ` #[AsDocumentListener] ` , they are
46
+ not used.
47
+
48
+ ## Fixtures
49
+
50
+ * Remove ` --service ` option from ` doctrine:mongodb:fixtures:load ` command
51
+ * Remove automatic injection of the container in fixtures classes implementing
52
+ ` ContainerAwareInterface ` . You should use dependency injection instead.
53
+ * Remove the ` fixture_loader ` configuration
54
+
55
+ ## Cache
56
+
57
+ The ` Doctrine\Common\Cache\ ` providers are not supported anymore. The configuration
58
+ uses ` Symfony\Component\Cache\Adapter\ ` providers instead, for PSR-6 compatibility.
59
+
60
+ If you want to use redis or memcached, the configuration of ` host ` , ` port ` and ` instance_class `
61
+ must be done for each document manager. The parameters ` doctrine_mongodb.odm.cache.memcached_* `
62
+ and ` doctrine_mongodb.odm.cache.redis_* ` are not read anymore.
0 commit comments