havvg/propel-boolean-extra-behavior
Propel ORM behavior that adds readability-focused helper methods for boolean columns. Install as a third-party behavior and enable it in schema.xml with to generate extra boolean accessor methods.
isActive() instead of getActive(), setActive(true) instead of setActive(1)), reducing cognitive load and improving code readability.isEnabled, hasPermission, isVerified).isAdmin(), isBanned()).isNewUIEnabled()).isDeleted() for soft deletes).hasConsent()).user->isActive() over user->getActive()).getIsActive()).isEligible()), which may require custom logic beyond accessors."This lightweight package standardizes how our team interacts with boolean fields in Propel ORM, making the codebase more intuitive and maintainable. For example, instead of user->getActive(), developers will use user->isActive(), which aligns with natural language and reduces bugs. It’s a zero-risk, high-reward change—like adding spellcheck to our boolean logic. Given [X]% of our models use booleans for critical features (e.g., user statuses, feature flags), this could cut onboarding time by [Y]% and improve code reviews by [Z]%."
*"This Propel behavior adds human-readable accessors/mutators for boolean fields (e.g., isActive() instead of getActive()). It’s a drop-in solution that:
is* for getters, set* for setters).<behavior name="boolean_extra" /> to your schema.xml.
Tradeoff: Adds ~50 bytes per model, but the readability gain is worth it for teams with many boolean fields. Let’s prototype it on [Model A] and measure the impact on code clarity."*How can I help you explore Laravel packages today?