php-tenant/Exceptions
Claude 2601392b8d
refactor: create EntitlementException hierarchy with subtypes
Create exception subclasses for fine-grained error handling:
- LimitExceededException: feature usage limit exceeded
- PackageNotFoundException: package code not found during provisioning
- FeatureNotFoundException: feature code not found during checks
- PackageSuspendedException: workspace packages suspended

Update EntitlementService:
- Add canOrFail() and canForNamespaceOrFail() throwing variants
- Replace firstOrFail() with explicit PackageNotFoundException in provisioning
- Import new exception types, remove unused ModelNotFoundException

Update docs/entitlements.md with Exception Hierarchy section, API reference
entries for new methods, and updated Best Practices examples.

Fixes #19

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:30:48 +00:00
..
EntitlementException.php refactor: create EntitlementException hierarchy with subtypes 2026-03-24 13:30:48 +00:00
FeatureNotFoundException.php refactor: create EntitlementException hierarchy with subtypes 2026-03-24 13:30:48 +00:00
InvalidWebhookUrlException.php security: fix P1 items for rate limiting, auth, SSRF and workspace validation 2026-01-29 13:19:27 +00:00
LimitExceededException.php refactor: create EntitlementException hierarchy with subtypes 2026-03-24 13:30:48 +00:00
MissingWorkspaceContextException.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
PackageNotFoundException.php refactor: create EntitlementException hierarchy with subtypes 2026-03-24 13:30:48 +00:00
PackageSuspendedException.php refactor: create EntitlementException hierarchy with subtypes 2026-03-24 13:30:48 +00:00