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

Unable to extend primary config #4412

Closed
adamzero1 opened this issue May 5, 2016 · 3 comments
Closed

Unable to extend primary config #4412

adamzero1 opened this issue May 5, 2016 · 3 comments

Comments

@adamzero1
Copy link
Contributor

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)

  • submit a pull request that contains code the allow the exclude paths to be configured
  • submit a pull request that allows "primary" config files to be declared in the vendor directory

Could you please suggest what you think is best.

Many thanks
Adam

@okorshenko okorshenko assigned okorshenko and joanhe and unassigned okorshenko May 11, 2016
@vkorotun vkorotun removed the PS label Aug 4, 2016
@joanhe joanhe removed their assignment Aug 17, 2016
@veloraven
Copy link
Contributor

@adamzero1 thank you for your feedback.
The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for technical questions.

@kassner
Copy link
Contributor

kassner commented Nov 1, 2016

@veloraven some configurations are impossible to overwrite without editing app/etc/di.xml directly, so I see this as a technical issue. Can you explain further why is not?

@kassner
Copy link
Contributor

kassner commented Nov 16, 2016

@veloraven ping

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

No branches or pull requests

6 participants