olegkoval / magento2-regenerate_url_rewrites

Magento 2 extension which add feature of regenerating a url rewrites of products/categories
Academic Free License v3.0
420 stars 117 forks source link

Errors during compilation #127

Closed sbodak closed 4 years ago

sbodak commented 4 years ago

Hi,

During compilation I'm getting the following error:

Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 68.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 68.0 MiB
Proxies code generation... 0/7 [>---------------------------] 0% 1 sec 68.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 72.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 72.0 MiB
Repositories code generation... 2/7 [========>-------------------] 28% 6 secs 224.0 MiB
Service data attributes generation... 2/7 [========>-------------------] 28% 6 secs 224.0 MiB
Service data attributes generation... 3/7 [============>---------------] 42% 6 secs 224.0 MiB
Application code generator... 3/7 [============>---------------] 42% 6 secs 224.0 MiB
Application code generator... 4/7 [================>-----------] 57% 17 secs 246.0 MiB
Interceptors generation... 4/7 [================>-----------] 57% 17 secs 246.0 MiB
Interceptors generation... 5/7 [====================>-------] 71% 36 secs 288.0 MiB
Area configuration aggregation... 5/7 [====================>-------] 71% 36 secs 288.0 MiB
Area configuration aggregation... 6/7 [========================>---] 85% 49 secs 414.0 MiB
Interception cache generation... 6/7 [========================>---] 85% 49 secs 414.0 MiB
Errors during compilation:
 OlegKoval\RegenerateUrlRewrites\Helper\Regenerate
 Incorrect dependency in class OlegKoval\RegenerateUrlRewrites\Helper\Regenerate in xxx/vendor/olegkoval/magento2-regenerate-url-rewrites/Helper/Regenerate.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
Total Errors Count: 1

Constructor class in OlegKoval\RegenerateUrlRewrites\Helper\Regenerate should be replaced with:

     * Regenerate constructor.
     * @param Context $context
     * @param StoreManagerInterface $storeManager
     */
    public function __construct(
        Context $context,
        StoreManagerInterface $storeManager
    )
    {
        parent::__construct($context);
        $this->storeManager = $storeManager;
    }

The $this->scopeConfig = $context->getScopeConfig(); is defined in the parent class.

olegkoval commented 4 years ago

Hello @sbodak

Thank you for the issue report. Just fixed it in release v1.5.5.

Best regards, Oleg Koval