Skip to content

Commit 76a48e7

Browse files
committed
Support Laravel 8 / Mysql 5.7 (v5.0.0). Updated documentation.
1 parent 7f62564 commit 76a48e7

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
language: php
22

33
php:
4-
- '5.5'
5-
- '5.6'
6-
- '7.0'
7-
- '7.1'
8-
- '7.2'
4+
- '7.3'
5+
- '7.4'
96

107
env:
118
- MYSQL_VERSION=5.7
@@ -33,7 +30,5 @@ before_script:
3330

3431
script: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
3532

36-
after_script:
37-
- php vendor/bin/coveralls -v
38-
- ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT
33+
after_script: ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT
3934

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Please check the documentation for your MySQL version. MySQL's Extension for Spa
1313
**Versions**
1414

1515
- `1.x.x`: MySQL 5.6 (also supports MySQL 5.5 but not all spatial analysis functions)
16-
- `2.x.x`: MySQL 5.7 and 8.0
16+
- `2.x.x`: MySQL 5.7 and 8.0 (Laravel version < 8.0)
17+
- `3.x.x`: MySQL 8.0 with SRID support (Laravel version < 8.0)
18+
- `4.x.x`: MySQL 8.0 with SRID support (Laravel 8)
19+
- **`5.x.x`: MySQL 5.7 and 8.0 (Laravel 8) [Current branch]**
1720

1821
This package also works with MariaDB. Please refer to the [MySQL/MariaDB Spatial Support Matrix](https://mariadb.com/kb/en/library/mysqlmariadb-spatial-support-matrix/) for compatibility.
1922

@@ -22,7 +25,10 @@ This package also works with MariaDB. Please refer to the [MySQL/MariaDB Spatial
2225
Add the package using composer:
2326

2427
```shell
25-
composer require grimzy/laravel-mysql-spatial
28+
$ composer require grimzy/laravel-mysql-spatial:^5.0
29+
30+
# or for Laravel version < 8.0
31+
$ composer require grimzy/laravel-mysql-spatial:^2.0
2632
```
2733

2834
For MySQL 5.6 and 5.5:

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.5.9",
18+
"php": ">=7.3",
1919
"ext-pdo": "*",
2020
"ext-json": "*",
21-
"illuminate/database": "^5.2|^6.0|^7.0",
21+
"illuminate/database": "^8.0",
2222
"geo-io/wkb-parser": "^1.0",
2323
"jmikola/geojson": "^1.0"
2424
},
2525
"require-dev": {
2626
"phpunit/phpunit": "~4.8|~5.7",
27-
"mockery/mockery": "^0.9.9",
28-
"laravel/laravel": "^5.2|^6.0|^7.0",
27+
"laravel/laravel": "^8.0",
2928
"doctrine/dbal": "^2.5",
3029
"laravel/browser-kit-testing": "^2.0",
31-
"php-coveralls/php-coveralls": "^2.0"
30+
"mockery/mockery": "^0.9.9"
3231
},
3332
"autoload": {
3433
"psr-4": {
@@ -43,7 +42,7 @@
4342
},
4443
"extra": {
4544
"branch-alias": {
46-
"dev-master": "2.0.x-dev"
45+
"dev-master": "5.0.x-dev"
4746
},
4847
"laravel": {
4948
"providers": [

src/Eloquent/BaseBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Grimzy\LaravelMysqlSpatial\Eloquent;
46

57
use Illuminate\Database\Query\Builder as QueryBuilder;
68

79
class BaseBuilder extends QueryBuilder
810
{
9-
protected function cleanBindings(array $bindings)
11+
public function cleanBindings(array $bindings)
1012
{
1113
$bindings = array_map(function ($binding) {
1214
return $binding instanceof SpatialExpression ? $binding->getSpatialValue() : $binding;

0 commit comments

Comments
 (0)