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

Lazy Load - no argument necessary if return type specified #23

Closed
g105b opened this issue Oct 15, 2021 · 0 comments · Fixed by #81
Closed

Lazy Load - no argument necessary if return type specified #23

g105b opened this issue Oct 15, 2021 · 0 comments · Fixed by #81
Labels
enhancement New feature or request

Comments

@g105b
Copy link
Member

g105b commented Oct 15, 2021

It would be a nice improvement to not have to duplicate the class name in the LazyLoad attribute and return type.

For example:

class ServiceLoader {
	#[LazyLoad(ContentRepository::class)]
	public function getContentRepository():ContentRepository {
		// ...
	}
}

Could become simply:

class ServiceLoader {
	#[LazyLoad]
	public function getContentRepository():ContentRepository {
		// ...
	}
}
@g105b g105b added the enhancement New feature or request label Oct 15, 2021
g105b added a commit that referenced this issue Jun 9, 2022
@g105b g105b closed this as completed in #81 Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant