-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feat: Dependency Injection & Hooks #18
Conversation
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.
Looks good, some small comments. We should also update the README file.
src/CLI/CLI.php
Outdated
*/ | ||
public function getResource(string $name, bool $fresh = false): mixed | ||
{ | ||
if ($name === 'utopia') { |
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 think this was designed against a memory leak. Is it relevant in this context? Should we prevent the CLI instance as a nested dependency itself?
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.
Not sure, not fully aware what might be. May be we can leave as is and later change if any problem arises?
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 ping @TorstenDittmann about it.
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.
removed this for now
src/CLI/Task.php
Outdated
@@ -40,7 +20,7 @@ class Task | |||
* | |||
* @var array | |||
*/ | |||
protected $labels = []; | |||
protected array $labels = []; |
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 we get this from the Hook class? I think we should.
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 don't have it in hook, it doesn't make sense in hook does it? What would we use labels in hook for?
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 labels for whatever we want, and it seems like it might be repetitive across servers.
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.
labels now in hooks
No description provided.