Skip to content
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

CLI improvement before and during install #35011

Merged
merged 13 commits into from Jan 18, 2024

Conversation

jolelievre
Copy link
Contributor

@jolelievre jolelievre commented Jan 9, 2024

Questions Answers
Branch? develop
Description? Miscellaneous improvement for CLI commands:
- ./bin/console can now be executed even when the shop is not installed yet, as well as ./bin/console cache:clear
- Add more logs in the install process especially when executing CLI install
- LocalizationExtension was refactored to prevent some early fatal error when the shop was not installed, LocaleExtension was removed and merged into this extension
- A wrapper class was added for DBAL connection, it prevents a bug when parameters are not configured, so the database platform cannot be guessed
- Yaml and twig linter were failing silently, they are now operational again
- To prevent any future regression a CLI was added to check that ./bin/console and ./bin/console cache:clear can be be executed without failure whether the shop is installed or not
HTTP redirection from Tools method is disabled when running in CLI environment
- SqlTranslationLoader returns an empty catalogue when the DB is not accessible
Type? improvement
Category? CO
BC breaks? no
Deprecations? no
How to test? Checkout the project, run composer install, run ./bin/console and ./bin/console cache:clear previously it failed, now it succeeds even if some warnings are still left When you perform a CLI install you get more log output to track what is happening
UI Tests https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/7475031416
Fixed issue or discussion? ~
Related PRs ~
Sponsor company ~

@prestonBot prestonBot added develop Branch Improvement Type: Improvement labels Jan 9, 2024
@jolelievre jolelievre changed the title Cli improvement CLI improvement before and during install Jan 9, 2024
@jolelievre jolelievre force-pushed the cli-improvement branch 6 times, most recently from c7b4b7d to 94d059c Compare January 10, 2024 10:55
@jolelievre jolelievre marked this pull request as ready for review January 10, 2024 11:14
@jolelievre jolelievre requested a review from a team as a code owner January 10, 2024 11:14
@ps-jarvis ps-jarvis added the Waiting for QA Status: action required, waiting for test feedback label Jan 12, 2024
*/
class DatabaseConnection extends Connection
{
private const PARAMETERS_FILE = __DIR__ . '/../../../app/config/parameters.php';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: make it configurable with a construct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna try but I'm not sure it's easily doable I wanted to do it at first but it implies modifying the constructor compared to the parent, and changing this constructor might mess with Doctrine initialization so I can't guarantee it will be doable

{
private const PARAMETERS_FILE = __DIR__ . '/../../../app/config/parameters.php';

public function getDatabasePlatform()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little unit test?

Copy link
Contributor

@AureRita AureRita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jolelievre

Thank you for your PR, I tested it and it seems to works as you can see :

recording.64.webm

Link to the auto test : https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/7475031416

Because the auto test is 🟢 and the PR seems to works as expected, It's QA ✔️

Thank you

@AureRita AureRita added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Jan 18, 2024
@nicosomb nicosomb merged commit 88fcb83 into PrestaShop:develop Jan 18, 2024
23 checks passed
@jolelievre jolelievre deleted the cli-improvement branch February 1, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement QA ✔️ Status: check done, code approved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

9 participants