Skip to content

chore: prepare for laravel 11 #61

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

Merged
merged 4 commits into from
Feb 24, 2024
Merged
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
18 changes: 13 additions & 5 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Testing Laravel with MySQL
on: [pull_request]
jobs:
laravel:
name: Laravel (PHP ${{ matrix.php-versions }})
name: Laravel ${{ matrix.laravel }} (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
env:
DB_DATABASE: logtodb
Expand All @@ -29,10 +29,16 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.2']
laravel: [ ^10.0, ^11.0 ]
php: ['8.2', '8.3']
include:
- laravel: ^10.0
testbench: ^8.0
- laravel: ^11.0
testbench: ^9.0
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Start MongoDB
uses: supercharge/[email protected]
Expand All @@ -43,7 +49,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ matrix.php }}
extensions: mbstring, dom, fileinfo, mysql, mongodb
coverage: xdebug

Expand All @@ -53,7 +59,9 @@ jobs:
# run: sudo systemctl start mysql.service

- name: Install Composer dependencies
run: composer install --no-progress
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-progress

- name: Test with phpunit
run: vendor/bin/phpunit --coverage-clover ./coverage.xml
Expand Down
26 changes: 20 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"name": "danielme85/laravel-log-to-db",
"description": "Custom Laravel Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel native logging functionality.",
"keywords": ["laravel", "logging", "log", "database", "db", "mysql", "sql", "mongodb"],
"keywords": [
"laravel",
"logging",
"log",
"database",
"db",
"mysql",
"sql",
"mongodb"
],
"type": "library",
"license": "MIT",
"authors": [
Expand All @@ -12,14 +21,14 @@
],
"require": {
"php": "^8.1",
"illuminate/support": "^10.0"
"illuminate/support": "^10.0|^11.0"
},
"require-dev": {
"ext-mongodb": "*",
"phpunit/phpunit": "9.*",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^7.0|^8.0",
"mongodb/laravel-mongodb": "^4"
},
"suggest": {
Expand All @@ -30,6 +39,11 @@
"danielme85\\LaravelLogToDB\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"TestModels\\": "tests/TestModels"
}
},
"extra": {
"laravel": {
"providers": [
Expand All @@ -41,4 +55,4 @@
}
},
"minimum-stability": "dev"
}
}
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<testsuites>
<testsuite name="Test Suite danielme85/laravel-log-to-db">
<directory suffix=".php">./tests/</directory>
<exclude>./tests/TestModels</exclude>
</testsuite>
</testsuites>
<source>
Expand Down
25 changes: 0 additions & 25 deletions phpunit.xml.bak

This file was deleted.