# Issue #202: findArchived() Filters in PHP Instead of SQL

## Problem

The `MemberService::findArchived()` method fetches ALL members then filters in PHP:

```php
public function findArchived(?int $limit = null, ?int $offset = null): array {
    $members = $this->memberMapper->findAll($limit, $offset, true);
    $archived = array_filter($members, fn(Member $m) => $m->getDeletedAt() !== null);
    return array_values(array_map(function (Member $member) {
        // ...
    }, $archived));
}
```

This means pagination is broken — `limit` and `offset` apply to ALL members, not just archived ones.

## Impact

- Incorrect pagination on archive page
- Unnecessary data transfer (all members, not just archived)
- N+1 query problem (sub-entities loaded unnecessarily)

## Solution

Add a dedicated mapper method:

```php
public function findArchived(?int $limit = null, ?int $offset = null): array {
    $qb = $this->db->getQueryBuilder();
    $qb->select('*')
        ->from($this->getTableName())
        ->where($qb->expr()->isNull('deleted_at'))
        ->andWhere($qb->expr()->isNotNull('deleted_at')) // or status check
        ->orderBy('deleted_at', 'DESC')
        // ... pagination
}
```

## Tasks

- [ ] Add `MemberMapper::findArchived(?int $limit, ?int $offset): array`
- [ ] Update `MemberService::findArchived()` to use the new mapper method
- [ ] Remove the PHP array_filter call
- [ ] Test pagination with archived members

## Labels

- bug
- backend
- priority:high