mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
- Add authorization checks to API controller endpoints (view, create, update, delete) - Wrap Livewire component methods with try-catch for consistent error handling - Add AuthorizesRequests trait to components requiring authorization checks - Ensure all sensitive operations verify user permissions before execution - Implement unified error handling with handleError() helper function
681 B
681 B
Lessons Learned
Docker / Worktree Setup
- The Docker dev container mounts from
young-storkworktree, NOTivory-raccoon - Do NOT copy files to
young-storkor usedocker cp— only modify files in theivory-raccoonworktree - Do NOT use
docker execto run tests — work entirely within theivory-raccoonworktree
Policy Tests
- Policy methods have typed parameters (e.g.,
Server $server) — anonymous classes cause TypeError - Must use
Mockery::mock(Model::class)->makePartial()instead of anonymous classes for model stubs - Use
shouldReceive('getAttribute')->with('property')->andReturn(value)for model properties accessed via relationship chains