tourze/doctrine-entity-checker-bundle
A Symfony bundle that adds automated checks for Doctrine entities, helping catch mapping, configuration, and consistency issues early. Integrate entity validation into your development workflow to keep ORM models reliable.
Start by confirming what this package actually is: tourze/doctrine-entity-checker-bundle is a Symfony bundle that validates Doctrine ORM entity mappings — not a Laravel package. Before writing any code, open composer.json ("type": "symfony-bundle"), then read src/ for the *Bundle.php class, the DependencyInjection/ extension, and any src/Command/ or src/Checker/ directory. That source is the real documentation; there is no Laravel-facing README section and no config/ to publish.
Minimal steps in a Laravel app:
composer require tourze/doctrine-entity-checker-bundle:^1.0 — expect nothing to happen. No service provider, no package discovery, no php artisan command.doctrine/orm + laravel-doctrine/orm setup, (b) a legacy/read-model DB mapped with Doctrine, or (c) a Symfony service living in the same monorepo.EntityManager, instantiate the checker classes directly and call them from your own Artisan command — do not attempt to boot the Symfony bundle.A realistic first use case: a php artisan doctrine:entities:check command that walks getMetadataFactory()->getAllMetadata() and fails non-zero when the checker reports orphaned/invalid mappings — a pre-deploy gate, not a runtime dependency.
Doctrine\ORM\EntityManagerInterface, iterate getAllMetadata(), and hand each ClassMetadata to the checker. Return self::FAILURE with a table of offending entities so the output is actionable in CI logs.EntityManager per connection and run the check for each. Metadata is cached per manager and will not cross over.Illuminate\Support\ServiceProvider, no extra.laravel auto-discovery, no publishable config. composer require succeeding tells you nothing about whether it works.^1.0 (or even 1.0.1 exactly) and read git diff 1.0.0 1.0.1 yourself if your install includes .git; otherwise diff the extracted src/ trees.Model classes.ClassMetadata and association-mapping APIs changed between Doctrine ORM 2 and 3 (method signatures, getAssociationMapping return shapes). A bundle this small is unlikely to support both; verify against your installed doctrine/orm constraint before trusting the output.$em->getMetadataFactory() caches aggressively; second-level cache can mask changes). Dump getAllMetadata() and assert the count is what you expect.mapping config covers every entity directory.app/Support/Doctrine/ if the checks are the only thing you need — it is likely a few hundred lines and removes an entire dependency from your composer.json.app(EntityManagerInterface::class) and a single ClassMetadata object is faster than reading pipeline logs.How can I help you explore Laravel packages today?