* chore: remove prettus/l5-repository (Phase 8 cleanup)
Phase 8 of the Prettus repository removal. Phases 1-7 deleted all 25 concrete
repositories and rewired callers; this drops the package itself plus the
remaining scaffolding.
- Migrate Sluggable observer registration from ObserverServiceProviders boot
to #[ObservedBy(Sluggable::class)] attributes on FlightField, FlightFieldValue,
Page, PirepField, PirepFieldValue.
- Delete app/Providers/ObserverServiceProviders.php, app/Contracts/Repository.php,
app/Repositories/ (incl. Criteria/WhereCriteria.php), config/repository.php.
- Drop RepositoryServiceProvider and ObserverServiceProviders from config/app.php.
- Sweep dead 'use Prettus\Validator\Exceptions\ValidatorException' imports from
10 files plus the 12 orphaned '@throws ValidatorException' docblock lines that
PHPStan would otherwise flag as throws.notThrowable.
- Move pagination default from deleted config/repository.php to config/phpvms.php
('pagination.limit' => 20, matches historical value). Update 8 prod callers +
2 test sites to read 'phpvms.pagination.limit'.
- Drop App\Contracts\Repository exception from tests/Arch/GlobalTest.php
http-helpers rule.
- composer remove prettus/l5-repository (drops prettus/laravel-validation
transitively).
No public API, JSON shape, or behavior change. Pint, PHPStan level 5, Pest, and
Rector --dry-run all pass; the 7 pre-existing CSRF/ProfileUpdated test failures
on main remain unchanged.
* fix(pagination): default 50, max cap 100, central paginate_limit() helper
Address PR #2202 review feedback (CodeRabbit + Copilot):
- config/phpvms.php: pagination.limit = 50 (default page size),
pagination.max = 100 (hard cap on ?limit= query input).
- Add paginate_limit() helper in app/helpers.php that resolves the raw
?limit= value, falls back to pagination.limit, and clamps to
[1, pagination.max]. Single source of truth for per-page sanitization.
- Replace ad-hoc `$request->query('limit') ?: config(...)` patterns in
8 controllers with paginate_limit():
- Api: AirportController, FleetController, FlightController,
NewsController, UserController (fleet + pireps)
- Frontend: FlightController, PirepController, UserController
Frontend/UserController previously used 20 as fallback default; now
consistent with the rest of the app at 50.
- SearchAirportsRequest validator now bounds ?limit= against
pagination.max (100) instead of pagination.limit (50), so callers can
request the full clamp range. Add boundary test asserting limit=100
passes and limit=101 fails.
Net effect: API endpoints can no longer be coerced into oversized result
sets via ?limit=. Default page size moves from 20 to 50 to match the
review consensus.