How to override a file in root/setup/src/Magento/ in Magento?
문제
I'm working on a solution that requires adding a bit of functionality to the magento installation process. How do I override a file in root/setup/src/Magento/...
How would i override setup/src/Magento/Setup/Model/Installer.php
?
올바른 솔루션이 없습니다
다른 팁
I am not sure you can do this in Magento directly. But composer
may be of some assistance.
...
"autoload": {
...
"files": [
"app/etc/NonComposerComponentRegistration.php",
"setup/src/My/Setup/Model/Installer.php"
],
"exclude-from-classmap": [
"**/dev/**",
"**/update/**",
"**/Test/**",
"setup/src/Magento/Setup/Model/Installer.php"
]
}
...
The files
array tells composer to load those files first. The exclude-from-classmap
array tells composer to not load the file at all. So don't load the core file, copy it somewhere, make your modifications, and load your new file.
제휴하지 않습니다 magento.stackexchange