Weave Code
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 For Doctrine Laravel Package

martin-georgiev/postgresql-for-doctrine

Adds PostgreSQL-specific power to Doctrine DBAL/ORM: rich native types (jsonb, arrays, ranges, network, geometric, etc.) plus DQL functions/operators for JSON and array querying. Supports PostgreSQL 9.4+ and PHP 8.2+.

View on GitHub
Deep Wiki
Context7
4.7.0

Features

4.6.0

Features

  • #46: Add support for user-defined enum DBAL type (#633) (5869318)
  • Add DQL support for hstore functions (#647) (1eb895b)
  • Add DQL support for XML functions (#645) (769329d)
  • Add support for bytea DBAL type and its array variation (#630) (bc4324e)
  • Add support for citext DBAL type and its array variation (#640) (bba3af3)
  • Add support for hstore DBAL type and its array variation (#632) (b6f7c12)
  • Add support for timetz DBAL type and its array variation (#635) (d80419a)
  • Add support for multirange array DBAL types (#634) (131a64b)
  • Add support for range array DBAL types (#638) (64027d6)
  • Expand DQL support for date/time utility functions (#648) (faf1d87)
  • Expand DQL support for mathematical functions with more logical and statistical aggregates (#652) (2524f96)
  • Expand DQL support for string manipulation and utility functions (#651) (5e6b7c5)
4.5.1

Bug Fixes

  • #616: Add length/dimension support to pgvector types' SQL declaration (#617) (82583f2)
4.5.0

Features

  • Add support for bit and bit varying DBAL types and their array variations (#608) (9f8fed1)
  • Add support for geometric DBAL types (box, circle, line, lseg, path, polygon) and their array variations (#601) (5e29747)
  • Add support for hyperbolic, number theory, statistical and trigonometric DQL functions (#611) (9a191d0)
4.4.0

Features

  • #590: Add support for GENERATE_SERIES through the introduction of GENERATE_NUMERIC_SERIES and GENERATE_TIME_SERIES (#592) (c1b8b44)
  • Add support for AT TIME ZONE operator as a DQL function (enabling timezone conversion of timestamp values) (#567) (3ab1d69)
  • Add support for date[], timestamp[], and timestamptz[] DBAL types (#597) (989771e)
  • Add support for interval[] DBAL type (#591) (7fc59d0)
  • Add support for interval DBAL type (#582) (fa71e78)
  • Add support for ltree[] DBAL type (#595) (29c28ef)
  • Add support for money[] DBAL type (#588) (84e5163)
  • Add support for money DBAL type (#577) (95b27a5)
  • Add support for range_agg and range_intersect_agg (#573) (c0ca299)
  • Add support for tsquery[] DBAL type (#586) (f25d137)
  • Add support for tsvector[] DBAL type (#587) (9d45e7d)
  • Add support for xml[] DBAL type (#589) (84bfe50)
  • Add support for xml DBAL type (#578) (5c9590c)
  • Add support for network address DQL functions (#574) (46a622f)
  • Add support for pg_trgm operators (similarity threshold and distance) (#572) (103a574)
  • Add support for pg_trgm's extension functions (SIMILARITY, STRICT_WORD_SIMILARITYz and WORD_SIMILARITY) (#571) (9715b70)
  • Add support for pgvector's extension HALFVEC and SPARSEVEC types (#584) (c7d83ae)
  • Add support for pgvector's extension VECTOR type and distance functions (COSINE_DISTANCE, INNER_PRODUCT, L2_DISTANCE) (#570) (43acc91)
  • аdd support for datemultirange, tsmultirange, and tstzmultirange DBAL types (#575) (fac1ff6)

Bug Fixes

  • Align domain exceptions with consistent patterns (parent class, method naming, PHPDoc, message formatting) (#585) (c7e2d51)
  • Expand the list of supported MAC address formats (#594) (223649c)
  • Resolve PHPStan type errors with mixed array items (#583) (c7f2625)
4.3.0

Features

  • #544: Add support for optional arguments to PostGIS functions (ST_Buffer, ST_Translate, ST_Scale, ST_Rotate, ST_Subdivide, ST_CurveToLine, ST_Distance, ST_Length, ST_Area, ST_HausdorffDistance, ST_FrechetDistance, ST_Transform) (#549) (c1a6062)
  • Add support for int4multirange, int8multirange and nummultirange data types (#555) (8773862)
  • Add support for macaddr8 and macaddr8[] data types (#554) (af6678e)
  • Add support for tsvector and tsquery data types (#553) (d45bbd8)
  • Extend support for PostgreSQL full-text search functions (#558) (d68a334)
4.2.0

Features

  • #538: Add support for accessing field from a composite type (#542) (34bf515)
  • #538: Add support for the functions provided by fuzzystrmatch extension (#540) (c8073c6)
  • Add support for ST_GeomFromGeoJSON and ST_AsGeoJSON (#545) (e7f4df1)
  • Support binding input arguments to several PostGIS functions (#543) (161f74b)
4.1.0

Features

  • #522: Support bounded infinity values in range types (#523) (6e568d1)
  • Add support for AGE, DATE_PART, MAKE_DATE, MAKE_TIMESTAMP, MAKE_TIMESTAMPTZ, MAKE_TIME (#528) (5e6956a)
  • Add support for ARRAY_FILL, ARRAY_LOWER, ARRAY_SAMPLE, ARRAY_UPPER, JSONB_BUILD_ARRAY, JSON_BUILD_ARRAY (#530) (a2091e8)
  • Add support for CONCAT_WS, FORMAT, LEFT, REPEAT, REVERSE, RIGHT (#533) (83678f5)
  • Add support for JSONB_EXTRACT_PATH, JSON_EXTRACT_PATH, JSONB_EXTRACT_PATH_TEXT, JSON_EXTRACT_PATH_TEXT, JSONB_TO_TSVECTOR, JSONB_TYPEOF (#535) (578e528)
4.0.0

⚠ BREAKING CHANGES

  • modernize with PHP 8.2 features (like read-only classes) (#503)
  • drop support for PHP 8.1 (#468)
  • remove deprecations scheduled for v4.0 (#469)

Features

  • #510: Add support for UUID[] data type (#511) (1c9cafb)
  • Add support for hashing and cryptographic functions MD5, SHA224, SHA256, SHA384, SHA512 (#507) (3e42396)
  • Add support for PostGIS functions ST_ConcaveHull, ST_CurveN, ST_Letters, ST_NumCurves, ST_RemoveIrrelevantPointsForView, ST_RemoveSmallParts, ST_SimplifyPolygonHull, ST_TriangulatePolygon (#505) (2992811)
  • Add support for PostGIS functions ST_HasZ, ST_HasM, ST_CoverageUnion, ST_LineExtend (#504) (826ffef)
  • Add the missing support for null values in the network array data types (#517) (7fb6dc7)
  • Drop support for PHP 8.1 (#468) (94f2ed8)
  • Modernize with PHP 8.2 features (like read-only classes) (#503) (20b29b1)
  • Remove deprecations scheduled for v4.0 (#469) (73585aa)
3.7.0

Features

  • Add support for DATE_TRUNC (#493) (01b564a)
  • Improve accidental misconfiguration through the use of constants for all DBAL types (#486) (2fcdf95)
3.6.2

Bug Fixes

  • #482: Always preserve strings (even if they are obviously numerical) when transforming a TEXTARRAY value into a PHP array (#488) (77eed3e)
3.6.1

Bug Fixes

  • #473: Add public getter methods to Range value objects (#477) (9ba319e)
  • #474: Support usage of arithmetic expressions in mathematical functions (#475) (75b025d)
3.6.0

Features

  • #456: Add convenience factory methods to WktSpatialData (#459) (7242665)
  • #458: Ensure Doctrine returns PostgreSQL spatial data in text format (EWKT) instead of binary format (EWKB) (#462) (8ac7a70)
  • Add support for uuid_extract_timestamp and uuid_extract_version (#466) (77a513f)
  • Add support for some new functions from PostgreSQL 18 (#464) (118bfa3)
3.5.1

Bug Fixes

  • #446: Restore OVERLAPS to its intended namespace and strengthen its test coverage (#447) (6435f06)
3.5.0

Features

  • #305, #432: Add support for PostGIS functions for topological and distance relationships (#434) (2922b63)
  • #305: Add support for PostGIS measurement, overlay and geometry processing functions (#435) (9724452)
  • #305: Add support for PostGIS operators (#430) (5b5583b)
  • #305: Add support for PostGIS's types of GEOGRAPHY, GEOMETRY and their array variations (#421) (d97caae)
  • #410:  add support for LTREE type (#411) (5a6563d)
  • #440: Add support for functions to use with the LTREE data type (#440) (745b269)
  • Add support for websearch_to_tsquery (#437) (be90545)

Bug Fixes

  • #424: Address unintentional loss of string data type when retrieving PHP array item values from a stored TextArray value (#443) (bdb8df2)
  • Address broken escaping of array items for JsonbArray and preserve integer values as strings if they are outside PHP integer range (#442) (d213967)

Code Refactoring

  • #305: Move PostGIS operators in a dedicated namespace (#433) (522e653)
3.4.1

Bug Fixes

3.4.0

Features

  • #401: Improve JSON field extraction by adding index support (#402) (8d18b35)
3.3.0

Features

  • Add support for formatting functions to_char, to_date, to_number, to_timestamp (#386) (7a047e8)
  • Add support for range types (#396) (cc4749c)
3.2.2

Bug Fixes

  • #351: Correct round-trip handling of special characters between PHP and PostgreSQL (#391) (979a581)
3.2.1

Bug Fixes

  • #351: Remove invalid or non-PostgreSQL-compliant test cases; ensure edge cases for backslashes, quotes, special characters, and NULL handling are covered (#385) (c5f7327)
  • #367: Change to uppercase the return value of getSQLDeclaration (#368) (7e4be89)
3.2.0

Features

  • Add support for arithmetic functions ABS, CEIL, FLOOR, ROUND and TRUNC (#369) (3f04c0e)
  • Add support for mathematical functions CBRT, DEGREES, EXP, LN, LOG, PI, POWER, RADIANS, RANDOM, SIGN and WIDTH_BUCKET (#383) (3665a25)
  • Add support for specifying explicit range bounds (#380) (d83a099)
3.1.0

Features

  • Add support for ARRAY_POSITION() and ARRAY_POSITIONS() (#366) (a1dc059)
  • Add support for DATE_ADD(), DATE_SUBTRACT() and DATE_BIN() (#345) (c3cb08d)
  • Add support for JSONB_PATH_EXISTS(), JSONB_PATH_MATCH(), JSONB_PATH_QUERY(), JSONB_PATH_QUERY_ARRAY() and JSONB_PATH_QUERY_FIRST() (#346) (0cda902)
  • Add support for POINT and POINT[] data types (#348) (18ec906)
  • Add support for REGEXP_COUNT(), REGEXP_INSTR() and REGEXP_SUBSTR() and extend support for REGEXP_REPLACE() (#352) (9959476)
  • Add support for distance operator <@> (#361) (8dbbf8c)
  • Extend existing function support with optional boolean parameters (#347) (67265cc)
  • Extend support of REGEXP_LIKE(), REGEXP_MATCH() and REGEXP_REPLACE() while deprecating the legacy limited flagged variations of FlaggedRegexpLike, FlaggedRegexpMatch and FlaggedRegexpReplace (#357) (ef688dc)

Code Refactoring

  • Allow multiple node mapping patterns to be used and their arguments to be validated in variadic functions (#350) (e111dd2)
  • Allow node mapping in variadic functions to have different patterns, thus opening the path to a combination of node types (compared to the previous single type support) (#349) (6a5ba9e)
  • Stricter method argument types when handling variadic functions (#343) (553a30c)
3.0.2

Bug Fixes

  • Avoid infinite parsing loop for GREATEST() and LEAST() by using SimpleArithmeticExpression (#338) (169192b)
3.0.1

Bug Fixes

  • Restore support for unquoted string values stored in text[] (#333) (339e988)
3.0.0

⚠️🚨 BREAKING CHANGES

For detailed upgrade guide read here: UPGRADE.md

1. Type Preservation for PostgreSQL numerical and text arrays

The library now attempts to strictly preserve the type of values when converting between PostgreSQL arrays and PHP arrays. This affects all array type handlers including TextArray, integer arrays, and boolean arrays.

What changed: Previously, numeric values could lose their type information during conversion (e.g., floats might become integers, string representations of numbers might become actual numbers). With version 3.0.0, the original data types are preserved in both directions. The change comes from PR #304.

Examples:

  • Integer values like 1 remain integers
  • Float values like 1.5 remain floats
  • String representations like '1' remain strings
  • Boolean values like true/false remain booleans
  • Scientific notation like '1.23e5' is preserved

2. Refactored Exception Handling for JsonbArray

The exception handling for JsonbArray has been refactored to be more consistent with the network types approach, providing clearer error messages and better diagnostics.

What changed: Previously, generic exceptions were thrown when JSON array conversion failed. With version 3.0.0, specific InvalidJsonbArrayItemForPHPException is used with more descriptive error messages about the exact nature of the failure. The change comes from PR #311.

Features

Added new data types

  • Add support for array of float types real[] and double precision[] (#307) (1db35ac)
  • Add support for network types inet, inet[], cidr, cidr[], macaddr, macaddr[] (#310) (ba3f9f2)

Added new functions

Extended support in some existing functions

  • Add support for NULL value in array_append(), array_replace(), array_prepend(), array_remove() (#322) (396856f)
  • Add support for DISTINCT and ORDER BY clauses to json_agg() and jsonb_agg() (#317) (4cdc638)
  • Add support for DISTINCT clause to array_agg() (#316) (3c46021)

Code Refactoring

  • Modernise the validation in active code and the associated tests when dealing with integer arrays (#308) (67c344e)
2.9.0

Features

  • Add limited support for json_build_object and jsonb_build_object (#268) (2605f5a)
  • Add support for ORDER BY clause for array_agg() (#267) (7c64742)
  • Add support for range functions (#263) (2fa8434)
2.10.3

Bug Fixes

  • Add support for Lexer v1 (allowed by ORM < v2.15) (#300) (16fd227)
2.10.2

Bug Fixes

  • Improve BC by deprecating customiseFunction instead of renaming it straight away (#294) (910d328)
2.10.1

Bug Fixes

  • Wrap up ORM v3 throwable when parsing fails in variadic functions (#285) (59a8cb9)
2.10.0

Features

  • Add (limited) support for json_exists, json_query, json_scalar, json_serialize and json_value (#277) (4a26400)
  • Add multiple arguments support for ARRAY (#279) (7f2b05d)

Code Refactoring

  • Introduce BaseRegexpFunction and ParserException (#269) (fed0367)
  • Validate that variadic functions have only the expected count of arguments (#274) (019f84d)
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.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin