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

Ensure autoloading on cached config. #1242

Merged
merged 3 commits into from
Nov 18, 2021

Conversation

haringsrob
Copy link
Contributor

Description

This is a bugfix that ensures bootstrapping processes such as autoloading and service provider registration are working when config is cached.

Some things to consider

We might want to move the call to bootstrapCapsule to CapsuleServiceProvider because now there is a flag on the getCapsuleList function. But this makes less sense when reading the code.

@ifox ifox added this to In progress in Twill 2.x via automation Nov 7, 2021
@ifox ifox moved this from In progress to Review in progress in Twill 2.x Nov 7, 2021
Copy link
Contributor

@pboivin pboivin left a comment

Choose a reason for hiding this comment

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

Hi @haringsrob, good catch!

I like the simplicity of your implementation. It makes sense to piggy back on getCapsuleList() for this. But I also agree that it would make sense to move some code to CapsuleServiceProvider, considering that the boostrapping responsibility belongs to this class.

What do you think of having an explicit bootstrapCapsules() step, as part of register()?

@haringsrob
Copy link
Contributor Author

Hey @pboivin,

Yes will move this around.

Thanks for checking.

@haringsrob
Copy link
Contributor Author

Hey @pboivin I have updated the flow of code. Is it ok like this?

Twill 2.x automation moved this from Review in progress to Reviewer approved Nov 15, 2021
Copy link
Contributor

@pboivin pboivin left a comment

Choose a reason for hiding this comment

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

Hi @haringsrob, thanks for taking the time to revisit this, it looks great! Over time (probably post 3.0), I'd love to push even more on the refactor of HasCapsules responsibilities.

@pboivin pboivin merged commit 9713e2e into area17:2.x Nov 18, 2021
Twill 2.x automation moved this from Reviewer approved to Done Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants