tattersoftware / codeigniter4-relations

Entity relationships for CodeIgniter 4
MIT License
87 stars 20 forks source link

Fix not compatable with base model in ci 4.5 #52

Closed seunex17 closed 2 months ago

seunex17 commented 4 months ago

After upgrade to Codeigniter version 4.5 it broken while using the ModelTrait look like Codeigniter changed thier findAll() method.

i update $limit = 0 to $limit = null

CI4 now use null as default value to limit instead of 0

Screenshot 2024-04-24 at 7 42 38 AM
damian-romanowski commented 4 months ago

@MGatner Can this please be merged in. Struggling with quite a few projects that require this change..

MGatner commented 3 months ago

Has anyone tested if this is backwards-compatible? We probably need to bump the CodeIgniter framework minimum version alongside this change.

damian-romanowski commented 3 months ago

Has anyone tested if this is backwards-compatible? We probably need to bump the CodeIgniter framework minimum version alongside this change.

I only encountered this after updating to v4.5.0 so yeah, I believe this should bump the min ver to ^4.5.

maldini4869 commented 3 months ago

any updates with the pr?

MGatner commented 3 months ago

I don't use this library myself anymore except in locked legacy projects. Honestly the experience of working with an ORM-ish in CI4 pushed me in the opposite direction, and I now favor a very bespoke Repository approach.

I am happy to maintain this library but it's harder to do things like backwards-compatibility testing. For this PR specifically I think we need to lock the framework dependency so we don't mess up older projects. If @seunex17 is not available to do that today/tomorrow then I can handle it post-merge.

seunex17 commented 3 months ago

Okay! @MGatner am going to address this in the next hour.

seunex17 commented 3 months ago

@MGatner please have a look and let me know it that okay to move on.

vonboth commented 2 months ago

@MGatner Can you please proceed with the pull request? It is the blocker to update to CI 4.5 So if you don't want to maintain the repo either another one should take over or we need to remove it from our projects. Thanks!

seunex17 commented 2 months ago

@vonboth he might have been busy i guess.

MGatner commented 2 months ago

I'll get this released when I'm desktop later. Thanks for the update!

seunex17 commented 2 months ago

Okay cool