silverstripe / silverstripe-reports

API for creating backend reports in the Silverstripe Framework.
BSD 3-Clause "New" or "Revised" License
6 stars 28 forks source link

ENH Prefer dependency injection for GridFieldComponents #147

Closed GuySartorelli closed 2 years ago

GuySartorelli commented 2 years ago

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().

GuySartorelli commented 2 years ago

@emteknetnz Done!

emteknetnz commented 2 years ago

You'll need to rebase @GuySartorelli

GuySartorelli commented 2 years ago

@emteknetnz Oops, good note. Rebased on 4.