SchumacherFM / Magento2-Mocks

This Magento2 module provides mock classes when you have physically removed unneeded core modules with dependencies.
https://cyrillschumacher.com/projects/2018-07-01-magento2-mocks/
19 stars 4 forks source link

Compilation breaks in 2.3.1 #5

Closed francescosalvi closed 5 years ago

francescosalvi commented 5 years ago

On 2.3.1 bin/magento setup:di:compile breaks with error

Magento\Bundle\Model\Selection
        Incompatible argument type: Required type: \Magento\Framework\Model\ResourceModel\AbstractResource. Actual type: \Magento\Bundle\Model\ResourceModel\Selection; File: 
/opt/atlassian/pipelines/agent/build/vendor/magento/module-bundle/Model/Selection.php

Error is fixed by extending the correct class (AbstractResource) and adding the required method stubs (_construct, getConnection), but I didn't test against possible side effects

SchumacherFM commented 5 years ago

Thank you for reporting and it would be super cool if you can send me a pull request with that fix as I don't have the time to fix it.