Skip to content

Releases: clickbar/laravel-magellan

2.0.0

19 Mar 14:59
6bb2bf4
Compare
Choose a tag to compare

What's Changed

We are excited to finally release a huge overhaul on the DX with Laravel Magellan!

Please check out the upgrade guide for more recommended steps.

Breaking

  • Removed support for deprecated Laravel versions 9.x & 10.x
  • Require at least PHP 8.2
  • Removed the HasPostgisColumns trait & $postgisColumns property.
  • Removed GeometryWKBCast
  • Refactored BBoxCast to be generic & internal, please use Box subclasses directly
  • Removed automatic SRID transformation
  • Removed st prefixed builder functions (e.g. stSelect, stWhere, ...)
  • Removed GeometryType Enum
  • Renamed toString to toRawSql on Box classes
  • Removed Doctrine DBAL types & registration (was used for older Laravel versions)
  • GeometryGeojsonRule is not directly invokable anymore

Added

  • Added Laravel 12 & PHP 8.4 support
  • Added Castable to all geometries to use them as casters, instead of the GeometryWKBCast
  • Added Castable to all boxes to use them as casters, instead of the BBoxCast
  • Added Aliased Expression class as wrapper for AS in query selects
    • Added ->as() helper method on MagellanBaseExpression
  • Added withMagellanCasts() as EloquentBuilder macro
  • Added AsGeometry and AsGeography database expressions
  • Added fromString() to Box classes to create a box from a string
  • Added Stringable interface to all box classes
  • Added JsonSerializable to Box2D and Box3D

Improved

  • Validate the structure of Geometry coordinates to be an array in the GeojsonParser and fail if not
  • Use of ST functions directly in the Laravel default builder methods
  • Use of ST functions directly in Model::create array
  • Renamed parameters of ST functions that can receive geometry or geography from $geometry to $geometryOrGeography
  • Geometry & Box implements Expression and therefore can be used in ->select(...) directly now

Fixed

  • Fixed only using default PHP string precision in Box toRawSql methods, now uses the maximum precision

Removed

  • Removed magellan:update-postgis-columns command
  • Removed magellan.eloquent & magellan.model_directories configs

New Contributors

Full Changelog: 1.8.0...2.0.0

1.8.0

25 Feb 12:02
461e39f
Compare
Choose a tag to compare

What's Changed

  • Support for Laravel 12.x

New Contributors

Full Changelog: 1.7.1...1.8.0

1.7.1

03 Jan 11:58
524a98d
Compare
Choose a tag to compare

Fixed

  • [1.x] Backport: Fix missing precision in WKT coordinates by @saibotk in #122

Full Changelog: 1.7.0...1.7.1

1.7.0

27 Dec 19:47
d37f0d5
Compare
Choose a tag to compare

Added

  • PostGIS ST_LineSubstring support
  • PostGIS ST_LineFromEncodedPolyline support
  • PostGIS ST_LineLocatePoint support
  • Added ST::asGeoJson function to convert geometries to GeoJSON via the database

Fixed

  • Fixed Expression types in SRID-related functions
  • Fixed missing schema prefix for generated SQL of first-level ST functions
  • Fixed numeric SRID queries in ST::transform and ST::setSRID (thanks @BezBIS #91)
  • Fixed ST::buffer & ST:offsetCurve: Correctly renamed styleMitreLevel to styleMitreLimit

New Contributors

Full Changelog: 1.6.1...1.7.0

1.6.1

08 Aug 20:47
8421042
Compare
Choose a tag to compare

Improved

  • Only override attribute preparation functions on models instead of performInsert or performUpdate entirely (thanks @RomainMazB #89)

Fixed

  • Fixed geometries not being passed to model events (fixes #87) (thanks @RomainMazB #89)
  • Fixed not updating Point dimension when using setAltitude

New Contributors

Full Changelog: 1.6.0...1.6.1

1.6.0

17 Mar 19:34
7336e57
Compare
Choose a tag to compare

What's Changed

  • chore(deps): Update dependencies & spatie/invade by @saibotk in #79
  • chore: Laravel 11 support by @faytekin in #76

New Contributors

Full Changelog: 1.5.0...1.6.0

1.5.0

19 Jan 10:49
377c0a1
Compare
Choose a tag to compare

Added

  • Added as parameter for stFrom function
  • Aligned stHaving with stWhere to also accept string column and ST expressions, boxes and geometries as value

Fixed

  • Fixed builder macro docblocks to use FQDN for an issue within laravel-ide-helper
  • Fixed ST_PROJECT function not being migrated to the GeometryType enum.
  • Fixed model attribute equality checks for geometries, reduces unnecessary database updates (thanks @adamczykpiotr)

Full Changelog: 1.4.0...1.5.0

1.4.0

01 Jul 23:47
eb17e22
Compare
Choose a tag to compare

Improved

  • Added Typing for Box2D and Box3D in GeoParam allowing Box objects as params in Magellan Expressions
  • Added evaluation of parameters in stWhere in order to also allow magellan expressions in value and regular string, boxes or geometries in first parameter

Full Changelog: 1.3.0...1.4.0

1.3.0

28 Jun 15:15
a61f495
Compare
Choose a tag to compare

Added

  • Added Missing Distance Relationships Functions (Fixes #46)

Fixed

  • Fixed nullable handling in TransformsGeojsonGeometry trait (Fixes #37)

Full Changelog: 1.2.2...1.3.0

1.2.2

28 Mar 13:20
3d2c1bd
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.2.1...1.2.2