Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the deprecated ContainerAwareCommand usage with constructor-based dependency injection for compatibility with PrestaShop 9.
- Commands now extend
Symfony\Component\Console\Command\Commandand accept their services through constructors. - Removed calls to
$this->getContainer()and updated service definitions inservices.yml.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Commands/ManageModulesCommand.php | Switched to base Command, injected Manager, removed container calls |
| src/Commands/ListUpgradableModulesCommand.php | Switched to base Command, injected ModuleRepositoryInterface |
| src/Commands/GeneratePatchCommand.php | Switched to base Command, injected Generator |
| config/services.yml | Added constructor arguments for commands to match new constructor signatures |
Comments suppressed due to low confidence (2)
config/services.yml:66
- The service ID does not match the injected
ModuleRepositoryInterface. Ensure you reference the actual service (e.g.,@prestashop.core.admin.module.repositoryor the correct interface service ID) so the expected repository is injected.
- '@PrestaShop\PrestaShop\Core\Module\ModuleRepository'
src/Commands/ManageModulesCommand.php:78
- Assigning to an undeclared dynamic property
$outputis deprecated in modern PHP. Declare a class property likeprivate OutputInterface $output;to ensure proper typing and avoid dynamic properties.
$this->output = $output;
fe0648c to
5bed38f
Compare
5bed38f to
8704a89
Compare
8704a89 to
57ae6d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remplace deprecated containerAwareCommand with dependency injection