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

Fix deprecated warning using mongodb extension 1.20 or greater in ReadPrederence::getMode() #187

Merged

Conversation

Vegeeto
Copy link
Contributor

@Vegeeto Vegeeto commented Sep 30, 2024

Steps to reproduce:

  1. Add the following option to makefile
.PHONY: setup-74-mongo-5
setup-74-mongo-5: PHP_VERSION=7.4
setup-74-mongo-5: MONGODB_EXTENSION_VERSION=1.20.0
setup-74-mongo-5: MONGODB_VERSION=5.0
setup-74-mongo-5: | --build --setup-common
  1. Enter to the container: make sh
  2. Execute unit tests: make tests

Added a mongodb version check in order to use getModeString() method instead of calling getMode()
Added tests to check

PS: I don't like so much the way I tested it. If you have any suggestion, please feel free to comment it. Thanks!

Resolves #185 #185

src/Capsule/Collection.php Outdated Show resolved Hide resolved
@ilario-pierbattista
Copy link
Member

PS: I don't like so much the way I tested it. If you have any suggestion, please feel free to comment it. Thanks!

hey @Vegeeto, why don't you add an item with that configuration here? https://github.com/facile-it/mongodb-bundle/blob/master/.github/workflows/ci.yaml#L29

@ilario-pierbattista ilario-pierbattista merged commit dae724a into facile-it:master Oct 4, 2024
8 checks passed
@ilario-pierbattista
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated ReadPreference::getMode
3 participants