4

Actually I'm refering to #19247 for PHP 7.2 specific issue.

that partially solved my issue but can't able to override that file.

I tried using preference here's what I tried. <preference for="Magento\Framework\File\Uploader" type="Vendor\Module\File\Uploader" />

But doesn't seems to work. Any idea ?

1

I strongly recommend to not use Preferences, because there are other techniques which you could use to update the input or output of a function.

For example you could write a Before plugin to update the incoming parameters or a After plugin to update the outgoing result.

But in your case it probably is not possible with a Plugin but then you could use the Composer Patch technique.

More information about Composer Patching in Magento 2 you can find here:

https://support.magento.com/hc/en-us/articles/360005484154-Create-a-patch-for-a-Magento-2-Composer-installation-from-a-GitHub-commit

0

I write at medium a post how to Patch your Magento:

https://medium.com/@LarsRoettig/how-to-apply-patches-on-magento-2-b4fd83537f61

I also don't strongly recommend to not use Preferences same reason as Mr. Lewis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.