-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not initialize in tasks the Core by default, only when requested #1160
base: dev
Are you sure you want to change the base?
Do not initialize in tasks the Core by default, only when requested #1160
Conversation
classes/Task/AbstractTask.php
Outdated
$this->container->getFileLoader()->addXmlMd5File($this->container->getUpgrader()->getDestinationVersion(), $this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $archiveXml); | ||
} | ||
} | ||
public function init(): void {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can change this to
public function init(): void {} | |
abstract public function init(): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By declaring the method as abstract, I will need to define it on each task even if I have nothing to call. This is not the behavior I wanted.
classes/Task/Update/UpdateFiles.php
Outdated
$archiveXml = $this->container->getUpdateConfiguration()->getLocalChannelXml(); | ||
$this->container->getFileLoader()->addXmlMd5File( | ||
$this->container->getUpgrader()->getDestinationVersion(), | ||
$this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $archiveXml | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not only necessary for the local channel
$archiveXml = $this->container->getUpdateConfiguration()->getLocalChannelXml(); | |
$this->container->getFileLoader()->addXmlMd5File( | |
$this->container->getUpgrader()->getDestinationVersion(), | |
$this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $archiveXml | |
); | |
if ($this->container->getUpdateConfiguration()->isChannelLocal()) { | |
$archiveXml = $this->container->getUpdateConfiguration()->getLocalChannelXml(); | |
$this->container->getFileLoader()->addXmlMd5File($this->container->getUpgrader()->getDestinationVersion(), $this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $archiveXml); | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to commit it, indeed
e8192e3
to
30b90e9
Compare
30b90e9
to
1c7ee5d
Compare
|
initPrestaShopCore()
. This PR also moves a XML initialization to a specific place instead of at the beginning of each update task.