refactor: Change BaseAuthToken and BaseValidator to abstract - #1379
Conversation
|
Ready for review 👍 Just let me know if it needs to target different branch as it is bc break. |
|
@samsonasik I consider this change logical and well aligned with object-oriented design principles. Making base classes abstract clearly communicates their intended purpose.They are designed to be extended rather than instantiated directly. This is also consistent with our existing codebase. For example, we already have BaseModel defined as an abstract class: abstract class BaseModel extends Model So, in my opinion, making the other base classes abstract is a natural and consistent continuation of the same design approach already used in Shield. Although this technically constitutes a breaking change, I don't expect it to affect many users, since these base classes are primarily intended to be extended rather than instantiated directly. Finally, I would appreciate it if we could consider the feedback from other before merging this change. |
michalsn
left a comment
There was a problem hiding this comment.
Sorry, I somehow missed this one.
Can we add a small note to UPGRADING.md? Just acknowledging the change is enough.
|
Thank you both. |
Description
Similar to what I proposed on
CodeIgniter4repo, this change class withBaseprefix to abstract as never instantiated and only extended at:BaseServiceandBaseCollectorabstract CodeIgniter4#10531detected by
structarmed:Checklist: