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

Open
wants to merge 3 commits into
base: 5.x
Choose a base branch
from

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

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
@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
Co-authored-by: Jérôme Tamarelle <jerome@tamarelle.net>
@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!

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