zoltanka/bypass-readonly
PHPUnit plugin that lets you bypass PHP readonly and final restrictions for testing. Useful when you need to mock, extend, or modify classes marked final/readonly without changing production code. Inspired by dg/bypass-finals.
| Risk Area | Severity | Mitigation Strategy | Update |
|---|---|---|---|
| Data Integrity | High | Restrict bypass to trusted roles. | No change. |
| Performance | Medium | Avoid global bypass. | No change. |
| Version Compatibility | Low | Test with Laravel 10+. | New: Explicitly test with Laravel 10.x if using latest LTS. |
| Security | High | Combine with authorize() gates. |
No change. |
| Testing Complexity | Medium | Mock read-only constraints. | No change. |
append/hidden attributes.Settings).Risk:
zoltanka/bypass-readonlyis unmaintained; consider forking or replacing.
| Failure Scenario | Impact | Mitigation | Update |
|---|---|---|---|
| Unauthorized Bypass | Data corruption | Use Laravel gates/policies. | No change. |
| Bypass + Database Constraint | Silent failure | Add transaction rollback. | No change. |
| Package Bug | Attribute corruption | New: Test with edge cases; fork if critical. | |
| Over-Reliance on Bypass | Spaghetti logic | Refactor to remove constraints. | No change. |
## Maintenance Note
- This package is **unmaintained** (last release: 2023).
- Consider forking or replacing for long-term projects.
How can I help you explore Laravel packages today?