"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
]
},
This is composer autoload part from composer.json on magento2 root
as per this i have successfully overirde
vendor/magento/framework/View/Element/Html/Link.php
by replacing this file in
lib/internal/Magento/Framework/View/Element/Html/Links.php
Now i have tried same for
vendor/magento/module-catalog-import-export/Model/Import/Product/Validator/Media.php
By replacing this file in
app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Media.php
above override method is not working.can anyone point me in right direction ?
PS : i want to change const URL_REGEXP = '|^http(s)?://[a-z0-9-_]+(.[a-z0-9-_]+)*(:[0-9]+)?(/.*)?$|i';
of above class as it cause issue in product import which has double underscore in image url
Can i override using psr-4 or not ? I do not want to go for "preference" if above solution fix my issue.