-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Unable to extend primary config #4412
Comments
@adamzero1 thank you for your feedback. |
@veloraven some configurations are impossible to overwrite without editing |
@veloraven ping |
magento-engcom-team
pushed a commit
that referenced
this issue
Jun 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm struggling to see a way to extend primary configuration, without copying files outside of the vendor folder. (which I see as bad practise, though this may be wrong?)
I am trying to extend the the model Magento\Framework\Setup\BackupRollback to change the functionality of the method: getCodeBackupIgnorePaths() (to alter the exclude paths - as they aren't configurable)
So I was hoping I could simply add a "preference" in a di.xml however the only di.xml used by the object manager when constructing this object is in app/etc/di.xml
This is because when the "primary" config loader searches for config files, it is forced to look in the location: [Magento base dir]/app/etc/ with a pattern of: "di.xml,/*di.xml" this can be seen at: vendor/magento/framework/Setup/BackupRollback.php:259
Which excludes any di.xml files in the vendor folder, is there a reason for this?
I can see two good approaches (though I'm sure there are others that I have missed)
Could you please suggest what you think is best.
Many thanks
Adam
The text was updated successfully, but these errors were encountered: