-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add doctrine/mongodb-odm-bundle v5 without is_bundle (default to false) #1582
Merged
symfony-recipes-bot
merged 1 commit into
symfony:main
from
GromNaN:doctrine-odm-bundle-5
Jan 8, 2024
Merged
Add doctrine/mongodb-odm-bundle v5 without is_bundle (default to false) #1582
symfony-recipes-bot
merged 1 commit into
symfony:main
from
GromNaN:doctrine-odm-bundle-5
Jan 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. doctrine/mongodb-odm-bundle3.3 vs 4.1diff --git a/doctrine/mongodb-odm-bundle/3.3/config/packages/doctrine_mongodb.yaml b/doctrine/mongodb-odm-bundle/4.1/config/packages/doctrine_mongodb.yaml
index a9a22024..52103e7e 100644
--- a/doctrine/mongodb-odm-bundle/3.3/config/packages/doctrine_mongodb.yaml
+++ b/doctrine/mongodb-odm-bundle/4.1/config/packages/doctrine_mongodb.yaml
@@ -16,3 +16,27 @@ doctrine_mongodb:
dir: '%kernel.project_dir%/src/Document'
prefix: 'App\Document'
alias: App
+
+when@prod:
+ doctrine_mongodb:
+ auto_generate_proxy_classes: false
+ auto_generate_hydrator_classes: false
+ document_managers:
+ default:
+ metadata_cache_driver:
+ type: service
+ id: doctrine_mongodb.system_cache_provider
+
+ services:
+ doctrine_mongodb.system_cache_provider:
+ factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap']
+ class: 'Doctrine\Common\Cache\Psr6\DoctrineProvider'
+ public: false
+ arguments:
+ - '@doctrine_mongodb.system_cache_pool'
+
+ framework:
+ cache:
+ pools:
+ doctrine_mongodb.system_cache_pool:
+ adapter: cache.system
diff --git a/doctrine/mongodb-odm-bundle/3.3/config/packages/prod/doctrine_mongodb.yaml b/doctrine/mongodb-odm-bundle/3.3/config/packages/prod/doctrine_mongodb.yaml
deleted file mode 100644
index 60f6b834..00000000
--- a/doctrine/mongodb-odm-bundle/3.3/config/packages/prod/doctrine_mongodb.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-doctrine_mongodb:
- auto_generate_proxy_classes: false
- auto_generate_hydrator_classes: false
- document_managers:
- default:
- metadata_cache_driver:
- type: service
- id: doctrine_mongodb.system_cache_provider
-
-services:
- doctrine_mongodb.system_cache_provider:
- class: Symfony\Component\Cache\DoctrineProvider
- public: false
- arguments:
- - '@doctrine_mongodb.system_cache_pool'
-
-framework:
- cache:
- pools:
- doctrine_mongodb.system_cache_pool:
- adapter: cache.system
diff --git a/doctrine/mongodb-odm-bundle/3.3/manifest.json b/doctrine/mongodb-odm-bundle/4.1/manifest.json
index 65b64f0b..56b37712 100644
--- a/doctrine/mongodb-odm-bundle/3.3/manifest.json
+++ b/doctrine/mongodb-odm-bundle/4.1/manifest.json
@@ -13,5 +13,9 @@
"env": {
"MONGODB_URL": "mongodb://localhost:27017",
"MONGODB_DB": "symfony"
+ },
+ "conflict": {
+ "doctrine/cache": "<1.11",
+ "symfony/framework-bundle": "<5.3"
}
} 4.1 vs 4.4diff --git a/doctrine/mongodb-odm-bundle/4.1/config/packages/doctrine_mongodb.yaml b/doctrine/mongodb-odm-bundle/4.4/config/packages/doctrine_mongodb.yaml
index 52103e7e..999eb958 100644
--- a/doctrine/mongodb-odm-bundle/4.1/config/packages/doctrine_mongodb.yaml
+++ b/doctrine/mongodb-odm-bundle/4.4/config/packages/doctrine_mongodb.yaml
@@ -12,7 +12,6 @@ doctrine_mongodb:
mappings:
App:
is_bundle: false
- type: annotation
dir: '%kernel.project_dir%/src/Document'
prefix: 'App\Document'
alias: App
@@ -25,15 +24,7 @@ when@prod:
default:
metadata_cache_driver:
type: service
- id: doctrine_mongodb.system_cache_provider
-
- services:
- doctrine_mongodb.system_cache_provider:
- factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap']
- class: 'Doctrine\Common\Cache\Psr6\DoctrineProvider'
- public: false
- arguments:
- - '@doctrine_mongodb.system_cache_pool'
+ id: doctrine_mongodb.system_cache_pool
framework:
cache:
diff --git a/doctrine/mongodb-odm-bundle/4.1/manifest.json b/doctrine/mongodb-odm-bundle/4.4/manifest.json
index 56b37712..65b64f0b 100644
--- a/doctrine/mongodb-odm-bundle/4.1/manifest.json
+++ b/doctrine/mongodb-odm-bundle/4.4/manifest.json
@@ -13,9 +13,5 @@
"env": {
"MONGODB_URL": "mongodb://localhost:27017",
"MONGODB_DB": "symfony"
- },
- "conflict": {
- "doctrine/cache": "<1.11",
- "symfony/framework-bundle": "<5.3"
}
} 4.4 vs 5.0diff --git a/doctrine/mongodb-odm-bundle/4.4/config/packages/doctrine_mongodb.yaml b/doctrine/mongodb-odm-bundle/5.0/config/packages/doctrine_mongodb.yaml
index 999eb958..e0326566 100644
--- a/doctrine/mongodb-odm-bundle/4.4/config/packages/doctrine_mongodb.yaml
+++ b/doctrine/mongodb-odm-bundle/5.0/config/packages/doctrine_mongodb.yaml
@@ -11,10 +11,8 @@ doctrine_mongodb:
auto_mapping: true
mappings:
App:
- is_bundle: false
dir: '%kernel.project_dir%/src/Document'
prefix: 'App\Document'
- alias: App
when@prod:
doctrine_mongodb: |
OskarStark
approved these changes
Jan 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
is_bundle
andalias
configs are not required by default.