- What does softspring/doctrine-changelog-bundle actually do?
- It is a Doctrine change log registry bundle that records changes made to your Doctrine entities so you have an audit trail and history of what changed and when. It is built for Symfony applications that persist data through Doctrine ORM. The goal is to add changelog tracking with minimal setup rather than writing your own event subscribers and history tables.
- Is this package for Laravel or Symfony?
- It is a Symfony bundle, not a Laravel package. The Composer type and the bundle naming follow Symfony conventions, and it hooks into Doctrine, which is the default ORM in Symfony rather than in Laravel. If you are building a Laravel app you would need a different solution, such as an Eloquent-based audit package. Do not expect it to register a Laravel service provider.
- How do I install softspring/doctrine-changelog-bundle with Composer?
- Install it with Composer using composer require softspring/doctrine-changelog-bundle. Because it is a Symfony bundle, you then enable it in your bundles configuration (or rely on Symfony Flex auto-registration if a recipe is available). After that, run your migrations if the bundle ships any schema for the changelog storage. Check the repository README for the exact registration snippet for your Symfony version.
- Which Symfony and Doctrine versions are supported?
- Version support is defined by the constraints in the package's composer.json, so check that file and the tagged releases before upgrading. The bundle targets Doctrine ORM-based Symfony applications, so your Doctrine version must satisfy the package's requirement. If you are on an older Symfony LTS, verify compatibility before adopting it in production.
- How do I enable changelog tracking on a specific entity?
- Tracking is configured through the bundle's integration with Doctrine entity metadata, so you mark the entities you want audited rather than tracking everything globally. The README documents the available configuration and mapping options. Start with one or two entities, confirm records are being written, then expand the scope.
- Where are the changelog entries stored?
- Changes are persisted through Doctrine into your database, so the history lives alongside your application data rather than in log files. This makes the changelog queryable with the same connection and tooling you already use. Review the bundle's schema or migrations to see the exact table structure before rolling it out.
- Can I record which user made a change?
- An audit trail is only as useful as its attribution, so pairing the changelog with the currently authenticated user is a common requirement. The bundle captures entity changes; attributing them to a user typically requires wiring user context into your Doctrine lifecycle or the bundle's extension points. Check the README for the supported approach rather than assuming automatic user tracking.
- What is the performance impact of Doctrine changelog tracking?
- Every tracked insert, update, or delete produces additional work during the Doctrine flush, including extra persisted records. For high-write entities, this means more queries and a larger database over time. Track only the entities that genuinely need an audit trail and plan a retention or archival strategy for the changelog table.
- How do I test that changelog entries are created correctly?
- Because the bundle works through Doctrine, you can exercise it in functional tests that persist and flush an entity inside a transaction and then assert the expected changelog records exist. Use a test database with the bundle's schema applied so assertions run against realistic storage. Roll back or reset the database between tests to keep the history table predictable.
- Is softspring/doctrine-changelog-bundle actively maintained, and what are the alternatives?
- Maintenance activity should be checked on the GitHub repository by looking at recent commits, tagged releases, and open issues before committing to it. Popular alternatives in the Symfony ecosystem include DoctrineExtensions Loggable and general-purpose audit log bundles. If you only need lightweight history, a custom Doctrine event subscriber may be simpler than adding a dependency.