Make blueprint extensible #11
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've no clue if this is what you thought in #2.
I just wanted to give it a try. Maybe you can use some code of it or none at all.
I added a singleton for the
Blueprint
class and added a config where thegenerators
andlexers
can be defined which should be registered by default. I personally don't like that theboot()
method onBlueprint
is called within theBlueprintServiceProvider@boot()
method, but could think of a better alternative.I also didn't add any tests for the
boot()
method on theBlueprint
class, because I ran into an error thatconfig()
method is not defined, which is likely to be caused by how the tests are setup.If this PR doesn't help you at all please tell me and if you have the time I'd appreciate why and how I could improve things for future contributions.
Thanks!