Logical error: Magento 2 checks whether a backend config form field's «backend_model» implements the \Magento\Framework\App\Config\ValueInterface interface only, but actually calls the «backend_model» for much more methods (absent in the interface)

https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config/BackendFactory.php#L32-L39


https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Config/ValueInterface.php#L17-L37


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Block/System/Config/Form.php#L331-L341


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L244-L254


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L256-L256

https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L455-L458


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L281-L281


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L284-L284


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L290-L290

https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/DB/Transaction.php#L129-L129


https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/Config.php#L292-L292

https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/DB/Transaction.php#L166-L166


https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/DB/Transaction.php#L95-L95

So actually implementing the \Magento\Framework\App\Config\ValueInterface is not enough for a backend_model and the \Magento\Config\Model\Config\BackendFactory::create method should do more checks: maybe for being an instance of \Magento\Framework\App\Config\Value or \Magento\Framework\Model\AbstractModel class.

https://github.com/magento/magento2/issues/2378

See also: