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

Fix typed property must not be accessed before initialization error when using --list option #183

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

iNem0o
Copy link
Contributor

@iNem0o iNem0o commented Nov 1, 2024

Hello

When using the db-tools:restore --list command, in the listBackup() method the $this->restorer variable is not inited yet which lead to a fatal error.
https://github.com/makinacorpus/DbToolsBundle/blob/main/src/Command/RestoreCommand.php#L97

As the restorer is inited lately in the main process
https://github.com/makinacorpus/DbToolsBundle/blob/main/src/Command/RestoreCommand.php#L110

i added the same call to the factory inside the listBackups() method to fix and tests case for the --list option

@pounard
Copy link
Member

pounard commented Nov 5, 2024

Hello @iNem0o, thanks, your PR seems fine, please fix the minor comments and it's all good.

Pipeline failure seems unrelated, we'll see how it behave on your next push. If it continues to fail I'll pull your branch and test on my side to be sure it's completely unrelated.

@iNem0o
Copy link
Contributor Author

iNem0o commented Nov 5, 2024

Hello @pounard, I have made the requested changes as per your feedback.
Let me know if there are any further adjustments needed after the CI checks.

@pounard
Copy link
Member

pounard commented Nov 5, 2024

@iNem0o thanks, I'll review this tomorrow.

@pounard pounard merged commit 2927a5f into makinacorpus:main Nov 6, 2024
28 of 30 checks passed
@pounard
Copy link
Member

pounard commented Nov 6, 2024

@iNem0o Thanks! I'll add a line in the changelog file.

pounard pushed a commit that referenced this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants