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

ENH Prefer dependency injection for GridFieldComponents #2720

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Feb 12, 2022

GridFieldComponents packaged with silverstripe/framework are injectable as of 4.11.0 (see silverstripe/silverstripe-framework#10204)
Explicitly invoking the injector here instead of using create() allows backwards compatability with framework < 4.11.0 while ensuring dependency injection is still used from 4.11.0 onwards.
See silverstripe/silverstripe-admin#1286 for (brief) discussion of this approach vs using ::create().

GridFieldComponents packaged with silverstripe/framework are injectable as of 4.11.0
Explicitly invoking the injector here instead of using `create()` allows backwards compatability with framework < 4.11.0 while ensuring dependency injection is still used from 4.11.0 onwards.
@michalkleiner michalkleiner merged commit 07df04f into silverstripe:4 Feb 12, 2022
@GuySartorelli GuySartorelli deleted the enh/gridfieldcomponents-di branch February 12, 2022 09:33
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