Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Dbal Tools Laravel Package

phpro/dbal-tools

Integrates Doctrine DBAL into Laravel: a connection factory that builds DBAL connections from your existing database config, plus schema tools and commands for creating, dropping, and updating tables via DBAL's schema manager—no duplicate configuration required.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Postgres JSONB reporting and analytics: JsonbObjectAgg lets teams build key/value JSONB aggregates directly in SQL, useful for locale bundles, per-entity metadata rollups, audit snapshots, and row-level payload consolidation without custom SQL strings scattered through the codebase.
  • Build vs. buy: Instead of maintaining in-house DBAL expression helpers for PostgreSQL-specific SQL, the package provides a supported abstraction. This is most valuable when multiple features need the same SQL expression patterns.
  • Roadmap sequencing: If upcoming features depend on Postgres JSONB aggregation, this release reduces delivery risk by making the expression available now rather than requiring a custom expression first.
  • Upgrade planning: Doctrine DBAL 4.5 support and removal of deprecated Column::getType() usage lowers the cost and risk of staying current with DBAL, which matters for Laravel applications using Doctrine-backed persistence or reporting layers.
  • Use cases: Localized content assembly, exporting nested JSON structures, denormalized read models, dashboard/reporting queries, and aggregation jobs where SQL-side JSON construction is preferable to PHP-side post-processing.

When to Consider This Package

Consider adoption when:

  • Your Laravel/PHP application uses Doctrine DBAL directly or through a Doctrine integration, and you need PostgreSQL-specific expressions that DBAL does not provide natively.
  • You are building features that require JSONB aggregation, complex PostgreSQL expressions, or schema/table introspection helpers.
  • You want to avoid maintaining custom SQL fragments and expression classes across multiple services or modules.
  • You are planning a DBAL 4.4 to 4.5 upgrade and want a library that already supports the newer version.
  • Your team is comfortable with SQL-level abstractions and can test generated SQL against a real PostgreSQL instance.

Look elsewhere when:

  • The application is Eloquent-only and does not use Doctrine DBAL; adding DBAL tooling would increase complexity without enough payoff.
  • You do not use PostgreSQL or do not need JSONB-specific SQL expressions.
  • Your query needs are simple enough for Laravel’s query builder or Eloquent without custom SQL expressions.
  • You want to avoid third-party expression layers in critical query paths and prefer owning a small, highly specific internal helper.
  • Your team lacks PostgreSQL expertise, since expressions like jsonb_object_agg have important semantics around null keys and aggregation order.

How to Pitch It (Stakeholders)

For executives: This release adds a supported PostgreSQL JSONB aggregation expression and keeps the package compatible with the newer Doctrine DBAL 4.5. That means we can deliver JSON-heavy reporting and localization features with less custom SQL, lower maintenance cost, and reduced upgrade risk. It is a targeted enabler for Postgres-based features, not a broad platform change.

For engineering: JsonbObjectAgg wraps jsonb_object_agg(key, value) with optional ORDER BY, matching existing patterns like JsonbAggStrict. It handles the important Postgres semantics: repeated keys keep the last value in aggregation order, and null keys raise errors, so the key expression must be non-null. The release also supports DBAL 4.5 alongside 4.4 and removes reliance on the deprecated Column::getType() path in Table::columnType() and Table::columnTypes(). Adopt it where we already use Doctrine DBAL and need PostgreSQL JSONB aggregation; skip it for Eloquent-only or non-Postgres paths.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console