danaki/doctrine-enum-type-bundle
acelaya/doctrine-enum-type), enabling type-safe enum storage in databases. This aligns well with Laravel/Symfony projects adopting PHP 8.1+ enums (e.g., Eloquent models with enum columns or Doctrine-based Laravel apps).enum support (via Eloquent) may reduce adoption urgency, but this bundle offers Doctrine-specific optimizations (e.g., custom type mappings, legacy DB compatibility) for hybrid stacks (e.g., Symfony + Laravel bridges, Doctrine migrations, or multi-ORM projects).acelaya/doctrine-enum-type (v1.0.0), which has no Laravel-specific adaptations. Requires Doctrine ORM (not Eloquent) and Symfony’s config system.doctrine/dbal + doctrine/orm (not bundled by default). Overhead for a Laravel-native solution.enum column type). This bundle’s value is Doctrine-specific (e.g., custom DQL functions, legacy DB schemas).doctrine_enum_type.yaml) may conflict with Laravel’s config/doctrine.php or config/packages/ structure.enum type abstracts this.enum type.enum columns in Laravel be backported to this bundle’s format, or is this a greenfield project?acelaya/doctrine-enum-type (standalone) suffice, or is the Symfony bundle’s config layer critical?enum type been evaluated for performance/cost?doctrine/dbal + doctrine/orm (e.g., for legacy DBs, complex queries, or Symfony bridges).enum type is simpler and better supported.doctrine/dbal and doctrine/orm are installed and configured.composer require danaki/doctrine-enum-type-bundle acelaya/doctrine-enum-type
config component for bundle support:
composer require symfony/config
config/packages/doctrine_enum_type.yaml (Laravel may need a symlink or custom loader to recognize this path).danaki_doctrine_enum_type:
types:
App\Entities\Enum\Status: ~
App\Enums\LegacyGender: Acelaya\Enum\Gender
use Doctrine\ORM\Mapping as ORM;
use Acelaya\Enum\Type\EnumType;
#[ORM\Entity]
class Product
{
#[ORM\Column(type: EnumType::NAME, enumType: Status::class)]
private Status $status;
}
TINYINT for small enums). Laravel’s enum type may use STRING by default.php artisan cache:clear
rm -rf bootstrap/cache/*
php bin/console doctrine:migrations:diff) may conflict with Laravel’s migrate command.enum types.acelaya/doctrine-enum-type + Symfony config components, increasing attack surface.tinker or make:model may not recognize Doctrine enum types.enum type.TINYINT vs. STRING) could impact indexing or storage efficiency.How can I help you explore Laravel packages today?