• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 11495

09 May 2026 07:35AM UTC coverage: 69.06% (-3.8%) from 72.847%
11495

Pull #408

circleci

edwh
docs(migration): mark restartproject and repaircafewales as migrated (PR #408)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull Request #408: feat(batch): migrate check_cgas, visualise, tn_sync + dry-run improvements

9127 of 10554 branches covered (86.48%)

Branch coverage included in aggregate %.

507 of 663 new or added lines in 16 files covered. (76.47%)

11902 existing lines in 138 files now uncovered.

101630 of 149824 relevant lines covered (67.83%)

19.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/iznik-batch/app/Console/Commands/Membership/ProcessMembershipsCommand.php
1
<?php
2

3
namespace App\Console\Commands\Membership;
4

5
use App\Console\Concerns\PreventsOverlapping;
6
use App\Services\MembershipsProcessingService;
7
use App\Traits\GracefulShutdown;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class ProcessMembershipsCommand extends Command
12
{
13
    use PreventsOverlapping;
14
    use GracefulShutdown;
15

16
    protected $signature = 'memberships:process
17
                            {--dry-run : Log what would be processed without making changes}';
18

19
    protected $description = 'Process pending membership history entries: send per-group welcome emails, flag reviewed members';
20

21
    public function handle(MembershipsProcessingService $service): int
×
22
    {
23
        if (!$this->acquireLock()) {
×
24
            $this->info('Already running, exiting.');
×
25
            return Command::SUCCESS;
×
26
        }
27

28
        try {
NEW
29
            $dryRun = (bool) $this->option('dry-run');
×
30

NEW
31
            if ($dryRun) {
×
NEW
32
                $this->info('DRY RUN — no emails will be sent or records updated.');
×
33
            }
34

NEW
35
            Log::info('Starting membership processing', ['dry_run' => $dryRun]);
×
36

NEW
37
            $count = $service->processAll($dryRun);
×
38

NEW
39
            $prefix = $dryRun ? '[DRY RUN] Would process' : 'Processed';
×
NEW
40
            $this->info("{$prefix} {$count} entry/entries.");
×
NEW
41
            Log::info('Membership processing complete', ['count' => $count, 'dry_run' => $dryRun]);
×
42

43
            return Command::SUCCESS;
×
44
        } finally {
45
            $this->releaseLock();
×
46
        }
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc