intaro/hstore-bundle
Symfony bundle that integrates PostgreSQL hstore with Doctrine, providing a custom DBAL type, schema support, and convenient entity mapping so you can store and query key-value data directly from your PHP applications.
hstore column to a PHP array. If hstore support is genuinely required, the equivalent is roughly 50–100 lines of in-house code (a Type subclass plus convertToDatabaseValue/convertToPHPValue). Owning that code is strictly cheaper than owning a dependency that has been marked deprecated and has not shipped since 2014.jsonb, not hstore. hstore predates jsonb and only supports flat string→string maps. It cannot store nested structures, numbers, booleans, or nulls natively. Any new feature that needs flexible attributes should use jsonb (indexable with GIN, queryable with the full JSON operator set) and be modeled in the application layer. This package existing in the codebase is a signal of an aging schema, not a capability to extend.jsonb, then drop the type dependency. That is a scoped, plannable task — not an open-ended refactor — which makes it easy to slot into a roadmap.Consider it only under a narrow, legacy set of conditions:
hstore columns in production and needs to keep reading/writing them with minimal change.jsonb is already scheduled.Look elsewhere (or build in-house) when any of the following is true:
jsonb and Doctrine's json/jsonb types, or Laravel JSON columns. There is no reason to introduce hstore in 2024+.Type interface and removed several legacy methods; a 2014-era type will not load or will fail unpredictably. Treat "does it even install?" as a hard gate, not a nice-to-have.$casts = ['meta' => 'array'] against a json column.jsonb avoids that entirely.Recommendation: do not adopt; treat as legacy debt to remove.
For executives: this is an abandoned, ten-year-old open-source component — officially marked deprecated, five GitHub stars, zero projects depending on it, last release November 2014. Adopting it would create a permanent maintenance obligation with no upstream support and no security patch path. The underlying capability (flexible key-value attributes in Postgres) is now available natively and better via jsonb, which is built into the database and supported out of the box by every modern framework. Cost of the recommended path is small and bounded: if hstore columns exist, migration to jsonb is a scoped, estimated task; if they don't, the decision is simply "use jsonb," which costs nothing and removes a future liability. There is no scenario where adding this dependency is the cheaper option.
For engineering: the package's entire value is a DBAL type mapping hstore ↔ PHP array. That is a small, well-understood piece of code we can write and own in under a day if we ever truly need it — and we probably don't, because jsonb is the correct target. Two caveats to internalize: (1) this is a Symfony/Doctrine bundle, not a Laravel package, so it's inapplicable if we're on Eloquent; (2) it targets Doctrine DBAL 2.x and will not work cleanly on DBAL 3+ or PHP 8+, so "just install it" is not a viable shortcut even as a stopgap. Proposed next step: inventory any existing hstore columns, size the jsonb migration, and add this package to the do-not-adopt list in our dependency policy.
How can I help you explore Laravel packages today?