Skip to content

Commit 7a75f58

Browse files
committed
2464: Update default Magento version references
Replaced default version "2.4.7" with "2.3.0" across various logic to reflect the updated versioning requirements. Removed redundant validation calls while keeping essential validations intact to improve code maintainability. These changes enhance version consistency and simplify future modifications.
1 parent 44c515d commit 7a75f58

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

src/main/java/com/magento/idea/magento2uct/execution/configurations/UctSettingsEditor.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ private void validateSettingsForm() {
339339
comingVersionError.setForeground(new Color(252, 119, 83));
340340

341341
validateExecutablePathField();
342-
validateComingVersionField((ComboBoxItemData) comingVersion.getSelectedItem());
343342

344343
myScriptName
345344
.getComponent()
@@ -381,15 +380,15 @@ private void validateExecutablePathField() {
381380
* @param selectedItem ComboBoxItemData
382381
*/
383382
private void validateComingVersionField(final ComboBoxItemData selectedItem) {
384-
// final Matcher matcher = MAGENTO_VERSION_PATTERN.matcher(selectedItem.getText());
385-
//
386-
// if (selectedItem != null && selectedItem.getKey().isEmpty()) {
387-
// comingVersionError.setText("Please, specify target version");
388-
// } else if (!matcher.find()) { // NOPMD
389-
// comingVersionError.setText("Please, correct target version");
390-
// } else {
391-
// comingVersionError.setText("");
392-
// }
383+
final Matcher matcher = MAGENTO_VERSION_PATTERN.matcher(selectedItem.getText());
384+
385+
if (selectedItem != null && selectedItem.getKey().isEmpty()) {
386+
comingVersionError.setText("Please, specify target version");
387+
} else if (!matcher.find()) { // NOPMD
388+
comingVersionError.setText("Please, correct target version");
389+
} else {
390+
comingVersionError.setText("");
391+
}
393392
}
394393

395394
/**

src/main/java/com/magento/idea/magento2uct/settings/UctSettingsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public void setCurrentVersion(final @Nullable SupportedVersion version) {
175175
public @NotNull SupportedVersion getCurrentVersionOrDefault() {
176176
final SupportedVersion currentVersion = getCurrentVersion();
177177

178-
return currentVersion == null ? SupportedVersion.valueOf("2.4.7") : currentVersion;
178+
return currentVersion == null ? SupportedVersion.valueOf("2.3.0") : currentVersion;
179179
}
180180

181181
/**

src/main/java/com/magento/idea/magento2uct/versioning/indexes/data/ApiCoverageStateIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private void groupLoadedData() {
168168
VersioningDataOperationsUtil.unionVersionDataWithChangelog(
169169
versioningData,
170170
new ArrayList<>(Collections.singletonList(
171-
SupportedVersion.valueOf("2.4.7").getVersion()
171+
SupportedVersion.valueOf("2.3.0").getVersion()
172172
)),
173173
true
174174
);

src/main/java/com/magento/idea/magento2uct/versioning/indexes/data/DeprecationStateIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private void groupLoadedData() {
151151
VersioningDataOperationsUtil.unionVersionDataWithChangelog(
152152
versioningData,
153153
new ArrayList<>(Collections.singletonList(
154-
SupportedVersion.valueOf("2.4.7").getVersion()
154+
SupportedVersion.valueOf("2.3.0").getVersion()
155155
)),
156156
true
157157
);

src/main/java/com/magento/idea/magento2uct/versioning/indexes/data/ExistenceStateIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private void groupLoadedData() {
196196
VersioningDataOperationsUtil.unionVersionDataWithChangelog(
197197
versioningData,
198198
new ArrayList<>(Collections.singletonList(
199-
SupportedVersion.valueOf("2.4.7").getVersion()
199+
SupportedVersion.valueOf("2.3.0").getVersion()
200200
)),
201201
false
202202
);

0 commit comments

Comments
 (0)