refactor: relax objects allowed in model()#9493
Merged
paulbalandan merged 1 commit intocodeigniter4:developfrom Mar 18, 2025
Merged
refactor: relax objects allowed in model()#9493paulbalandan merged 1 commit intocodeigniter4:developfrom
model()#9493paulbalandan merged 1 commit intocodeigniter4:developfrom
Conversation
Contributor
|
I looked at |
Member
Author
|
Yes, look at the PHPDoc of CodeIgniter4/system/Test/Fabricator.php Lines 51 to 56 in 0611c35 Looking at its constructor, it doesn't check for CodeIgniter4/system/Test/Fabricator.php Lines 122 to 131 in 0611c35 Lastly, look at the return type of CodeIgniter4/system/Common.php Line 800 in 0611c35 |
michalsn
approved these changes
Mar 17, 2025
Member
michalsn
left a comment
There was a problem hiding this comment.
PHPStan errors are unrelated?
76fef2f to
df4b525
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I remember I have read somewhere in the codebase or in the documentation that
model()can accept any object other than those extendingCodeIgniter\Modelas long as that class follow the semantics of the Model class. So, this relaxes the requirement formodel()to accept onlyModelclasses.Supersedes and closes #9391 .
Checklist: