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+.
enum DBAL type (#633) (5869318)bytea DBAL type and its array variation (#630) (bc4324e)citext DBAL type and its array variation (#640) (bba3af3)hstore DBAL type and its array variation (#632) (b6f7c12)timetz DBAL type and its array variation (#635) (d80419a)bit and bit varying DBAL types and their array variations (#608) (9f8fed1)box, circle, line, lseg, path, polygon) and their array variations (#601) (5e29747)GENERATE_SERIES through the introduction of GENERATE_NUMERIC_SERIES and GENERATE_TIME_SERIES (#592) (c1b8b44)AT TIME ZONE operator as a DQL function (enabling timezone conversion of timestamp values) (#567) (3ab1d69)date[], timestamp[], and timestamptz[] DBAL types (#597) (989771e)interval[] DBAL type (#591) (7fc59d0)interval DBAL type (#582) (fa71e78)ltree[] DBAL type (#595) (29c28ef)money[] DBAL type (#588) (84e5163)money DBAL type (#577) (95b27a5)range_agg and range_intersect_agg (#573) (c0ca299)tsquery[] DBAL type (#586) (f25d137)tsvector[] DBAL type (#587) (9d45e7d)xml[] DBAL type (#589) (84bfe50)xml DBAL type (#578) (5c9590c)SIMILARITY, STRICT_WORD_SIMILARITYz and WORD_SIMILARITY) (#571) (9715b70)HALFVEC and SPARSEVEC types (#584) (c7d83ae)VECTOR type and distance functions (COSINE_DISTANCE, INNER_PRODUCT, L2_DISTANCE) (#570) (43acc91)datemultirange, tsmultirange, and tstzmultirange DBAL types (#575) (fac1ff6)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)int4multirange, int8multirange and nummultirange data types (#555) (8773862)macaddr8 and macaddr8[] data types (#554) (af6678e)tsvector and tsquery data types (#553) (d45bbd8)fuzzystrmatch extension (#540) (c8073c6)ST_GeomFromGeoJSON and ST_AsGeoJSON (#545) (e7f4df1)AGE, DATE_PART, MAKE_DATE, MAKE_TIMESTAMP, MAKE_TIMESTAMPTZ, MAKE_TIME (#528) (5e6956a)ARRAY_FILL, ARRAY_LOWER, ARRAY_SAMPLE, ARRAY_UPPER, JSONB_BUILD_ARRAY, JSON_BUILD_ARRAY (#530) (a2091e8)CONCAT_WS, FORMAT, LEFT, REPEAT, REVERSE, RIGHT (#533) (83678f5)JSONB_EXTRACT_PATH, JSON_EXTRACT_PATH, JSONB_EXTRACT_PATH_TEXT, JSON_EXTRACT_PATH_TEXT, JSONB_TO_TSVECTOR, JSONB_TYPEOF (#535) (578e528)UUID[] data type (#511) (1c9cafb)MD5, SHA224, SHA256, SHA384, SHA512 (#507) (3e42396)ST_ConcaveHull, ST_CurveN, ST_Letters, ST_NumCurves, ST_RemoveIrrelevantPointsForView, ST_RemoveSmallParts, ST_SimplifyPolygonHull, ST_TriangulatePolygon (#505) (2992811)ST_HasZ, ST_HasM, ST_CoverageUnion, ST_LineExtend (#504) (826ffef)null values in the network array data types (#517) (7fb6dc7)WktSpatialData (#459) (7242665)uuid_extract_timestamp and uuid_extract_version (#466) (77a513f)GEOGRAPHY, GEOMETRY and their array variations (#421) (d97caae)LTREE type (#411) (5a6563d)LTREE data type (#440) (745b269)websearch_to_tsquery (#437) (be90545)TextArray value (#443) (bdb8df2)JsonbArray and preserve integer values as strings if they are outside PHP integer range (#442) (d213967)ARRAY_POSITION() and ARRAY_POSITIONS() (#366) (a1dc059)DATE_ADD(), DATE_SUBTRACT() and DATE_BIN() (#345) (c3cb08d)JSONB_PATH_EXISTS(), JSONB_PATH_MATCH(), JSONB_PATH_QUERY(), JSONB_PATH_QUERY_ARRAY() and JSONB_PATH_QUERY_FIRST() (#346) (0cda902)POINT and POINT[] data types (#348) (18ec906)REGEXP_COUNT(), REGEXP_INSTR() and REGEXP_SUBSTR() and extend support for REGEXP_REPLACE() (#352) (9959476)<@> (#361) (8dbbf8c)REGEXP_LIKE(), REGEXP_MATCH() and REGEXP_REPLACE() while deprecating the legacy limited flagged variations of FlaggedRegexpLike, FlaggedRegexpMatch and FlaggedRegexpReplace (#357) (ef688dc)For detailed upgrade guide read here: UPGRADE.md
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:
1 remain integers1.5 remain floats'1' remain stringstrue/false remain booleans'1.23e5' is preservedThe 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.
real[] and double precision[] (#307) (1db35ac)inet, inet[], cidr, cidr[], macaddr, macaddr[] (#310) (ba3f9f2)any_value() (#323) (19ee3db)array_shuffle() (#324) (90a9b9e)xmlagg() (#318) (0b4db8a)NULL value in array_append(), array_replace(), array_prepend(), array_remove() (#322) (396856f)DISTINCT and ORDER BY clauses to json_agg() and jsonb_agg() (#317) (4cdc638)DISTINCT clause to array_agg() (#316) (3c46021)json_exists, json_query, json_scalar, json_serialize and json_value (#277) (4a26400)ARRAY (#279) (7f2b05d)BaseRegexpFunction and ParserException (#269) (fed0367)BaseFunction::customiseFunction() to BaseFunction::customizeFunction() (#273) (877d929)ROW by @bzanchettin in https://github.com/martin-georgiev/postgresql-for-doctrine/pull/247str_getcsv deprecation in DataStructure.php by @smnandre in https://github.com/martin-georgiev/postgresql-for-doctrine/pull/249Full Changelog: https://github.com/martin-georgiev/postgresql-for-doctrine/compare/v2.7.0...v2.8.0
split_part by @martin-georgiev in https://github.com/martin-georgiev/postgresql-for-doctrine/pull/238Full Changelog: https://github.com/martin-georgiev/postgresql-for-doctrine/compare/v2.6.0...v2.7.0
How can I help you explore Laravel packages today?