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

implement newer database access method #254

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

freephile
Copy link
Contributor

wfGetDB() was deprecated as of REL1_39
and is being removed in REL1_44

This PR is made in reference to: #253

This PR addresses or contains:

  • modify AppFactory->getConnection to be version aware
  • use MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase() in 1.42+
  • when creating a db handle in src/PropertyAnnotators/ApprovedDatePropertyAnnotator.php, use $this->appFactory->getConnection() instead of wfGetDB()
  • maybe throwing a db connection exception in annotator class methods is a code smell and getConnection should handle it?

This PR includes:

  • Tests (unit/integration)
  • CI build passed

Fixes #253

wfGetDB() was deprecated as of REL1_39
and is being removed in REL1_44
Fixes Issue SemanticMediaWiki#253
@paladox paladox merged commit 96c6840 into SemanticMediaWiki:master Jan 16, 2025
5 checks passed
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.

wfGetDB() is deprecated since 1.39
2 participants