-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update check system #1189
Update check system #1189
Conversation
42289c0
to
6c85cfa
Compare
Ping @cachethq/owners |
6c85cfa
to
b5b60ff
Compare
Very nice James! 😍 |
* | ||
* @return \Illuminate\Http\JsonResponse | ||
*/ | ||
public function checkVersion() |
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.
We can use method injection here checkVersion(Release $release)
instead :)
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'll update to use this.
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.
Or, just app(Release::class)->...
. That would be just fine too. I think we do that in StyleCI now eveywhere rather than method injection.
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.
Why we where not injecting? I forgot lol
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.
Overhead I presume?
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.
Because there's less code to write by not being parsed to inject. ;P
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.
Adding phpdoc is a ball ache, lol.
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.
Also, for performance reasons, we can resolve as late as possible, so we might bail out before we need to resolve an object.
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 was only complaining about phpdoc like 2 days a go ;)
Thanks Joe! |
/** | ||
* Cache instance. | ||
* | ||
* @var \Illuminate\Cache\CacheManager |
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.
Don't inject a cache manager. Inject the cache repository contract.
We good to merge this then? :) |
No description provided.