-
Notifications
You must be signed in to change notification settings - Fork 3
Upgrades to Laravel 10 and PHP 8.2, plus fixes from static analysis and code styles #7
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
Conversation
{ | ||
static::loadEloquentRelations($deferredValues); | ||
|
||
collect($deferredValues) |
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.
Is collect()
deprecated?
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.
It's not and is still available. I thought that it would be nice not to depend on a global function included from the Laravel helpers file, so I switched to using Collection class directly. However it was a bit of a 'half assed' attempt because there are still calls to data_get (which is only available as such global helper, and not a class I can hook into). So all in all, not a massive improvement and probably a bit of a useless change :D
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.
Does Illuminate\Support\Arr::get()
not cut the mustard?
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.
Hard to say. Arr::get passes the tests, but looking at the implementation of both, I am not sure if Arr::get covers all the use cases that data_get does. The 'relation' string is controlled by the users of this package, so I can't be sure that it never gets called with e.g. '*' which is valid segment for data_get but not for Arr:get. In theory it shouldn't be, and the only supported 'relation' strings should be compatible with the Laravel Eloquent relation syntax. I think this change would require a new major version of this package just in case, and then I would also like to look at improved handling of the relation string in general - so would prefer to leave it as is, and then do the switch to Arr::get as part of this work. However, thanks for throwing that excellent suggestion, as I would definitely want to switch to that in the future! :D
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.
Agreed, they do look a little different.
Overview
Changes
Dependencies
Test procedures
Links
JIRA: https://netsells.atlassian.net/browse/
Deployment
Migrations
Yes/No
Environment variables
Deployment notes