0

I created a custom module and to try to override vendor/magento/framework/DB/Adapter/Pdo/Mysql.php and vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php

but

<preference for="Magento\Framework\DB\Adapter\Pdo\Mysql" type="Test\MySQLCluster\DB\Adapter\Pdo\Mysql" />

does not work for vendor/magento/framework/DB/Adapter/Pdo/Mysql.php

And for vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php I don`t know how to do it.

1 Answer 1

0

A normal preference won't work indeed, but you can copy it to the lib directory. It's not a very clean way of working but in this case required.

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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