Skip to content

Commit

Permalink
Merge pull request #1163 from ga-devfront/fix/get-ps-version
Browse files Browse the repository at this point in the history
[FIX] use state version if initialized instead using core files
  • Loading branch information
Quetzacoalt91 authored Feb 19, 2025
2 parents 5586a82 + b9b57c0 commit 18fec9a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion classes/UpgradeContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function getProperty(string $property): ?string
case self::ARCHIVE_FILEPATH:
return $this->getProperty(self::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $this->getProperty(self::ARCHIVE_FILENAME);
case self::PS_VERSION:
return $this->getPrestaShopConfiguration()->getPrestaShopVersion();
return $this->getCurrentPrestaShopVersion();
default:
return '';
}
Expand Down Expand Up @@ -361,6 +361,15 @@ public function getChecksumCompare(): ChecksumCompare
return $this->checksumCompare;
}

public function getCurrentPrestaShopVersion(): string
{
if ($this->getUpdateState()->isInitialized()) {
return $this->getUpdateState()->getCurrentVersion();
}

return $this->getPrestaShopConfiguration()->getPrestaShopVersion();
}

public function getComposerService(): ComposerService
{
if (null === $this->composerService) {
Expand Down

0 comments on commit 18fec9a

Please sign in to comment.