Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Propel Boolean Extra Behavior

Propel Boolean Extra Behavior Laravel Package

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.

View on GitHub
Deep Wiki
Context7

The BooleanExtraBehavior adds more readable accessors and mutators for boolean values.

Frequently asked questions about Propel Boolean Extra Behavior
Can I use this package with Laravel’s Eloquent ORM?
No, this package is designed exclusively for Propel ORM. If your Laravel app uses Eloquent, you’ll need to create custom accessors in your model classes or consider alternatives like traits or model observers. Propel and Eloquent are incompatible ORMs.
How do I install and enable BooleanExtraBehavior in my Propel schema?
Add `<behavior name="boolean_extra" />` to your `schema.xml` file under the `<table>` or `<column>` definitions for boolean fields. Ensure the package is installed via Composer (`composer require havvg/propel-boolean-extra-behavior`) and that your Propel version supports third-party behaviors.
What Propel versions does this package support? Is it compatible with Propel 2.x?
The package’s documentation doesn’t specify Propel version compatibility, and its last commit appears outdated. Test thoroughly with your Propel version (e.g., 2.x) by checking for runtime errors or behavior inconsistencies. If issues arise, consider forking or contacting the maintainer.
Will this package break existing boolean accessors in my Propel models?
No, it adds *new* accessors (e.g., `isActive()`) without modifying or removing existing ones (e.g., `getActive()`). However, you’ll need to update your code to use the new methods. For a smooth transition, implement deprecated aliases or use feature flags during migration.
Are there any Laravel-native alternatives to this package for Eloquent models?
Yes. For Eloquent, you can use **accessors/mutators** in model classes or leverage packages like `spatie/laravel-model-states` for state-based boolean logic. Example: Add `public function isActive(): bool { return $this->active; }` to your model. This avoids Propel dependency entirely.
How do I handle edge cases like null boolean values or default=false fields?
The package likely follows Propel’s default behavior for nulls (e.g., casting to `false`). Test with `NULL` values in your database to confirm. For custom logic, override the generated methods in your model class or extend the behavior via Propel’s `postInsert`/`postUpdate` hooks.
Is this package actively maintained? What’s the risk of using abandonware?
The package has **no stars, forks, or recent commits**, indicating high abandonment risk. Propel updates may break compatibility, and you’ll lack support for bugs or feature requests. Mitigate risk by forking the repo or implementing similar logic manually (e.g., via Propel behaviors or custom traits).
Can I use this in a Laravel app that mixes Propel and Eloquent models?
Yes, but only for Propel models. Eloquent models remain unaffected. This is useful for legacy systems or hybrid stacks, but ensure your team understands the Propel-specific XML schema changes. Document the distinction clearly to avoid confusion in shared codebases.
How do I test this package before full deployment?
Start with a single Propel model and verify the new accessors (e.g., `isActive()`) work as expected. Test edge cases like `NULL` values, default `false`, and database updates. Use Propel’s built-in testing tools or write PHPUnit tests for critical models before rolling out globally.
What’s the performance impact of adding this behavior to Propel models?
The impact is minimal—behaviors add metadata and method generation at runtime, not query overhead. However, Propel’s runtime caching may need invalidation if you modify schemas. Benchmark critical paths post-integration, but expect negligible differences for most use cases.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin