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

Easy Common Bundle Laravel Package

agence-adeliom/easy-common-bundle

Symfony bundle providing common utilities for EasyAdmin: reusable Doctrine entity traits (ID, slug, timestamps, soft delete, publish/status) and a PHP 8 enum polyfill/helper with static constructors, validation, and typed enum parameters.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate CRUD Development: Reduces boilerplate for common entity patterns (e.g., timestamps, soft deletes, status fields) in EasyAdmin-backed admin panels, cutting dev time by 30–50% for repetitive scaffolding.
  • Standardize Data Models: Enforces consistency across entities (e.g., ID, slug, publishable) via reusable traits, improving maintainability for teams managing multiple admin interfaces.
  • Legacy PHP 8 Support: Enables enum-like functionality for projects stuck on PHP 8.0–8.1, aligning with Symfony 5/6.x while avoiding full PHP 8.2 upgrades.
  • Roadmap for EasyAdmin: Justifies adopting EasyAdmin as a CMS framework by offering "batteries-included" utilities (e.g., ThreeStateStatusTrait for complex workflows like "draft/published/archived").
  • Build vs. Buy: Avoids reinventing traits (e.g., soft deletes, timestamps) that are low-differentiation but high-effort to build securely/compatibly.
  • Use Cases:
    • Internal tools with admin panels (e.g., content management, user management).
    • SaaS platforms needing standardized entity structures across modules.
    • Projects migrating from custom admin panels to EasyAdmin.

When to Consider This Package

  • Look Here If:

    • Your project uses EasyAdmin (Symfony) and needs common entity patterns (e.g., timestamps, slugs, statuses).
    • You’re on PHP 8.0+ and Symfony 5/6/7, but lack PHP 8.2’s enums.
    • Your team prioritizes developer velocity over custom solutions for repetitive entity logic.
    • You need soft deletes, publishable fields, or three-state statuses without writing boilerplate.
  • Look Elsewhere If:

    • You’re not using EasyAdmin: This is a niche bundle for EasyAdmin integrations.
    • Your entities require highly custom logic beyond the provided traits (e.g., complex validation, domain-specific behaviors).
    • You’re on PHP <8.0 or Symfony <5.4: Use a different polyfill or build custom traits.
    • You need advanced features like multi-tenancy, audit logs, or event-driven workflows (consider Doctrine Extensions or Spatie’s packages).
    • Your project has strict security/compliance needs: Traits are MIT-licensed; audit for edge cases (e.g., slug generation collisions).

How to Pitch It (Stakeholders)

For Executives/Business Leaders:

"This package cuts the time to build admin panels by 30–50% by providing reusable ‘building blocks’ for common database patterns—like timestamps, status fields, or soft deletes—without sacrificing flexibility. For example, instead of writing 50 lines of code to add a ‘published_at’ field and logic to every entity, we can use a single trait. This aligns with our goal to [reduce tech debt/accelerate feature delivery] while keeping our Symfony/EasyAdmin stack modern. The MIT license and active maintenance (Symfony 6/7 support) make it a low-risk choice."

For Engineering Teams:

*"Problem: EasyAdmin is great for CRUD, but we’re wasting time rewriting the same entity logic (e.g., slug generation, soft deletes) across projects. Solution: This bundle gives us batteries-included traits for:

  • Common fields: ID, name, slug, timestamps.
  • Workflow states: Publishable content, three-state statuses (e.g., draft/published/archived).
  • PHP 8 enum polyfill: For projects stuck on 8.0–8.1. Impact:
  • Faster iterations: No more copy-pasting Doctrine behaviors.
  • Consistency: Standardized patterns across teams/modules.
  • Future-proof: Works with Symfony 6/7 and PHP 8.2+. Trade-off: Minimal learning curve (just use the trait), but we cede control over edge cases (e.g., slug collision handling).* Alternatives: Building custom traits or using Spatie’s packages—but this is EasyAdmin-specific and lighter weight."*

For Developers:

*"Why This?

  • No more boilerplate: Need a SoftDeletable entity? One trait. Need a publishable flag? Done.
  • EasyAdmin native: Works seamlessly with EasyAdmin’s CRUD, including form/grid integrations.
  • PHP 8 enums on older versions: The enum polyfill lets us use enum-like syntax without upgrading PHP. How to Adopt:
  1. Install via Composer: composer require agence-adeliom/easy-common-bundle.
  2. Add traits to your entities (e.g., use EntityTimestampableTrait).
  3. Configure EasyAdmin to respect the new fields (e.g., ->setFormOptions(['disabled' => ['deletedAt']]) for soft deletes). Caveats:
  • Traits are opinionated: E.g., EntityNameSlugTrait auto-generates slugs from name—customize if needed.
  • No ORM agnosticism: Tied to Doctrine (EasyAdmin’s default). Example:
// Before: 20+ lines of code for timestamps + soft deletes
// After:
use App\Entity\Traits\EntityTimestampableTrait;
use App\Entity\Traits\EntitySoftDeletableTrait;

class Article
{
    use EntityTimestampableTrait;
    use EntitySoftDeletableTrait;
    // ...
}
```*
**Docs**: [GitHub](https://github.com/agence-adeliom/easy-common-bundle) (lightweight; check `src/Traits/` for usage).*
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware