Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 12.x Compatibility #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
113 changes: 60 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
name: run-tests

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.0', 8.1, 8.2, 8.3]
laravel: [8, 9, 10, 11]
exclude:
- php: '8.0'
laravel: 10
- php: '8.0'
laravel: 11
- php: '8.2'
laravel: 8
- php: '8.1'
laravel: 11

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_spatial_test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

- name: Start database server
run: sudo /etc/init.d/mysql start

- name: Execute tests
env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
run: vendor/bin/phpunit --testdox --colors=always --exclude-group skipped
test:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: ['8.0', 8.1, 8.2, 8.3]
laravel: [8, 9, 10, 11, '12']
exclude:
- php: '8.0'
laravel: 10
- php: '8.0'
laravel: 11
- php: '8.2'
laravel: 8
- php: '8.1'
laravel: 11
- laravel: '12'
php: '8.0'
- laravel: '12'
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_spatial_test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

- name: Start database server
run: sudo /etc/init.d/mysql start

- name: Execute tests
env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
run: vendor/bin/phpunit --testdox --colors=always --exclude-group skipped
103 changes: 51 additions & 52 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
{
"name": "tarfin-labs/laravel-spatial",
"description": "Laravel package to work with geospatial data types and functions.",
"keywords": [
"tarfin-labs",
"laravel-spatial"
],
"homepage": "https://github.com/tarfin-labs/laravel-spatial",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Turan Karatuğ",
"email": "turan.karatug@tarfin.com",
"role": "Developer"
"name": "tarfin-labs/laravel-spatial",
"description": "Laravel package to work with geospatial data types and functions.",
"keywords": [
"tarfin-labs",
"laravel-spatial"
],
"homepage": "https://github.com/tarfin-labs/laravel-spatial",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Turan Karatuğ",
"email": "turan.karatug@tarfin.com",
"role": "Developer"
}
],
"require": {
"php": "^8.0|^8.1|^8.2|^8.3",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0"
},
"require-dev": {
"doctrine/dbal": "^3.3|^4.2",
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.0|^11.5.3"
},
"autoload": {
"psr-4": {
"TarfinLabs\\LaravelSpatial\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"TarfinLabs\\LaravelSpatial\\Tests\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"TarfinLabs\\LaravelSpatial\\LaravelSpatialServiceProvider"
],
"aliases": {
"LaravelSpatial": "TarfinLabs\\LaravelSpatial\\LaravelSpatialFacade"
}
}
}
],
"require": {
"php": "^8.0|^8.1|^8.2|^8.3",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"doctrine/dbal": "^3.3",
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
"TarfinLabs\\LaravelSpatial\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"TarfinLabs\\LaravelSpatial\\Tests\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"TarfinLabs\\LaravelSpatial\\LaravelSpatialServiceProvider"
],
"aliases": {
"LaravelSpatial": "TarfinLabs\\LaravelSpatial\\LaravelSpatialFacade"
}
}
}
}
Loading