-
Notifications
You must be signed in to change notification settings - Fork 232
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
Deprecate default_repository_class option #469
Deprecate default_repository_class option #469
Conversation
0960ec9
to
8046f9f
Compare
UPGRADE-3.5.md
Outdated
======================= | ||
|
||
* The `default_repository_class` configuration was deprecated and will be | ||
removed in 4.0. Use the `default_documen_repository_class` option instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing "t" by the end of "documen" :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks!
@@ -173,7 +173,7 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa | |||
'setDefaultCommitOptions' => '%doctrine_mongodb.odm.default_commit_options%', | |||
'setRetryConnect' => $documentManager['retry_connect'], | |||
'setRetryQuery' => $documentManager['retry_query'], | |||
'setDefaultRepositoryClassName' => $documentManager['default_repository_class'], | |||
'setDefaultRepositoryClassName' => $documentManager['default_document_repository_class'] ?: $documentManager['default_repository_class'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's worth the hassle, but doctrine/mongodb-odm#1840 will provide a forward compatibility thus with an if
check bundle could not call deprecated method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I updated the code to call the new method if it exists. Will drop that distinction in 4.0.
8046f9f
to
09c33e8
Compare
Looks like deprecating config was only introduced in symfony/config 3.4 - I'm considering dropping support for Symfony versions older than 3.4 - opinions? Edit: dang, you're fast. Will drop it. |
Dropped it is 👍 |
This deprecates the
default_repository_class
option in 3.5 for removal in 4.0. The new option is calleddefault_document_repository_class
.