There is no point in managing two methods for BC, they will be removed at the same time anyway
Directly inject a file instance as contructor object