Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yireo/Yireo_ExtensionChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Feb 3, 2024
2 parents c4ef0a2 + 22ebd6d commit 59454ce
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Message
private string $message;
private string $group;
private string $suggestion;
private string $module;

/**
* @param MessageGroupLabels $messageGroupLabels
Expand Down
5 changes: 3 additions & 2 deletions Message/MessageBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ public function getMessages(): array
* @param string $group
* @param string $suggestion
*/
public function add(string $message, string $group, string $suggestion = '')
public function add(string $message, string $group, string $suggestion = '', string $module = '')
{
$this->messages[] = $this->objectManager->create(Message::class, [
'message' => $message,
'group' => $group,
'suggestion' => $suggestion
'suggestion' => $suggestion,
'module' => $module,
]);
}

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Scan class dependencies for `@since` and double-check if this minimum version ma
## Tip: Check multiple modules
You can quickly check upon multiple modules with a command like this:

bin/magento mod:st --enabled | grep Yireo_ | while read MODULE ; do
echo "Checking $MODULE"
bin/magento yireo_extensionchecker:scan --module $MODULE --hide-deprecated 1
done
```bash
bin/magento yireo_extensionchecker:scan --module $(bin/magento module:status --enabled | grep -e Yireo_ | awk '{printf "%s%s",sep,$0; sep=","} END{print""}') --hide-needless 1 --hide-deprecated 1
```
2 changes: 1 addition & 1 deletion Scan/ScanComposerRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function scan(string $moduleName, array $components)
$requirements = $composerFile->getRequirements();

foreach ($components as $component) {
$this->scanComponentWithComposerRequirements($component, $requirements);
$this->scanComponentWithComposerRequirements($component, $requirements, $moduleName);
}

foreach ($requirements as $requirement => $requirementVersion) {
Expand Down
2 changes: 1 addition & 1 deletion Scan/ScanModuleXmlDependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function scan(string $moduleName, array $components)

if (!$isComponentFoundInModuleXml) {
$message = 'Module "' . $component->getComponentName() . '" has no module.xml entry';
$this->messageBucket->add($message, MessageGroupLabels::GROUP_MISSING_MODULEXML_DEP);
$this->messageBucket->add($message, MessageGroupLabels::GROUP_MISSING_MODULEXML_DEP, '', $moduleName);
}
}

Expand Down

0 comments on commit 59454ce

Please sign in to comment.