anzusystems/contracts
Common contracts for AnzuSystems projects: reusable PHP interfaces, traits, abstracts, enums, and shared utilities. Includes identifiable/value object patterns, time/user tracking, document and cache settings contracts, plus core app/user/permission helpers and exceptions.
locale field to AnzuUser suggests localization support, which could be valuable for multilingual applications while preserving DDD principles.locale field introduces a domain-specific extension that may require adjustments in existing implementations.locale-related changes may necessitate updates to user-related contracts (e.g., AnzuUserInterface).locale field addition implies tighter coupling to user-related entities. Teams using custom user implementations (e.g., App\Models\User) may need to extend or adapt their models to comply with the new contract.locale field is likely a simple property addition, not a breaking structural change.locale queries or migrations.locale field change is minimally invasive and likely well-documented in the changelog. However, usage examples for localization are still missing.locale field; reliability under load remains unproven.AnzuUser extension may assume Laravel’s Eloquent user model conventions, limiting framework-agnostic reuse. Teams using non-Eloquent user systems (e.g., custom APIs) may face integration challenges.locale field interact with existing user authentication? (e.g., Does it require middleware or policy updates?)locale field?locale is null?)locale field.locale usage gaps.App\Models\User) need extension or replacement.locale field to user tables (if using a database).AnzuUserInterface methods.locale field.AnzuUserInterface or create an adapter.locale field, you’ll need to add it or use a trait.locale column to users table.| Phase | Task | Dependencies |
|---|---|---|
| 1. Evaluation | Review AnzuUserInterface and locale requirements |
None |
| 2. Database Migration | Add locale column to user table (if applicable) |
Eloquent setup |
| 3. Model/Contract Update | Extend user model to implement AnzuUserInterface |
Migration |
| 4. Service Integration | Update user services to use the new contract | Model update |
| 5. Localization Logic | Implement locale-aware business rules (e.g., queries, policies) | Service integration |
| 6. Testing | Validate locale handling in auth, APIs, and UI | All prior phases |
locale change is narrow in scope, reducing immediate support needs.locale-related logic may require deep dives into the package’s user contracts.locale field is only stored/retrieved without complex logic.| Risk | Mitigation |
|---|---|
| Locale-related bugs in auth | Test thoroughly with locale=null and edge cases. |
| Contract violations in user services | Use static analysis tools (e.g., PHPStan) to enforce compliance. |
| Database migration failures | Back up the users table before adding the locale column. |
| Performance regressions from locale queries | Benchmark with and without the new field. |
AnzuUserInterface to understand locale requirements.How can I help you explore Laravel packages today?