Skip to content

Commit 08e6a82

Browse files
committed
change namespace
1 parent 68117d3 commit 08e6a82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+282
-301
lines changed

README.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ From the command line:
3131
php artisan make:migration create_places_table
3232
```
3333

34-
Then edit the migration you just created by adding at least one spatial data field. For Laravel versions prior to 5.5, you can use the Blueprint provided by this package (Grimzy\LaravelMysqlSpatial\Schema\Blueprint):
34+
Then edit the migration you just created by adding at least one spatial data field.
3535

3636
```php
3737
use Illuminate\Database\Migrations\Migration;
@@ -92,11 +92,11 @@ Then edit the model you just created. It must use the `SpatialTrait` and define
9292
namespace App;
9393

9494
use Illuminate\Database\Eloquent\Model;
95-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
95+
use Limenet\LaravelMysqlSpatial\Eloquent\SpatialTrait;
9696

9797
/**
98-
* @property \Grimzy\LaravelMysqlSpatial\Types\Point $location
99-
* @property \Grimzy\LaravelMysqlSpatial\Types\Polygon $area
98+
* @property \Limenet\LaravelMysqlSpatial\Types\Point $location
99+
* @property \Limenet\LaravelMysqlSpatial\Types\Polygon $area
100100
*/
101101
class Place extends Model
102102
{
@@ -116,9 +116,9 @@ class Place extends Model
116116
### Saving a model
117117

118118
```php
119-
use Grimzy\LaravelMysqlSpatial\Types\Point;
120-
use Grimzy\LaravelMysqlSpatial\Types\Polygon;
121-
use Grimzy\LaravelMysqlSpatial\Types\LineString;
119+
use Limenet\LaravelMysqlSpatial\Types\Point;
120+
use Limenet\LaravelMysqlSpatial\Types\Polygon;
121+
use Limenet\LaravelMysqlSpatial\Types\LineString;
122122

123123
$place1 = new Place();
124124
$place1->name = 'Empire State Building';
@@ -141,9 +141,9 @@ $place1->save();
141141
Or if your database fields were created with a specific SRID:
142142

143143
```php
144-
use Grimzy\LaravelMysqlSpatial\Types\Point;
145-
use Grimzy\LaravelMysqlSpatial\Types\Polygon;
146-
use Grimzy\LaravelMysqlSpatial\Types\LineString;
144+
use Limenet\LaravelMysqlSpatial\Types\Point;
145+
use Limenet\LaravelMysqlSpatial\Types\Polygon;
146+
use Limenet\LaravelMysqlSpatial\Types\LineString;
147147

148148
$place1 = new Place();
149149
$place1->name = 'Empire State Building';
@@ -179,7 +179,7 @@ $lng = $place2->location->getLng(); // -73.9878441
179179

180180
### Available Geometry classes
181181

182-
| `Grimzy\LaravelMysqlSpatial\Types` | OpenGIS Class |
182+
| `Limenet\LaravelMysqlSpatial\Types` | OpenGIS Class |
183183
| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
184184
| `Point($lat, $lng, $srid = 0)` | [Point](https://dev.mysql.com/doc/refman/8.0/en/gis-class-point.html) |
185185
| `MultiPoint(Point[], $srid = 0)` | [MultiPoint](https://dev.mysql.com/doc/refman/8.0/en/gis-class-multipoint.html) |
@@ -193,7 +193,7 @@ Check out the [Class diagram](https://user-images.githubusercontent.com/1837678/
193193

194194
### Using Geometry classes
195195

196-
In order for your Eloquent Model to handle the Geometry classes, it must use the `Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait` trait and define a `protected` property `$spatialFields` as an array of MySQL Spatial Data Type column names (example in [Quickstart](#user-content-create-a-model)).
196+
In order for your Eloquent Model to handle the Geometry classes, it must use the `Limenet\LaravelMysqlSpatial\Eloquent\SpatialTrait` trait and define a `protected` property `$spatialFields` as an array of MySQL Spatial Data Type column names (example in [Quickstart](#user-content-create-a-model)).
197197

198198
#### IteratorAggregate and ArrayAccess
199199

@@ -289,19 +289,6 @@ Available scopes:
289289

290290
*Note that behavior and availability of MySQL spatial analysis functions differs in each MySQL version (cf. [documentation](https://dev.mysql.com/doc/refman/8.0/en/spatial-function-reference.html)).*
291291

292-
## Migrations
293-
294-
For Laravel versions prior to 5.5, you can use the Blueprint provided with this package: `Grimzy\LaravelMysqlSpatial\Schema\Blueprint`.
295-
296-
```php
297-
use Illuminate\Database\Migrations\Migration;
298-
use Grimzy\LaravelMysqlSpatial\Schema\Blueprint;
299-
300-
class CreatePlacesTable extends Migration {
301-
// ...
302-
}
303-
```
304-
305292
### Columns
306293

307294
Available [MySQL Spatial Types](https://dev.mysql.com/doc/refman/8.0/en/spatial-type-overview.html) migration blueprints:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
},
4949
"autoload": {
5050
"psr-4": {
51-
"Grimzy\\LaravelMysqlSpatial\\": "src"
51+
"Limenet\\LaravelMysqlSpatial\\": "src"
5252
}
5353
},
5454
"autoload-dev": {
5555
"psr-4": {
56-
"Grimzy\\LaravelMysqlSpatial\\Tests\\": "tests"
56+
"Limenet\\LaravelMysqlSpatial\\Tests\\": "tests"
5757
}
5858
},
5959
"config": {
@@ -65,7 +65,7 @@
6565
"extra": {
6666
"laravel": {
6767
"providers": [
68-
"Grimzy\\LaravelMysqlSpatial\\SpatialServiceProvider"
68+
"Limenet\\LaravelMysqlSpatial\\SpatialServiceProvider"
6969
]
7070
}
7171
},

phpstan-baseline.neon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^PHPDoc type Grimzy\\\\LaravelMysqlSpatial\\\\Types\\\\GeometryInterface of property Grimzy\\\\LaravelMysqlSpatial\\\\Eloquent\\\\SpatialExpression\\:\\:\\$value is not covariant with PHPDoc type float\\|int\\|string of overridden property Illuminate\\\\Database\\\\Query\\\\Expression\\:\\:\\$value\\.$#"
4+
message: "#^PHPDoc type Limenet\\\\LaravelMysqlSpatial\\\\Types\\\\GeometryInterface of property Limenet\\\\LaravelMysqlSpatial\\\\Eloquent\\\\SpatialExpression\\:\\:\\$value is not covariant with PHPDoc type float\\|int\\|string of overridden property Illuminate\\\\Database\\\\Query\\\\Expression\\:\\:\\$value\\.$#"
55
count: 1
66
path: src/Eloquent/SpatialExpression.php
77

@@ -11,12 +11,12 @@ parameters:
1111
path: src/MysqlConnection.php
1212

1313
-
14-
message: "#^Method Grimzy\\\\LaravelMysqlSpatial\\\\MysqlConnection\\:\\:getDefaultSchemaGrammar\\(\\) should return Illuminate\\\\Database\\\\Schema\\\\Grammars\\\\MySqlGrammar but returns Illuminate\\\\Database\\\\Grammar\\.$#"
14+
message: "#^Method Limenet\\\\LaravelMysqlSpatial\\\\MysqlConnection\\:\\:getDefaultSchemaGrammar\\(\\) should return Illuminate\\\\Database\\\\Schema\\\\Grammars\\\\MySqlGrammar but returns Illuminate\\\\Database\\\\Grammar\\.$#"
1515
count: 1
1616
path: src/MysqlConnection.php
1717

1818
-
19-
message: "#^Method Grimzy\\\\LaravelMysqlSpatial\\\\Schema\\\\Blueprint\\:\\:spatialIndex\\(\\) should return Illuminate\\\\Database\\\\Schema\\\\IndexDefinition but returns Illuminate\\\\Support\\\\Fluent\\.$#"
19+
message: "#^Method Limenet\\\\LaravelMysqlSpatial\\\\Schema\\\\Blueprint\\:\\:spatialIndex\\(\\) should return Illuminate\\\\Database\\\\Schema\\\\IndexDefinition but returns Illuminate\\\\Support\\\\Fluent\\.$#"
2020
count: 1
2121
path: src/Schema/Blueprint.php
2222

@@ -26,7 +26,7 @@ parameters:
2626
path: src/Schema/Grammars/MySqlGrammar.php
2727

2828
-
29-
message: "#^Method Grimzy\\\\LaravelMysqlSpatial\\\\Types\\\\Geometry\\:\\:fromWKT\\(\\) should return static\\(Grimzy\\\\LaravelMysqlSpatial\\\\Types\\\\Geometry\\) but returns Grimzy\\\\LaravelMysqlSpatial\\\\Types\\\\GeometryInterface\\.$#"
29+
message: "#^Method Limenet\\\\LaravelMysqlSpatial\\\\Types\\\\Geometry\\:\\:fromWKT\\(\\) should return static\\(Limenet\\\\LaravelMysqlSpatial\\\\Types\\\\Geometry\\) but returns Limenet\\\\LaravelMysqlSpatial\\\\Types\\\\GeometryInterface\\.$#"
3030
count: 1
3131
path: src/Types/Geometry.php
3232

src/Connectors/ConnectionFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Connectors;
3+
namespace Limenet\LaravelMysqlSpatial\Connectors;
44

5-
use Grimzy\LaravelMysqlSpatial\MysqlConnection;
65
use Illuminate\Database\Connectors\ConnectionFactory as IlluminateConnectionFactory;
6+
use Limenet\LaravelMysqlSpatial\MysqlConnection;
77
use PDO;
88

99
class ConnectionFactory extends IlluminateConnectionFactory

src/Doctrine/Geometry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

src/Doctrine/GeometryCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

src/Doctrine/LineString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

src/Doctrine/MultiLineString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

src/Doctrine/MultiPoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

src/Doctrine/MultiPolygon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Grimzy\LaravelMysqlSpatial\Doctrine;
3+
namespace Limenet\LaravelMysqlSpatial\Doctrine;
44

55
use Doctrine\DBAL\Platforms\AbstractPlatform;
66
use Doctrine\DBAL\Types\Type;

0 commit comments

Comments
 (0)