Skip to content
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

Merged
merged 2 commits into from
Sep 2, 2018

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Sep 2, 2018

This deprecates the default_repository_class option in 3.5 for removal in 4.0. The new option is called default_document_repository_class.

@alcaeus alcaeus added the Task label Sep 2, 2018
@alcaeus alcaeus added this to the 3.5.0 milestone Sep 2, 2018
@alcaeus alcaeus force-pushed the deprecate-repository-class-option branch from 0960ec9 to 8046f9f Compare September 2, 2018 09:30
@alcaeus alcaeus requested a review from malarzm September 2, 2018 09:37
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.
Copy link
Member

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" :)

Copy link
Member Author

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'],
Copy link
Member

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.

Copy link
Member Author

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.

@alcaeus alcaeus force-pushed the deprecate-repository-class-option branch from 8046f9f to 09c33e8 Compare September 2, 2018 18:04
@alcaeus
Copy link
Member Author

alcaeus commented Sep 2, 2018

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.

@malarzm
Copy link
Member

malarzm commented Sep 2, 2018

Dropped it is 👍

@malarzm malarzm merged commit 5464d6c into doctrine:master Sep 2, 2018
@alcaeus alcaeus deleted the deprecate-repository-class-option branch September 2, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants