Skip to content

fix: phpcs errors#138

Merged
Morgy93 merged 3 commits intomainfrom
fix-phpcs-2
Feb 14, 2026
Merged

fix: phpcs errors#138
Morgy93 merged 3 commits intomainfrom
fix-phpcs-2

Conversation

@Morgy93
Copy link
Collaborator

@Morgy93 Morgy93 commented Feb 14, 2026

This pull request refactors how system tool versions are checked in the CheckCommand class by replacing direct exec calls with Magento's Shell service. This change improves code safety, error handling, and consistency across all version-checking methods. Additionally, there is a minor cleanup in the BlockCacheCollector class.

Refactoring system tool version checks:

  • Replaced direct exec usage with the Shell service for checking versions of Node.js, MySQL client, Composer, npm, and Git in CheckCommand, improving error handling and code safety. (src/Console/Command/System/CheckCommand.php) [1] [2] [3] [4] [5]
  • Updated the constructor of CheckCommand to inject the Shell service. (src/Console/Command/System/CheckCommand.php) [1] [2]

Minor cleanup:

  • Removed an unused @package annotation from the BlockCacheCollector class docblock. (src/Service/Inspector/Cache/BlockCacheCollector.php)

Copilot AI review requested due to automatic review settings February 14, 2026 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the CheckCommand class to replace direct exec() calls with Magento's Shell service for checking versions of system tools (Node.js, MySQL client, Composer, npm, and Git). This improves code safety, error handling consistency, and adherence to Magento framework best practices. Additionally, it includes a minor documentation cleanup in the BlockCacheCollector class.

Changes:

  • Replaced all direct exec() usage with Magento's Shell service in CheckCommand for improved security and error handling
  • Added Shell service dependency injection to CheckCommand constructor
  • Removed unused @package annotation from BlockCacheCollector docblock

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Service/Inspector/Cache/BlockCacheCollector.php Removed unused @package annotation from class docblock
src/Console/Command/System/CheckCommand.php Refactored system tool version checking methods to use Shell service instead of direct exec calls, added Shell service dependency injection

@Morgy93 Morgy93 merged commit 625c6da into main Feb 14, 2026
12 checks passed
@Morgy93 Morgy93 deleted the fix-phpcs-2 branch February 14, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments