Skip to content

Commit 8621db0

Browse files
author
Oleg Koval
committed
Fixed Symfony Command constant issue
1 parent 457ff88 commit 8621db0

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [1.6.2] - 2023-10-10
8+
### Changed
9+
- fixed Symfony Command constant issue
10+
711
## [1.6.1] - 2023-08-24
812
### Changed
913
- fixed compatibility with Symfony Console 5 and Magento 2.4.6

Console/Command/RegenerateUrlRewrites.php

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818

1919
class RegenerateUrlRewrites extends RegenerateUrlRewritesAbstract
2020
{
21+
/**
22+
* Code of success command action.
23+
* Code was added because old version of Symfony Command do not have this constant.
24+
*/
25+
const SUCCESS = 0;
26+
27+
/**
28+
* Code of fail command action
29+
* Code was added because old version of Symfony Command do not have this constant.
30+
*/
31+
const FAILURE = 1;
32+
2133
/**
2234
* @var null|Symfony\Component\Console\Input\InputInterface
2335
*/
@@ -131,7 +143,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
131143
foreach ($this->_errors as $error) {
132144
$this->_addConsoleMsg($error);
133145
}
134-
return Command::FAILURE;
146+
return self::FAILURE;
135147
}
136148

137149
// set area code if needed
@@ -167,7 +179,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
167179
$this->_showSupportMe();
168180
$this->_output->writeln('Finished');
169181

170-
return Command::SUCCESS;
182+
return self::SUCCESS;
171183
}
172184

173185
/**

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Add into Magento 2 a CLI feature which allow to regenerate a Url Rewrites of products and categories",
44
"keywords": ["magento", "magento2 extension", "magento 2 extension", "extension", "module", "magento2 module", "magento 2 module"],
55
"type": "magento2-module",
6-
"version": "1.6.1",
6+
"version": "1.6.2",
77
"homepage": "https://github.com/olegkoval/magento2-regenerate_url_rewrites",
88
"authors": [
99
{

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
-->
1212
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
13-
<module name="OlegKoval_RegenerateUrlRewrites" setup_version="1.6.1">
13+
<module name="OlegKoval_RegenerateUrlRewrites" setup_version="1.6.2">
1414
<sequence>
1515
<module name="Magento_Store"/>
1616
<module name="Magento_Catalog"/>

0 commit comments

Comments
 (0)