chamber-orchestra/doctrine-clock-bundle
#[CreateTimestamp]). Aligns with modern PHP/Symfony practices (attributes over annotations).LifecycleCallbacks or custom listeners). Enables future features like:
#[SoftDeleteTimestamp] with configurable logic.Clock for deterministic testing (e.g., mocking timestamps in unit tests).LifecycleCallbacks to attributes without refactoring business logic.Clock interface for reproducible timestamp tests (e.g., CI pipelines).DEFAULT CURRENT_TIMESTAMP.Gedmo/DoctrineExtensions or custom traits may lack incentive to switch.#[CreateTimestamp(user: 'admin')])—this bundle is lightweight and may not support advanced use cases.*"This package lets our backend team automate timestamp management in Doctrine entities using modern PHP attributes—no more repetitive interfaces or traits. It’s a 10-minute upgrade that:
LifecycleCallbacks in 2–3 entities and measure dev time saved."**"This bundle replaces Doctrine timestamp boilerplate (e.g., implements TimestampableInterface) with PHP 8.4 attributes like #[CreateTimestamp]. Key benefits:
#[UpdateTimestamp] public ?\DateTimeImmutable $updatedAt).UserEntity’s timestamps and compare dev time."*Call to Action:
composer.json and test it on a non-critical entity this sprint."How can I help you explore Laravel packages today?