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
Conversation
c7b4b7d
to
94d059c
Compare
…eating error in CLI command when the database access is not configured
…figuration is defined yet
…and warmup when no parameters are set
94d059c
to
64fc8a8
Compare
*/ | ||
class DatabaseConnection extends Connection | ||
{ | ||
private const PARAMETERS_FILE = __DIR__ . '/../../../app/config/parameters.php'; |
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.
Suggestion: make it configurable with a construct
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'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() |
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.
Little unit test?
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 @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
-
./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 notHTTP redirection from Tools method is disabled when running in CLI environment
-
SqlTranslationLoader
returns an empty catalogue when the DB is not accessiblecomposer 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