Skip to content

Conversation

@zds-s
Copy link
Contributor

@zds-s zds-s commented Aug 6, 2025

  • Added static isSoftDeletable() method to check if a model uses SoftDeletes trait
  • Method uses class_uses_recursive() to detect SoftDeletes trait in class hierarchy
  • Added comprehensive unit tests with dedicated test stub classes
  • Created SoftDeletableModelStub and NonSoftDeletableModelStub for testing
  • Tests verify correct behavior for models with and without SoftDeletes trait

🤖 Generated with Claude Code

zds-s and others added 3 commits August 6, 2025 11:05
- Added static isSoftDeletable() method to check if a model uses SoftDeletes trait
- Method uses class_uses_recursive() to detect SoftDeletes trait in class hierarchy
- Added comprehensive unit tests with dedicated test stub classes
- Created SoftDeletableModelStub and NonSoftDeletableModelStub for testing
- Tests verify correct behavior for models with and without SoftDeletes trait

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@limingxinleo limingxinleo changed the title Add isSoftDeletable method to Model class with comprehensive tests Added method Hyperf\Database\Model\Model::isSoftDeletable(). Aug 26, 2025
@limingxinleo limingxinleo merged commit 1ace735 into hyperf:master Aug 26, 2025
71 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.

2 participants