Skip to content

Commit 9d75623

Browse files
committed
Laravel 11 support
1 parent c0a3899 commit 9d75623

File tree

7 files changed

+40
-38
lines changed

7 files changed

+40
-38
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
php: [8.1, 8.2]
11+
php: [8.2, 8.3, 8.4]
1212
stability: [prefer-lowest, prefer-stable]
1313

1414
name: PHP ${{ matrix.php }} / ${{ matrix.stability }}
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919

2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
@@ -41,6 +41,8 @@ jobs:
4141
run: vendor/bin/phpunit --colors=always --coverage-clover ./build/logs/clover.xml
4242

4343
- name: Code coverage
44-
uses: codecov/codecov-action@v1
44+
uses: codecov/codecov-action@v3
4545
with:
46-
file: ./build/logs/clover.xml
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
files: ./build/logs/clover.xml
48+
fail_ci_if_error: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Database Profiler for Laravel Web and Console Applications.
1919
2020
| Laravel | Database Profiler |
2121
|---------|------------------------------------------------------------------------|
22-
| 11.x | _[Support](https://buymeacoffee.com/dmitry.ivanov)_ |
22+
| 11.x | [11.x](https://github.com/dmitry-ivanov/laravel-db-profiler/tree/11.x) |
2323
| 10.x | [10.x](https://github.com/dmitry-ivanov/laravel-db-profiler/tree/10.x) |
2424
| 9.x | [9.x](https://github.com/dmitry-ivanov/laravel-db-profiler/tree/9.x) |
2525
| 8.x | [8.x](https://github.com/dmitry-ivanov/laravel-db-profiler/tree/8.x) |

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
"email": "[email protected]"
1313
}],
1414
"require": {
15-
"php": "^8.1",
16-
"illuminate/database": "^10.0",
17-
"illuminate/support": "^10.0"
15+
"php": "^8.2",
16+
"illuminate/database": "^11.0",
17+
"illuminate/support": "^11.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^10.5",
21-
"mockery/mockery": "^1.5.1",
22-
"orchestra/testbench": "^8.0",
23-
"illuminated/testing-tools": "^10.0",
24-
"illuminated/helper-functions": "^10.0"
20+
"phpunit/phpunit": "^11.3.6",
21+
"mockery/mockery": "^1.6.10",
22+
"orchestra/testbench": "^9.11.2",
23+
"illuminated/testing-tools": "^11.0",
24+
"illuminated/helper-functions": "^11.0"
2525
},
2626
"autoload": {
2727
"psr-4": {

phpunit.xml.dist

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
3-
backupGlobals="false"
4-
backupStaticProperties="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
53
beStrictAboutTestsThatDoNotTestAnything="false"
64
beStrictAboutOutputDuringTests="true"
75
bootstrap="vendor/autoload.php"
8-
cacheDirectory=".phpunit.cache"
96
colors="true"
10-
processIsolation="false"
11-
stopOnError="false"
12-
stopOnFailure="false"
7+
displayDetailsOnPhpunitDeprecations="true"
8+
displayDetailsOnTestsThatTriggerErrors="true"
9+
displayDetailsOnTestsThatTriggerNotices="true"
10+
displayDetailsOnTestsThatTriggerWarnings="true"
1311
>
1412
<testsuites>
1513
<testsuite name="Laravel DB Profiler Test Suite">
16-
<directory suffix="Test.php">./tests</directory>
14+
<directory>./tests</directory>
1715
</testsuite>
1816
</testsuites>
1917

2018
<source>
2119
<include>
22-
<directory suffix=".php">./src</directory>
20+
<directory>./src</directory>
2321
</include>
22+
2423
<exclude>
2524
<file>./src/DbProfilerDumper.php</file>
2625
</exclude>

tests/ConsoleProfilingTest.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Illuminated\Database\Tests;
44

5+
use PHPUnit\Framework\Attributes\Test;
6+
57
class ConsoleProfilingTest extends TestCase
68
{
79
/**
@@ -22,33 +24,33 @@ protected function withVvv(): self
2224
return $this;
2325
}
2426

25-
/** @test */
26-
public function it_is_disabled_if_environment_is_not_local()
27+
#[Test]
28+
public function it_is_disabled_if_environment_is_not_local(): void
2729
{
2830
$this->notLocal()->boot();
2931

3032
$this->assertDbProfilerNotActivated();
3133
}
3234

33-
/** @test */
34-
public function it_is_disabled_if_environment_is_local_but_there_is_no_vvv_option()
35+
#[Test]
36+
public function it_is_disabled_if_environment_is_local_but_there_is_no_vvv_option(): void
3537
{
3638
$this->local()->boot();
3739

3840
$this->assertDbProfilerNotActivated();
3941
}
4042

41-
/** @test */
42-
public function it_is_enabled_if_environment_is_local_and_there_is_vvv_option()
43+
#[Test]
44+
public function it_is_enabled_if_environment_is_local_and_there_is_vvv_option(): void
4345
{
4446
$this->local()->withVvv()->boot();
4547

4648
$this->assertDbProfilerActivated();
4749
$this->assertDbQueriesDumped();
4850
}
4951

50-
/** @test */
51-
public function it_is_enabled_if_environment_is_not_local_but_there_is_a_force_flag_in_config()
52+
#[Test]
53+
public function it_is_enabled_if_environment_is_not_local_but_there_is_a_force_flag_in_config(): void
5254
{
5355
config(['db-profiler.force' => true]);
5456

tests/HttpProfilingTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminated\Database\Tests;
44

55
use Illuminate\Support\Facades\Request;
6+
use PHPUnit\Framework\Attributes\Test;
67

78
class HttpProfilingTest extends TestCase
89
{
@@ -24,24 +25,24 @@ protected function withVvv(): self
2425
return $this;
2526
}
2627

27-
/** @test */
28-
public function it_is_disabled_if_environment_is_not_local()
28+
#[Test]
29+
public function it_is_disabled_if_environment_is_not_local(): void
2930
{
3031
$this->notLocal()->boot();
3132

3233
$this->assertDbProfilerNotActivated();
3334
}
3435

35-
/** @test */
36-
public function it_is_disabled_if_environment_is_local_but_there_is_no_vvv_request_param()
36+
#[Test]
37+
public function it_is_disabled_if_environment_is_local_but_there_is_no_vvv_request_param(): void
3738
{
3839
$this->local()->boot();
3940

4041
$this->assertDbProfilerNotActivated();
4142
}
4243

43-
/** @test */
44-
public function it_is_enabled_if_environment_is_local_and_there_is_vvv_request_param()
44+
#[Test]
45+
public function it_is_enabled_if_environment_is_local_and_there_is_vvv_request_param(): void
4546
{
4647
$this->local()->withVvv()->boot();
4748

tests/fixture/app/Post.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ class Post extends Model
88
{
99
/**
1010
* The attributes that are mass assignable.
11-
*
12-
* @var array
1311
*/
1412
protected $fillable = ['title'];
1513
}

0 commit comments

Comments
 (0)