Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "8.2"
coverage: none

- name: Install composer dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1]
laravel: [10.*]
php: [8.2, 8.3]
laravel: [11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
carbon: ^2.63

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand Down
29 changes: 14 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,26 @@
"php": "^8.1",
"ext-json": "*",
"ext-pdo": "*",
"doctrine/dbal": "^3.5",
"geo-io/wkb-parser": "^1.0",
"illuminate/contracts": "^10.0",
"illuminate/database": "^10.0",
"illuminate/contracts": "^11.0",
"illuminate/database": "^11.0",
"jmikola/geojson": "^1.0"
},
"conflict": {},
"require-dev": {
"driftingly/rector-laravel": "^0.21.0",
"laravel/browser-kit-testing": "^7.0",
"laravel/laravel": "^10.2.4",
"laravel/pint": "^1.10.3",
"mockery/mockery": "^1.6.2",
"nunomaduro/collision": "^7.7.0",
"nunomaduro/larastan": "^2.6.3",
"orchestra/testbench": "^8.5.9",
"driftingly/rector-laravel": "^1.2",
"laravel/browser-kit-testing": "^7.2",
"laravel/laravel": "^11.0.7",
"laravel/pint": "^1.15.3",
"mockery/mockery": "^1.6.11",
"nunomaduro/collision": "^8.1.1",
"nunomaduro/larastan": "^2.9.6",
"orchestra/testbench": "^9.0.4",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpunit/phpunit": "^10.2.3",
"rector/rector": "^0.17.2"
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.16",
"phpunit/phpunit": "^11.1.3",
"rector/rector": "^1.0.5"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions src/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ class Builder extends MySqlBuilder
* Create a new command set with a Closure.
*
* @param string $table
* @param Closure $callback
* @return Blueprint
*/
protected function createBlueprint($table, Closure $callback = null)
protected function createBlueprint($table, ?Closure $callback = null)
{
return new Blueprint($table, $callback);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Types/Geometry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Limenet\LaravelMysqlSpatial\Exceptions\UnknownWKBException;
use Limenet\LaravelMysqlSpatial\Exceptions\UnknownWKTTypeException;

abstract class Geometry implements GeometryInterface, Jsonable, \JsonSerializable
abstract class Geometry implements \JsonSerializable, GeometryInterface, Jsonable
{
protected static array$wkb_types = [
protected static array $wkb_types = [
1 => Point::class,
2 => LineString::class,
3 => Polygon::class,
Expand Down
2 changes: 1 addition & 1 deletion src/Types/GeometryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @implements GeometryInterface<FeatureCollection>
*/
class GeometryCollection extends Geometry implements IteratorAggregate, ArrayAccess, Arrayable, Countable, GeometryInterface, \Stringable
class GeometryCollection extends Geometry implements \Stringable, Arrayable, ArrayAccess, Countable, GeometryInterface, IteratorAggregate
{
/**
* The minimum number of items required to create this collection.
Expand Down
2 changes: 1 addition & 1 deletion src/Types/MultiLineString.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @extends GeometryCollection<GeometryInterface>
*/
class MultiLineString extends GeometryCollection implements GeometryInterface, \Stringable
class MultiLineString extends GeometryCollection implements \Stringable, GeometryInterface
{
/**
* The minimum number of items required to create this collection.
Expand Down
2 changes: 1 addition & 1 deletion src/Types/MultiPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @implements GeometryInterface<Point>
*/
class MultiPoint extends PointCollection implements GeometryInterface, \Stringable
class MultiPoint extends PointCollection implements \Stringable, GeometryInterface
{
/**
* The minimum number of items required to create this collection.
Expand Down
2 changes: 1 addition & 1 deletion src/Types/MultiPolygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @extends GeometryCollection<Polygon>
*/
class MultiPolygon extends GeometryCollection implements GeometryInterface, \Stringable
class MultiPolygon extends GeometryCollection implements \Stringable, GeometryInterface
{
/**
* The minimum number of items required to create this collection.
Expand Down
5 changes: 2 additions & 3 deletions src/Types/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @implements GeometryInterface<GeoJsonPoint>
*/
class Point extends Geometry implements GeometryInterface, \Stringable
class Point extends Geometry implements \Stringable, GeometryInterface
{
public function __construct(protected float $lat, protected float $lng, ?int $srid = 0)
{
Expand Down Expand Up @@ -64,8 +64,7 @@ public function __toString(): string
}

/**
* @param $geoJson \GeoJson\Feature\Feature|string
* @return \Limenet\LaravelMysqlSpatial\Types\Point
* @param $geoJson \GeoJson\Feature\Feature|string
*/
public static function fromJson(string|GeoJson $geoJson): self
{
Expand Down