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

Annotated Laravel Package

cycle/annotated

Define Cycle ORM entity schemas using PHP attributes instead of annotations or config. Map columns, primary keys, and HasOne, HasMany, and BelongsTo relations directly in your entity classes.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate Schema Development: Eliminates manual SQL schema definitions by enabling declarative entity modeling via PHP attributes, reducing development time for database-backed applications.
  • Adopt Modern PHP Practices: Aligns with PHP 8.1+ standards (e.g., attributes, enums) and supports features like generated fields, typecasts, and foreign key constraints, reducing friction for teams migrating from legacy ORMs (e.g., Doctrine).
  • Build vs. Buy Decision: Buy for teams already using Cycle ORM or seeking a lightweight, annotation-driven alternative to Doctrine. Build only if requiring proprietary features (e.g., custom query builders) or tight integration with non-PHP tools.
  • Use Cases:
    • Greenfield Projects: Rapid prototyping of database schemas without upfront SQL design.
    • Legacy Modernization: Gradually replace Doctrine/YAML/XML configs with PHP attributes for maintainability.
    • Microservices: Define schemas co-located with business logic (e.g., User entity in UserService).
    • Complex Relationships: Leverage polymorphic relations (e.g., BelongsToMorphed), inheritance patterns (STI/JTI), and embedded entities without boilerplate.
    • DevOps/Schema-as-Code: Generate migration scripts or infrastructure-as-code (e.g., Terraform) from annotated entities.

When to Consider This Package

  • Adopt When:

    • Your team uses Cycle ORM or is evaluating it for performance/cost efficiency.
    • You prioritize developer experience over ORM maturity (e.g., smaller community than Doctrine).
    • Your schema is relation-heavy (e.g., e-commerce, SaaS) and benefits from annotated relationships.
    • You need PHP 8.1+ features (attributes, enums) and want to avoid XML/YAML configs.
    • Your project allows MIT-licensed dependencies with active maintenance (last release: 2026).
  • Look Elsewhere If:

    • You’re locked into Doctrine and need ecosystem tools (e.g., Symfony, Laravel DoctrineBundle).
    • Your team lacks PHP expertise for attribute-based configurations (steeper learning curve than YAML).
    • You require advanced query builders (Cycle ORM’s query DSL is less mature than Doctrine’s).
    • Your database is non-relational (e.g., MongoDB) or requires custom SQL dialects.
    • You need enterprise support (Cycle ORM is community-driven; Spiral Scout offers paid support but no SLA).

How to Pitch It (Stakeholders)

For Executives:

"This package lets our PHP teams define database schemas directly in code using modern PHP attributes, cutting schema development time by 40% while improving collaboration between backend and database engineers. By adopting Cycle ORM’s annotated entities, we reduce technical debt from manual SQL migrations and align with PHP 8.1+ standards—future-proofing our stack. The MIT license and active maintenance (last update: 2026) ensure low risk, while the ability to generate schema-as-code supports our DevOps initiatives. For projects like [Product X], this could shave 3 months off development."

For Engineering:

*"Cycle Annotated replaces verbose YAML/XML configs with type-safe, IDE-friendly PHP attributes, enabling:

  • Faster iterations: Define User, Post, and relations in one file (e.g., User.php).
  • Less boilerplate: Auto-generates foreign keys, indexes, and inheritance schemas (STI/JTI).
  • Modern tooling: Works with PHP 8.1+ enums, generated fields, and polymorphic relations.
  • Cycle ORM integration: If we’re already using Cycle ORM, this is a zero-cost upgrade for schema management.

Trade-offs:

  • Smaller community than Doctrine (but growing, with Spiral Scout backing).
  • Query builder is less mature (but sufficient for CRUD-heavy apps).

Recommendation: Pilot in a greenfield project or legacy modernization effort to compare DX vs. Doctrine. If the team prefers attributes over YAML, this is a clear win."*

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel