diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 7d9a5987..fcbf6401 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -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 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 346f83e2..2a044d15 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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 }} diff --git a/composer.json b/composer.json index 1cd5a3e6..8765f627 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/src/Schema/Builder.php b/src/Schema/Builder.php index fb884387..9a85b420 100644 --- a/src/Schema/Builder.php +++ b/src/Schema/Builder.php @@ -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); } diff --git a/src/Types/Geometry.php b/src/Types/Geometry.php index 69ca6507..0c76484a 100644 --- a/src/Types/Geometry.php +++ b/src/Types/Geometry.php @@ -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, diff --git a/src/Types/GeometryCollection.php b/src/Types/GeometryCollection.php index bc296f08..b92d8b60 100755 --- a/src/Types/GeometryCollection.php +++ b/src/Types/GeometryCollection.php @@ -17,7 +17,7 @@ * * @implements GeometryInterface */ -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. diff --git a/src/Types/MultiLineString.php b/src/Types/MultiLineString.php index dc51edaf..6b0a59ab 100644 --- a/src/Types/MultiLineString.php +++ b/src/Types/MultiLineString.php @@ -12,7 +12,7 @@ * * @extends GeometryCollection */ -class MultiLineString extends GeometryCollection implements GeometryInterface, \Stringable +class MultiLineString extends GeometryCollection implements \Stringable, GeometryInterface { /** * The minimum number of items required to create this collection. diff --git a/src/Types/MultiPoint.php b/src/Types/MultiPoint.php index be0e37af..4d82442c 100644 --- a/src/Types/MultiPoint.php +++ b/src/Types/MultiPoint.php @@ -9,7 +9,7 @@ /** * @implements GeometryInterface */ -class MultiPoint extends PointCollection implements GeometryInterface, \Stringable +class MultiPoint extends PointCollection implements \Stringable, GeometryInterface { /** * The minimum number of items required to create this collection. diff --git a/src/Types/MultiPolygon.php b/src/Types/MultiPolygon.php index f0e00016..6454f5e3 100644 --- a/src/Types/MultiPolygon.php +++ b/src/Types/MultiPolygon.php @@ -12,7 +12,7 @@ * * @extends GeometryCollection */ -class MultiPolygon extends GeometryCollection implements GeometryInterface, \Stringable +class MultiPolygon extends GeometryCollection implements \Stringable, GeometryInterface { /** * The minimum number of items required to create this collection. diff --git a/src/Types/Point.php b/src/Types/Point.php index b1fb9ddd..1dd576f2 100644 --- a/src/Types/Point.php +++ b/src/Types/Point.php @@ -9,7 +9,7 @@ /** * @implements GeometryInterface */ -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) { @@ -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 {