-
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
[NEW UI] add middleware system and first middleware on update options page #1136
Conversation
Quality Gate passedIssues Measures |
|
||
class UpdateIsConfigured extends AbstractMiddleware | ||
{ | ||
public function process(): ?string |
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.
public function process(): ?string | |
/** | |
* @return Routes::*|null | |
*/ | |
public function process(): ?string |
|
||
use PrestaShop\Module\AutoUpgrade\Router\Routes; | ||
|
||
class LocalChannelXmlAndZipExist extends AbstractMiddleware |
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.
The validation function does more than just check the presence of the zip/xml pair, right?
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.
Yes and no, it check validty only if we are on channel local.
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.
for me in addition to validating the presence of files, it also validates the presence of versions and the match of this one. So the middleware doesn't really reflect what is being done
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.
You think LocalChannelXmlAndZipAreValid
is better ?
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.
Hi @ga-devfront
Thank you for your PR, I tested it and it seems to works as you can see :
recording.52.webm
I also tested when you delete the file "update_config.var", and it works as expected ( You have to select again your version destination )
Tested from :
8.0.4 to 8.2
8.2 to 9.0.0
8.0.4 to 9.0.0
Because the PR seems to works as expected, It's QA ✔️
Thank you
Test Steps for Update Options Page Redirection Logic
Navigate to the module homepage.
Test without a version choice:
route
parameter in the URL toupdate-page-update-options
(replacingupdate-page-version-choice
).update-page-version-choice
.Test with the online channel:
route
parameter in the URL toupdate-page-update-options
.update-page-update-options
.Test with the local channel:
update-page-version-choice
.route
parameter in the URL toupdate-page-update-options
.update-page-update-options
.Test invalid file references:
update-page-version-choice
.route
parameter in the URL toupdate-page-update-options
.update-page-version-choice
.PS: If you have already a configuration set you can delete it manually from you server by removing
/admin-folder/autoupgrade/update_config.varl