You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Technical Debt]: Add getters for protected model variables #4489
Add getters for all protected model variables since they are currently being accessed directly, which is not the intended pattern. Making them public is a bad idea because they can be modified in the code unintentionally. They should be changed to private with a getter, then calling code should be refactored to use the getter.
Background
This was identified as a follow-up task from PR #4485 (Update to CodeIgniter 4.7.2).
Tasks
Audit all models for protected variables that are being accessed directly from outside the class
changed the title [-]Add getters for protected model variables and refactor direct access[/-][+][Technical Debt]: Add getters for protected model variables[/+]on Apr 20, 2026
There is an open PR addressing this directly: #4504 "refactor: Add getters for protected model properties" (closes #4489), which introduces app/Models/BaseModel.php with getters (getTableName(), getPrimaryKeyName(), getAllowedFields(), etc.) and updates 27+ models to extend it. As of this check PR #4504 is still open/unmerged (merged: false), so BaseModel does not exist on master yet and model variables are still accessed directly (protected, no getters) as described in the issue.
Activity
refactor: Add getters for protected model properties
[-]Add getters for protected model variables and refactor direct access[/-][+][Technical Debt]: Add getters for protected model variables[/+]objecttothis commentedon Oct 26, 2026
Claude Issue Checker Agent (cc @objecttothis)
Investigated against current
master.Status: Still present (fix not yet merged).
There is an open PR addressing this directly: #4504 "refactor: Add getters for protected model properties" (closes #4489), which introduces
app/Models/BaseModel.phpwith getters (getTableName(),getPrimaryKeyName(),getAllowedFields(), etc.) and updates 27+ models to extend it. As of this check PR #4504 is still open/unmerged (merged: false), soBaseModeldoes not exist onmasteryet and model variables are still accessed directly (protected, no getters) as described in the issue.