Weave 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
Attribute Bundle

Attribute Bundle Laravel Package

padam87/attribute-bundle

A Symfony bundle for adding flexible, configurable attributes to Doctrine entities without schema changes. Define attribute types, attach dynamic values to records, and query them through a simple, reusable API.

View on GitHub
Deep Wiki
Context7

padam87/attribute-bundle adds flexible, database-backed attributes to Doctrine entities in Symfony applications without altering their schema. Define attributes once, attach them to any entity via a trait, and manage values through configurable types and Symfony forms—ideal for optional or user-defined metadata.

  • Attach key-value attributes to any Doctrine entity
  • Store values separately with configurable attribute definitions and types
  • Symfony form integration for editing attribute values
  • Trait-based setup with minimal entity changes
  • Extensible type system for custom attribute values
Frequently asked questions about Attribute Bundle
Is padam87/attribute-bundle compatible with Laravel?
No. It is a Symfony bundle built on Doctrine ORM and Symfony's dependency injection container, so its service definitions, compiler passes, and metadata drivers are inert inside a Laravel application. Laravel's container and Eloquent do not consume Symfony bundle configuration. The only way to use it would be to adopt laravel-doctrine/orm, and even then the bundle layer itself remains Symfony-specific.
What is padam87/attribute-bundle used for?
It implements EAV (entity-attribute-value) behavior for Symfony applications, letting you attach dynamic, user-defined attributes to Doctrine entities without adding a column per attribute. You define reusable attribute definitions and store per-entity values, which suits CMS-style content, configurable catalogs, and tenant-defined fields. The project is deprecated and was last released in 2015.
Can I install padam87/attribute-bundle via Composer in a modern Laravel app?
Realistically no. The package is PHP 5-era and constrains Symfony 2.x and Doctrine 2.x, so a composer require on a modern PHP 8 runtime will normally fail at the platform constraint. If forced through, it will likely fail again during container compilation or Doctrine metadata parsing. Treat installation failure as expected rather than something to work around.
What Laravel versions does attribute-bundle support?
None. It has no Laravel service provider, no Eloquent integration, and no compatibility with any Laravel release. It targets Symfony 2.x with Doctrine ORM 2.x. There is no documented Laravel version support because the package predates and sits outside the Laravel ecosystem.
What is a good Laravel alternative to padam87/attribute-bundle?
For Eloquent, spatie/laravel-schemaless-attributes is the maintained option and stores attributes in a JSON column. If you are on PostgreSQL, a single JSONB column with a GIN index usually outperforms classic EAV on both query flexibility and operational simplicity. If you need typed definitions and validation, a small internal package with an attributes table, a polymorphic values table, a trait, and casts is the idiomatic Laravel approach. For Symfony, the Sylius attribute component is a maintained substitute.
How would I implement EAV-style custom attributes in Laravel myself?
Create an attribute definitions table holding name, slug, type, validation rules, and options, plus a polymorphic attribute_values table that references the owning model. Add a trait to the owning model that exposes getAttributeValue and setAttributeValue helpers, and use Eloquent casts to return typed values. This keeps the valuable part of the EAV pattern while dropping the Symfony plumbing. It is a bounded piece of work that you own outright.
Is padam87/attribute-bundle still maintained?
No. It was abandoned in July 2015, has roughly 24 stars and no dependents, and shows no CI badge or test suite. There is no patch cadence, no security disclosure path, and no peer-review signal that the design survived production use. The MIT license does allow forking, but forking means permanently owning a small ORM extension.
Does attribute-bundle have tests I can use as a behavioral spec for a port?
There is no evident test suite or CI configuration in the repository. That means you cannot rely on it as an executable specification, and you would have to derive behavior by reading the entity model, type-resolution logic, and form type. Any port should come with its own tests and migrations written against your target runtime.
What are the risks of using an EAV layer like this in production?
An EAV layer is load-bearing because it touches entity persistence, so a bug is a data-corruption bug rather than a UI bug. With this package specifically, abandonment since 2015 means no security patches and no community safety net. You should also inspect how the value model serializes and deserializes stored values, since that is the main injection and type-confusion surface. Prefer a maintained implementation or a JSONB approach you control.
Should I fork padam87/attribute-bundle or reimplement it?
Reimplement. Forking only makes sense if you are already on Symfony 2.x and Doctrine 2.x, which is unlikely for new work. Reading the source as a specification and reproducing the attribute definition model, value storage, and type resolution in your own domain code is a bounded exercise, typically one to two weeks for a senior engineer including tests and migrations. That approach produces code you own and can maintain.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections