Skip to content

Commit

Permalink
Include all modules that start with yii|craft
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Dec 14, 2023
1 parent 36483b1 commit 87c88f0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ public static function getModuleAliases(): Collection
$packages = new Collection($data['packages'] ?? null);

return $packages
->whereIn('type', ['yii-module', 'craft-module'])
->flatMap(function($package) {
->flatMap(function(array $package) {
$packageName = $package['name'] ?? null;
$packageType = $package['type'] ?? null;

if (!$packageName) {
if (
!$packageName ||
!$packageType ||
!preg_match('/^(craft|yii)/', $packageType)
) {
return null;
}

Expand Down

0 comments on commit 87c88f0

Please sign in to comment.