Skip to content

PHPORM-264: Deprecate Mongo soft deletes trait #3408

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

Merged
merged 2 commits into from
Jul 1, 2025

Conversation

paulinevos
Copy link
Collaborator

In favor of the Laravel one. Ours is now obsolete; the SoftDeletes trait is only necessary to remove the call to qualifyColumn in the parent trait. But the DocumentModel::qualifyColumn is already disabled.

Also replaces some internal/test usages with the recommended trait.

Closes PHPORM-264

Checklist

  • Ensure tests still pass

@paulinevos paulinevos requested review from a team as code owners June 16, 2025 13:18
@paulinevos paulinevos requested review from rustagir and GromNaN June 16, 2025 13:18
@github-actions github-actions bot added the docs label Jun 16, 2025
@paulinevos paulinevos enabled auto-merge (squash) June 16, 2025 13:23
Copy link
Contributor

@rustagir rustagir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to docs tests lgtm

@paulinevos paulinevos requested a review from GromNaN June 25, 2025 08:27
@paulinevos
Copy link
Collaborator Author

Sorry this took me so long @GromNaN. Question, why do we trigger an error instead of a deprecation here?

@GromNaN
Copy link
Member

GromNaN commented Jun 30, 2025

Question, why do we trigger an error instead of a deprecation here?

trigger_deprecation is a Symfony function to call trigger_error with the E_USER_DEPRECATED level. "deprecated" is just one level among others such as "error" and "warning". I don't know of any other way to do it.

@paulinevos
Copy link
Collaborator Author

Gotcha, thank you!

In favor of the Laravel one. Ours is now obsolete; the SoftDeletes trait
is only necessary to remove the call to qualifyColumn in the parent
trait. But the DocumentModel::qualifyColumn is already disabled
@GromNaN
Copy link
Member

GromNaN commented Jul 1, 2025

The CI is stuck because of the github-actions[bot] commit. You can rebase/squash an push.

Co-authored-by: Jérôme Tamarelle <[email protected]>
@paulinevos paulinevos force-pushed the 264_deprecrate-soft-deletes branch from e99646e to ece1a77 Compare July 1, 2025 10:33
@paulinevos paulinevos merged commit 01d7af9 into mongodb:5.x Jul 1, 2025
71 checks passed
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