avkluchko/postgres-doctrine-extensions
date_part, to_char, make_date) in Doctrine ORM, reducing reliance on raw SQL for complex queries. Useful for teams migrating from raw SQL or needing PostgreSQL-native features (e.g., date manipulation, type casting) in Laravel applications.date_part('year', created_at)) in DQL queries.to_char for formatted outputs).make_date for tenant-specific time ranges).DB::raw() or PostgreSQL-specific libraries like pgsql-php).For Executives: "This package lets us leverage PostgreSQL’s advanced features (like date functions) directly in our Doctrine ORM queries, reducing technical debt from raw SQL and improving query performance for analytics/reporting. It’s a low-risk, MIT-licensed solution that aligns with our Doctrine ORM investment—though we’d need to monitor for maintenance gaps long-term."
For Engineering:
"If we’re using Doctrine ORM with PostgreSQL, this adds 4 key DQL functions (cast, date_part, make_date, to_char) to avoid writing custom SQL. Tradeoff: Unmaintained but stable. Alternatives like raw SQL or Gedmo’s extensions exist, but this is the lightest option for our current needs. Recommend evaluating during [specific feature sprint] for [use case]."
For Developers:
"Need to parse dates or cast types in DQL? This package lets you use PostgreSQL functions like date_part('year', column) directly in Doctrine queries. Example: Replace WHERE EXTRACT(YEAR FROM created_at) = 2023 with WHERE date_part('year', created_at) = 2023. Easy to add to doctrine.yaml—just 1 Composer install and 4 new DQL functions."
How can I help you explore Laravel packages today?