-
Notifications
You must be signed in to change notification settings - Fork 10
compat fixes for CakePHP 5.3.0+ and PHP 8.4+ #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,16 @@ trait LazyLoadEntityTrait | |
| */ | ||
| protected $_unsetProperties = []; | ||
|
|
||
| /** | ||
| * Override __get, because in Cake 5.3, __get has been overridden, so breaking functionality | ||
| * @param string $name | ||
| * @return void | ||
| */ | ||
| public function &__get(string $field): mixed | ||
| { | ||
| return $this->get($field); | ||
| } | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cake has always had a 4.x: https://github.com/cakephp/cakephp/blob/4.x/src/Datasource/EntityTrait.php#L139-L148 It looks like what has changed is that it now calls |
||
|
|
||
| /** | ||
| * Overrides get() to check for associated data to lazy load, if that | ||
| * property doesn't already exist | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be necessary to increase the requirements. I'd still expect 5.0 users to be able to use this version. If it's required I'll have to publish a new major version of this package.