- What is mkietlinski/doctrine-extensions used for?
- mkietlinski/doctrine-extensions is a Doctrine ORM extensions package for Laravel or Doctrine-backed PHP projects. It bundles behavioral extensions such as Timestampable, SoftDeleteable, and Sluggable plus custom DQL functions for JSON and date queries. It is meant to reduce boilerplate when wiring common model behaviors into an existing Doctrine entity manager.
- Does mkietlinski/doctrine-extensions work with Laravel Eloquent?
- No. This package targets Doctrine ORM, not Laravel Eloquent, so it is only relevant if your application actually runs Doctrine via something like laravel-doctrine/orm. For Eloquent apps, use Eloquent-native features such as casts, observers, model events, or Spatie packages instead. Retrofitting Doctrine behaviors onto Eloquent is not a supported path.
- How do I install mkietlinski/doctrine-extensions?
- Install it with Composer using composer require mkietlinski/doctrine-extensions. Then register the package service provider in Laravel and publish its config if the package provides publishable configuration. You still need to wire the relevant listeners or subscribers into your Doctrine entity manager configuration. Check the README for exact provider and config keys before enabling behaviors.
- Which Laravel and Doctrine ORM versions are supported?
- The provided information does not list specific Laravel, PHP, or doctrine/orm version constraints, so verify them in the package composer.json before adopting it. Doctrine extensions are sensitive to ORM major versions because metadata drivers changed between ORM 2.x annotations and 3.x attributes. There is also no CI evidence in the assessment, so test compatibility on a branch with your exact dependency set.
- Is mkietlinski/doctrine-extensions a fork of gedmo/doctrine-extensions?
- It appears to be a maintained fork in the gedmo/doctrine-extensions and Atlantic18/DoctrineExtensions lineage. Before adopting it, clone the repository and diff it against upstream gedmo/doctrine-extensions to see what it adds, fixes, or diverges on. If the fork adds nothing material for your use case, depend on upstream directly instead.
- How is it different from gedmo/doctrine-extensions?
- The package description emphasizes bundled behaviors and custom DQL functions for JSON and date values, but the material provided does not document exact differences from upstream. You need a source-level diff and a review of supported ORM versions to compare it fairly with gedmo/doctrine-extensions. Treat unknown behavioral changes as a risk until audited.
- Can I use SoftDeleteable in production safely?
- SoftDeleteable has the highest query-plan and data-visibility impact of the bundled behaviors, so roll it out cautiously. Enable it in one domain area first and add integration tests for every repository that queries those entities. Confirm that soft-delete filters do not silently change results in reporting, joins, or admin queries before production use.
- How do I add Timestampable or Sluggable to a Doctrine entity?
- You enable the behavior through the package configuration and your Doctrine entity metadata, typically by registering the relevant listener or subscriber and marking the entity fields it manages. Timestampable is a good first probe because it reacts to prePersist and preUpdate without changing query semantics. Sluggable also needs its slug field and source field configured correctly, so test generated values before rollout.
- Does this package provide JSON and date DQL functions?
- Yes, the package advertises custom DQL functions for querying JSON and date values in Doctrine queries. You need to register those DQL functions in your Doctrine configuration so the parser recognizes them. Test the functions against your actual database platform, since JSON and date SQL behavior varies between MySQL, PostgreSQL, and other drivers.
- Is mkietlinski/doctrine-extensions maintained and safe to depend on?
- The package has very little downstream validation in the assessment: zero stars, zero dependents, no issue history, and no CI evidence. Treat it as unaudited third-party source, pin the version, review the code, and decide who owns the dependency internally. If the maintainer goes silent, you need a plan to fork, patch, or replace it.