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

Postgresql Type Bundle Laravel Package

fle/postgresql-type-bundle

A Symfony bundle that integrates PostgreSQL-specific Doctrine types, making native Postgres data types easier to map and use in entities. Includes bundle configuration and service wiring for quick setup in Symfony applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — low, and there is a framework mismatch to flag first. Despite the "Laravel/PHP package" framing, fle/postgresql-type-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle class and a DI extension intended for Symfony's kernel, so it cannot be composer required into a Laravel app as a drop-in: Laravel has no bundle registration, no compiler passes, and no config.yml service wiring. What is potentially reusable is the narrow payload underneath the bundle — a set of Doctrine\DBAL\Types\Type subclasses that teach Doctrine how to map PostgreSQL-native column types (hstore, array, json, inet/cidr, and similar) to PHP values. In a Laravel codebase that value only materialises where we use Doctrine DBAL directly — typically the schema builder in migrations, or a Doctrine-backed bounded context. Eloquent does not consume DBAL type mappings at all; it uses PDO plus $casts, and PDO already returns most exotic PostgreSQL types as strings.

Integration feasibility — technically possible, practically poor. The type classes are small (tens of lines each) and portable in principle, so a vendored copy is feasible. The blocker is version drift: the package is archived, has 4 stars, 0 dependents, and dates from the Doctrine DBAL 2 / Symfony 2 era. DBAL 3 changed Type method signatures (nullable returns, added Driver parameters) and deprecated getName(); DBAL 4 removed getName() entirely and requires typed AbstractPlatform params. Any of those will produce fatal errors or silent mis-mapping on a modern stack running PHP 8.2+. The 0.025 score and zero dependents are consistent with that: no one is exercising this against current dependencies, so there is no field evidence that it works at all.

Technical risk — high. Concretely: unmaintained code with no PHP 8.4 / DBAL 4 compatibility path; a single historical maintainer; no test signal we can trust; and a failure mode that is silent rather than loud — a wrong getSQLDeclaration or a convertToPHPValue that returns null on an unexpected shape corrupts data or emits the wrong column type in a migration, and you find out in production. Secondary risk is licensing/provenance hygiene on a vendored copy, plus the maintenance debt of owning a fork nobody upstreams to.

Key questions

  1. Do we actually need these types, or does a text/jsonb column plus an Eloquent cast cover the requirement? Enumerate the concrete columns involved.
  2. Are we using Doctrine at all, or is this purely about Laravel migrations emitting hstore/citext/inet DDL? If the latter, a raw DB::statement or a schema macro is cheaper than any dependency.
  3. Which DBAL major version is pinned, and has anyone compiled these classes against it?
  4. Is martin-georgiev/postgresql-for-doctrine (actively maintained, materially broader type coverage) a viable substitute? In most cases it is the correct answer.
  5. What is the maintenance owner and the removal plan if we vendor?

Integration Approach

Stack fit — conditional reject. Recommendation: do not add this as a Composer dependency. Archived, zero-dependents, DBAL-2-era code is not something to put in a composer.json that we expect to composer update for years. If a genuine need exists, the defensible paths are, in order: (a) use DBAL's native PostgreSQL support plus Laravel casts; (b) adopt a maintained alternative; (c) vendor only the 1–3 specific type classes we need into app/Support/Doctrine/Types/ with attribution and an owned test suite.

Migration path (if we proceed with vendoring). Copy only the classes for the column types we have verified in the schema — do not import the bundle, the DI extension, or the unused types. Re-type the method signatures against our pinned DBAL version, add declare(strict_types=1), and register via Type::addType() in a service provider. Keep the vendored namespace distinct (App\Doctrine\Types) so a future swap to a maintained package is a search-and-replace rather than an archaeology exercise.

Compatibility gates. Before writing any code: confirm PHP version, doctrine/dbal major, and whether getName() is still callable. Run a spike that round-trips one representative column (insert, read, schema:dump, migrate from scratch on a clean database) — the DDL path is where these packages most often break and where breakage is least visible in local dev.

Sequencing.

  1. Week 1 — inventory. Grep migrations and models for non-standard PostgreSQL types; list every column that needs special handling and classify it as read-path (cast suffices) or DDL-path (needs a type mapping).
  2. Week 1 — alternative evaluation. Timebox a spike on a maintained package and on the no-dependency option; compare against the inventory.
  3. Week 2 — decision. Expect the outcome to be "no dependency; casts + raw DDL where needed." If vendoring is chosen, land it behind tests on a throwaway branch and require green CI on the full migration-from-zero job.
  4. Week 3 — rollout. Only after the migration-from-zero job is green in CI on the target DB version.

Operational Impact

Maintenance. An archived package transfers 100% of maintenance to us the moment it enters the tree. Even vendored, it is code we must port across every future DBAL and PHP upgrade — a recurring tax on a component that saves perhaps a day of work. The honest accounting: ~40 lines of copied code buys a permanent line item in our upgrade checklist.

Support. None. No upstream issue triage, no security advisories, no CVE channel. For a type-mapping layer that sits on the database boundary, that is an accepted-risk decision that should be recorded explicitly rather than absorbed silently.

Scaling. Negligible runtime cost — these are per-value conversion callbacks, not a hot-path concern at any realistic volume. The scaling risk is organisational, not technical: one engineer's local knowledge of why the vendored types exist, with no upstream documentation to fall back on.

Failure modes to watch.

  • Silent type coercion — convertToPHPValue returning null or a string for shapes it wasn't written for; data lands wrong without an exception.
  • DDL drift — migrations emitting varchar where production has hstore, producing environments that diverge from schema:dump.
  • Composer resolution conflict — a transitive DBAL constraint fight that only surfaces weeks later in an unrelated upgrade.
  • Signature fatality — a DBAL major bump that turns a working build into a class-load error, with no upstream fix coming.

Ramp-up. Low technical ramp-up (small, readable classes, standard DBAL Type contract) but non-trivial context ramp-up: the cost is not learning the code, it is reconstructing which columns depend on it and why. Mitigate by documenting the dependent columns in the migration or a docs/ note at the time of adoption.

Bottom line for the roadmap. Score 0.025 with an archived status and zero dependents reads as: do not adopt as a dependency. Resolve the underlying need with native DBAL/PDO behaviour, Eloquent casts, and explicit DDL, and reserve vendoring as a last resort with a named owner and a removal plan.

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