0

After updating a shop to 2.4.6-p4, I am getting this error in a custom extension. The Interface file is there, I checked, so it must be some other problem.

Any ideas on how to approach this?

The full error is: Error: Cannot instantiate interface Magento\Payment\Gateway\Config\ValueHandlerPoolInterface in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50

I compiled, deployed and so on, nothing helps.

Ideas?

1 Answer 1

0

I got this error when upgrading stripe payments module to 4.0.0 the cause was, that the definition for the model changed to a virtualType

As we are using app:config:dump to store our config in config.php, we deleted the model entry and rerun a:c:d and the correct VirtualType occured

'stripe_payments_checkout' => [
    'active' => '1',
    'model' => 'StripeIntegration\\Payments\\Model\\Method\\Checkout',
    'sort_order' => '2',
    'title' => 'Stripe Checkout',
],

to

'model' => 'RedirectFlowFacade',

check new virtual types and update you config accordingliy.

This Error occurs when you directly instanciate ValueHandlerPoolInterface

/**
 * Default implementation of config value handlers pool.
 * This class designed to be base for virtual types.
 * Direct injection of this class is not recommended (inject ValueHandlerPoolInterface instead).
 * Inheritance from this class is not recommended (declare virtual type or implement ValueHandlerPoolInterface instead).
 *
 * @api
 * @since 100.0.2
 */

As doc says it is a base for virtual types...

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.