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

Make Blueprint class extensible #2

Closed
jasonmccreary opened this issue Nov 4, 2019 · 1 comment
Closed

Make Blueprint class extensible #2

jasonmccreary opened this issue Nov 4, 2019 · 1 comment

Comments

@jasonmccreary
Copy link
Collaborator

While the Blueprint class has methods to register additional lexers and generators it is created within the command and as such not readily extensible.

Potential options:

  • resolved as a singleton to share the same object with other components
  • allow publishing of a configuration file to register additional functionality
@ttomdewit
Copy link
Contributor

ttomdewit commented Nov 15, 2019

You could consider https://laravel.com/docs/6.x/providers#deferred-providers and see if you can "tag" generator packages as such. I think from within the main Blueprint package you can find all tagged services (https://laravel.com/docs/5.8/container#tagging).

Make sure these adhere to a common contract so the main package doesn't really know what generators are available, it just knows how to use them.

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

No branches or pull requests

2 participants