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

Stof Doctrine Extensions Bundle Laravel Package

aciliainternet/stof-doctrine-extensions-bundle

Symfony bundle integrating the Stof Doctrine Extensions into your app, enabling features like sluggable, timestampable, translatable, and more. Provides configuration and wiring to use Doctrine extensions with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Legacy Symfony2 Dependency: The bundle is explicitly designed for Symfony2, which may introduce compatibility risks if the target system uses Symfony 3+ or 4/5/6/7. The package’s last release in 2015 suggests it may not align with modern Symfony or Doctrine (v3+) architectures.
  • Doctrine Extensions Integration: Provides Gedmo extensions (e.g., Timestampable, Sluggable, Sortable, Tree, Loggable), which are useful for common ORM patterns but may require custom validation or business logic adjustments to fit modern Laravel/PHP ecosystems.
  • Laravel Ecosystem Gap: Laravel has its own eloquent events, observers, and accessors/mutators that overlap with Gedmo’s functionality. Direct adoption may lead to redundancy or conflicts with Laravel’s built-in solutions.
  • Potential Use Cases:
    • Legacy Symfony2 migration projects.
    • Projects requiring tree structures, audit logging, or slug generation where Laravel’s native solutions are insufficient.
    • Custom Doctrine DBAL usage outside Eloquent.

Integration Feasibility

  • Symfony2 → Laravel Portability: The bundle is not Laravel-compatible by design. Porting would require:
    • Rewriting Symfony-specific components (e.g., DependencyInjection, EventDispatcher).
    • Adapting to Laravel’s Service Container, Event System, and Eloquent ORM.
  • Alternative Laravel Packages:
    • Tree Structures: spatie/laravel-medialibrary (for trees), artesaos/seotools (slugs).
    • Audit Logging: owen-it/laravel-auditing, spatie/laravel-activitylog.
    • Timestamps: Native Eloquent (created_at, updated_at) or laravel-model-caching.
  • Technical Risk:
    • High: Direct integration is not feasible without significant refactoring.
    • Medium: If used for inspiration (e.g., copying Gedmo logic into custom Laravel traits/services), risk is lower but requires manual implementation.

Key Questions

  1. Why Symfony2? Is this for a legacy migration, or are there specific Gedmo features missing in Laravel?
  2. Overlap Analysis: Which Gedmo extensions are being used, and do Laravel alternatives exist?
  3. Maintenance Burden: Is the team willing to maintain a forked/ported version of this bundle?
  4. Performance Impact: How would custom Doctrine extensions compare to Laravel’s native solutions?
  5. Testing Overhead: Would integration require custom Doctrine listeners, Eloquent model overrides, or database schema changes?

Integration Approach

Stack Fit

  • Incompatible with Modern Laravel: The bundle is Symfony2-centric and relies on:
    • Symfony’s DependencyInjection (Laravel uses Service Container).
    • Symfony’s EventDispatcher (Laravel uses Events/Listeners).
    • Doctrine Symfony Bridge (Laravel uses Doctrine DBAL/Eloquent).
  • Partial Fit for Custom Solutions:
    • Tree Structures: Could inspire a custom Laravel trait using Eloquent relationships.
    • Audit Logging: Could inform a custom observer or activity log service.
    • Slug Generation: Could be replaced by Str::slug() or spatie/laravel-seo-tools.

Migration Path

Option Feasibility Effort Risk Recommendation
Direct Integration ❌ Low High Critical Avoid unless legacy constraint.
Feature-by-Feature Port ⚠️ Medium Very High High (maintenance) Only if no Laravel alternatives.
Use Laravel Alternatives ✅ High Low Low Preferred (e.g., Spatie packages).
Custom Implementation ✅ High Medium Medium For unique use cases.

Compatibility

  • Doctrine Version: The bundle targets Doctrine 2.x (Symfony2 era). Laravel typically uses Doctrine DBAL 3.x or Eloquent, which may have breaking changes in extension logic.
  • PHP Version: Last release in 2015 suggests PHP 5.5–7.0 compatibility. Modern Laravel (PHP 8.0+) may require backporting.
  • Symfony Components: Relies on Symfony/Component/DependencyInjection, Symfony/Bridge/Doctrine, etc.—not available in Laravel.

Sequencing

  1. Assess Laravel Alternatives First:
    • Replace Gedmo extensions with Spatie, OwenIt, or custom solutions.
  2. If Porting is Required:
    • Fork the bundle and rewrite Symfony dependencies for Laravel.
    • Example steps:
      • Replace Extension\ConfigurableExtension with a Laravel Service Provider.
      • Convert EventListeners to Laravel Events.
      • Adapt Doctrine\ORM\Event\LifecycleEventArgs to Eloquent Model Events.
  3. Test Incrementally:
    • Start with non-critical features (e.g., Timestampable).
    • Validate against Laravel’s query builder and Eloquent behaviors.

Operational Impact

Maintenance

  • High Ongoing Effort:
    • The bundle is abandoned (last release 2015), meaning:
      • No security patches for Doctrine/Symfony vulnerabilities.
      • No compatibility updates for PHP 8.x or Doctrine 3.x.
    • A ported version would require manual maintenance for:
      • Laravel minor/major updates.
      • Doctrine ORM/DBAL changes.
  • Alternative Cost:
    • Using Laravel-native packages (e.g., Spatie) reduces maintenance to dependency updates only.

Support

  • No Community/Enterprise Support:
    • 3 stars, 0 dependents, no issues/PRs in 8+ years → no active community.
    • Debugging would rely on reverse-engineering legacy Symfony2 code.
  • Laravel Ecosystem Support:
    • Packages like spatie/laravel-activitylog have active maintenance, documentation, and GitHub discussions.

Scaling

  • Performance Overhead:
    • Gedmo extensions add database triggers, pre/post-persist hooks, and custom queries.
    • In Laravel, equivalent functionality (e.g., Eloquent observers) may be lighter or more optimized.
  • Database Schema Impact:
    • Some extensions (e.g., Tree, Loggable) require custom table structures.
    • Laravel’s migrations may need adjustments to support non-standard schemas.

Failure Modes

Risk Likelihood Impact Mitigation
Bundle Incompatibility High Critical (breaks ORM) Avoid; use Laravel alternatives.
PHP 8.x Deprecations Medium High (runtime errors) Port to PHP 8.x or use polyfills.
Doctrine Version Mismatch High High (query failures) Test with Laravel’s Doctrine version.
Custom Logic Conflicts Medium Medium (bugs) Isolate in a separate service layer.
Maintenance Abandonment High High (tech debt) Prefer actively maintained packages.

Ramp-Up

  • Learning Curve for Porting:
    • Requires deep knowledge of:
      • Symfony’s DependencyInjection.
      • Doctrine’s EventManager.
      • Laravel’s Service Container and Events.
    • Estimated 2–4 weeks for a senior developer to port one extension.
  • Alternative Adoption Time:
    • Spatie packages: <1 day to integrate (well-documented).
    • Custom implementation: 1–2 weeks for a single feature.
  • Team Skill Requirements:
    • Symfony expertise needed for porting.
    • Laravel/Eloquent expertise for alternatives.
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