Skip to content

Commit

Permalink
fix: from review feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Nov 12, 2024
1 parent 5d473bc commit f7483cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions classes/Parameters/UpgradeConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public function getLocalChannelVersion(): ?string

/**
* Get channel selected on config panel (Minor, major ...).
* @return Upgrader::CHANNEL_*|null
*/
public function getChannel(): ?string
{
Expand Down
2 changes: 1 addition & 1 deletion classes/UpgradePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private function getJsParams(string $ajaxResult): array
'ajaxUpgradeTabExists' => file_exists($this->autoupgradePath . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php'),
'currentIndex' => $this->currentIndex,
'tab' => 'AdminSelfUpgrade',
UpgradeConfiguration::CHANNEL => $this->config->get(UpgradeConfiguration::CHANNEL),
UpgradeConfiguration::CHANNEL => $this->config->getChannel(),
'autoupgrade' => [
'version' => $this->upgradeSelfCheck->getModuleVersion(),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class UpdatePageVersionChoiceController extends AbstractPageController
const CURRENT_STEP = UpdateSteps::STEP_VERSION_CHOICE;
const FORM_NAME = 'version_choice';
const FORM_FIELDS = [
'channel' => UpgradeConfiguration::CHANNEL,
'archive_zip' => UpgradeConfiguration::ARCHIVE_ZIP,
'archive_xml' => UpgradeConfiguration::ARCHIVE_XML,
UpgradeConfiguration::CHANNEL => UpgradeConfiguration::CHANNEL,
UpgradeConfiguration::ARCHIVE_ZIP => UpgradeConfiguration::ARCHIVE_ZIP,
UpgradeConfiguration::ARCHIVE_XML => UpgradeConfiguration::ARCHIVE_XML,
];
const FORM_OPTIONS = [
'online_value' => Upgrader::CHANNEL_ONLINE,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Parameters/ConfigurationValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function testValidateZipSuccess()

public function testValidateZipFail()
{
$result = $this->validator->validate(['channel' => 'local', UpgradeConfiguration::ARCHIVE_ZIP => '']);
$result = $this->validator->validate([UpgradeConfiguration::CHANNEL => 'local', UpgradeConfiguration::ARCHIVE_ZIP => '']);
$this->assertEquals([
[
'message' => 'No zip archive provided',
Expand Down

0 comments on commit f7483cd

Please sign in to comment.