Skip to content

Commit 71a2e01

Browse files
authored
Merge pull request #152 from clickbar/release-2.0.1
release: update README & bump to 2.0.1
2 parents e50ed42 + b0f137a commit 71a2e01

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [2.0.1](https://github.com/clickbar/laravel-magellan/tree/2.0.1) - 2025-08-13
11+
1012
### Fixed
1113

1214
- Fixed using the casts after serialization, e.g. in queueable anonymous event listeners. (thanks @henridv #149)

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@
3131
- [Generators \& Parsers](#generators--parsers)
3232
- [Request Validation and Transformation](#request-validation-and-transformation)
3333
- [Interaction with the database](#interaction-with-the-database)
34-
- [Example Setup](#example-setup)
35-
- [Insert/Update](#insertupdate)
36-
- [Insert/Update with different SRID](#insertupdate-with-different-srid)
37-
- [Select](#select)
38-
- [Using PostGIS functions in queries](#using-postgis-functions-in-queries)
39-
- [Alias in select](#alias-in-select)
40-
- [Geometry or Geography](#geometry-or-geography)
41-
- [Autocast for BBox or geometries](#autocast-for-bbox-or-geometries)
34+
- [Example Setup](#example-setup)
35+
- [Insert/Update](#insertupdate)
36+
- [Insert/Update with different SRID](#insertupdate-with-different-srid)
37+
- [Select](#select)
38+
- [Using PostGIS functions in queries](#using-postgis-functions-in-queries)
39+
- [Alias in select](#alias-in-select)
40+
- [Geometry or Geography](#geometry-or-geography)
41+
- [Autocast for BBox or geometries](#autocast-for-bbox-or-geometries)
4242
- [Limitations](#limitations)
43-
- [Database Name Prepending (Cross Database Connections)](#database-name-prepending-cross-database-connections)
43+
- [Database Name Prepending (Cross Database Connections)](#database-name-prepending-cross-database-connections)
4444
- [Testing](#testing)
4545
- [Changelog](#changelog)
4646
- [Contributing](#contributing)
@@ -49,7 +49,6 @@
4949
- [Credits](#credits)
5050
- [License](#license)
5151

52-
5352
## Introduction
5453

5554
Every sailor needs a nice ship to travel the seven seas ⛵️
@@ -117,9 +116,7 @@ Please see [UPGRADING](UPGRADING.md) for details.
117116
- [x] Geometry and BBox Cast classes
118117
- [x] Auto Cast when using functions that return geometry or bbox
119118
- [x] Empty Geometry Support
120-
- [ ] Custom update Builder method for conversion safety
121119
- [ ] Automatic PostGIS Function Doc Generator
122-
- [ ] BBox support within $postgisColumns & trait (currently with cast only)
123120
- [ ] Custom Geometry Factories & Models
124121
- [ ] More tests
125122
- ...
@@ -131,14 +128,27 @@ able to see everything included in the IDEs auto-completion.
131128

132129
## Creating Tables with PostGIS Columns
133130

134-
Laravel-magellan extends the default Schema Blueprint with all PostGIS functions. Since Laravel has introduced basic
135-
geometry support, all methods are prefixed with `magellan`. e.g.
131+
> [!NOTE]
132+
> Please use the new built-in Laravel methods `geometry` and `geography` where possible.
133+
> Only the `magellanBox2D`, `magellanBox3D`, `magellanGeometryCollection`-functions are not deprecated.
134+
> All other methods are deprecated and will be removed in the next major version.
135+
136+
Laravel-magellan extends the default Schema Blueprint with all PostGIS functions.
137+
Since Laravel has introduced basic geometry support, all methods are prefixed with `magellan`. e.g.
136138

137139
```php
140+
// Deprecated, use the new Laravel methods instead ->geometry('location', 'POINT', 4326)
138141
$table->magellanPoint('location', 4326);
139-
```
140142

141-
![List of all schema methods](art/magellan_schema.png)
143+
// Special column types (not deprecated)
144+
$table->magellanBox2D('bounds2d');
145+
$table->magellanBox3D('bounds3d');
146+
$table->magellanGeometryCollection('collection');
147+
$table->magellanGeometryCollectionM('collection_m');
148+
$table->magellanGeometryCollectionZ('collection_z');
149+
$table->magellanGeometryCollectionZM('collection_zm');
150+
151+
```
142152

143153
## Preparing the Model
144154

art/magellan_schema.png

-355 KB
Binary file not shown.

0 commit comments

Comments
 (0)