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

Fix compatibility with Symfony Console 5 and Magento 2.4.6 #168

Closed zfmaster closed 10 months ago

gotanasro3 commented 10 months ago

this error

There is an error in .../web/vendor/symfony/console/Command/Command.php at line: 301 Return value of "OlegKoval\RegenerateUrlRewrites\Console\Command\RegenerateUrlRewrites\Interceptor::execute()" must be of the type int, "null" returned.#0 .../web/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()

1 .../web/vendor/magento/framework/Interception/Interceptor.php(138): OlegKoval\RegenerateUrlRewrites\Console\Command\RegenerateUrlRewrites\Interceptor->___callParent()

2 .../web/vendor/magento/framework/Interception/Interceptor.php(153): OlegKoval\RegenerateUrlRewrites\Console\Command\RegenerateUrlRewrites\Interceptor->Magento\Framework\Interception{closure}()

3 .../web/generated/code/OlegKoval/RegenerateUrlRewrites/Console/Command/RegenerateUrlRewrites/Interceptor.php(23): OlegKoval\RegenerateUrlRewrites\Console\Command\RegenerateUrlRewrites\Interceptor->___callPlugins()

4 .../web/vendor/symfony/console/Application.php(1040): OlegKoval\RegenerateUrlRewrites\Console\Command\RegenerateUrlRewrites\Interceptor->run()

5 .../web/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()

6 ..../web/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()

7 .../web/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()

8 .../web/bin/magento(23): Symfony\Component\Console\Application->run()

9 {main}

gotanasro3 commented 10 months ago

.../web/vendor/olegkoval/magento2-regenerate-url-rewrites/Console/Command/RegenerateUrlRewrites.php

SOLUTION working for me

` /**

zfmaster commented 10 months ago

@gotanasro3 you should not use 1 or 0. Check my PR - the right way is to use constants: Command::FAILURE, Command::SUCCESS.

gotanasro3 commented 10 months ago

@gotanasro3 you should not use 1 or 0. Check my PR - the right way is to use constants: Command::FAILURE, Command::SUCCESS.

thanks you