Magestore / Bannerslider-Magento2

Banner Slider Extension on Magento 2 - best way to capture the eyes of visitors!
http://www.magestore.com/banner-slider-on-magento2.html/
82 stars 100 forks source link

error in setup:di:compile #63

Open jloffredo opened 7 years ago

jloffredo commented 7 years ago

Hi! I'm getting the following error:

Interception cache generation...

Errors during compilation: Magestore\Bannerslider\Controller\Index Incorrect dependency in class Magestore\Bannerslider\Controller\Index in /var/www/app/code/Magestore/Bannerslider/Controller/Index.php \Magento\Framework\ObjectManagerInterface already exists in context object Total Errors Count: 1 Errors during compilation: Magestore\Bannerslider\Controller\Index Incorrect dependency in class Magestore\Bannerslider\Controller\Index in /var/www/app/code/Magestore/Bannerslider/Controller/Index.php \Magento\Framework\ObjectManagerInterface already exists in context object Total Errors Count: 1 Errors during compilation: Magestore\Bannerslider\Controller\Index Incorrect dependency in class Magestore\Bannerslider\Controller\Index in /var/www/app/code/Magestore/Bannerslider/Controller/Index.php \Magento\Framework\ObjectManagerInterface already exists in context object Total Errors Count: 1 Errors during compilation: Magestore\Bannerslider\Controller\Index Incorrect dependency in class Magestore\Bannerslider\Controller\Index in /var/www/app/code/Magestore/Bannerslider/Controller/Index.php \Magento\Framework\ObjectManagerInterface already exists in context object Total Errors Count: 1 Errors during compilation: Magestore\Bannerslider\Controller\Index Incorrect dependency in class Magestore\Bannerslider\Controller\Index in /var/www/app/code/Magestore/Bannerslider/Controller/Index.php \Magento\Framework\ObjectManagerInterface already exists in context object Total Errors Count: 1

Thanks!

ps202 commented 7 years ago

same here

dwdonline commented 7 years ago

This fix is to open each of those files and remove the line

\Magento\Framework\ObjectManagerInterface

This errors is saying that there is no need to include that because it's already included in the Context Object.

marcatos commented 7 years ago

Hi @jloffredo we fixed this issue in our fork doing a general code refactoring https://github.com/Hevelop/Bannerslider-Magento2/commit/dcb2317308ad656a7ee00807285a29e0b3bb2561#diff-1912a94f3ea702f7b9c056b495b32927R131

skuzmina commented 7 years ago

Hi @marcatos. We also have this issue. When you are planing to release official version with the fix?

marcatos commented 7 years ago

Hi @skuzmina, I see this repo has a lot of opened issue but with no answer given from maintainers. I think you can use our fork directly, for every issue we fix we add a tag to the commit so you can set the repository in your own composer package manager (toran, satis) or download latest version from github (https://github.com/Hevelop/Bannerslider-Magento2/releases).