Skip to content
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

Merged
merged 12 commits into from
Oct 9, 2022
Merged

Conversation

lohanidamodar
Copy link
Contributor

No description provided.

@lohanidamodar lohanidamodar marked this pull request as ready for review August 3, 2022 08:48
Copy link
Member

@eldadfux eldadfux left a 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.

.travis.yml Show resolved Hide resolved
src/CLI/CLI.php Outdated
*/
public function getResource(string $name, bool $fresh = false): mixed
{
if ($name === 'utopia') {
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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 = [];
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labels now in hooks

@lohanidamodar lohanidamodar requested a review from eldadfux October 9, 2022 08:35
@lohanidamodar lohanidamodar merged commit c30ef98 into master Oct 9, 2022
@lohanidamodar lohanidamodar deleted the feat-dependency-injection branch October 9, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants