Skip to content

Commit bdac666

Browse files
committed
Support Laravel 11, require PHP 8.2
1 parent 5243568 commit bdac666

File tree

6 files changed

+33
-19
lines changed

6 files changed

+33
-19
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ ubuntu-latest ]
12-
php: [ 8.1, 8.2 ]
12+
php: [ 8.2, 8.3 ]
1313
dependency-version: [ prefer-lowest, prefer-stable ]
1414

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ composer.lock
88
# PHPUnit
99
phpunit.xml
1010
.phpunit.result.cache
11+
.phpunit.cache

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
| Laravel Version | Package Tag | Supported |
44
|-----------------|-------------|-----------|
5+
| 11.x.x | 4.0.x | yes |
56
| 10.x.x | 4.0.x | yes |
6-
| 9.x.x | 4.0.x | yes |
7+
| 9.x.x | 4.0.x | no |
78
| 8.x.x | 4.0.x | no |
89
| 7.x.x | 3.0.x | no |
910
| 5.x.x | 2.2.x | no |

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
],
1717
"homepage": "https://github.com/In-Touch/laravel-newrelic",
1818
"require": {
19-
"php": ">=7.4",
20-
"illuminate/contracts": "^9.0 || ^10.0",
19+
"php": "^8.2",
20+
"illuminate/contracts": "^10.0 || ^11.0",
2121
"intouch/newrelic": "^2.0"
2222
},
2323
"require-dev": {
24-
"orchestra/testbench": "^7.0 || ^8.0",
25-
"phpunit/phpunit": "^9.5 || ^10.0"
24+
"orchestra/testbench": "^8.0 || ^9.0",
25+
"phpunit/phpunit": "^10.5 || ^11.0"
2626
},
2727
"minimum-stability": "dev",
2828
"autoload": {

phpunit.xml.dist

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
</coverage>
8-
<testsuites>
9-
<testsuite name="Main Test Suite">
10-
<directory>tests</directory>
11-
</testsuite>
12-
</testsuites>
13-
<php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false"
6+
cacheDirectory=".phpunit.cache"
7+
backupStaticProperties="false">
8+
<testsuites>
9+
<testsuite name="Main Test Suite">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
<php>
1414
</php>
15+
<source>
16+
<include>
17+
<directory suffix=".php">src/</directory>
18+
</include>
19+
</source>
1520
</phpunit>

tests/Facades/NewrelicTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@
55
use Illuminate\Support\Facades\Facade;
66
use Intouch\LaravelNewrelic\Facades\Newrelic;
77
use Intouch\LaravelNewrelic\Tests\TestCase;
8+
use PHPUnit\Framework\Attributes\Test;
89

910
final class NewrelicTest extends TestCase
1011
{
11-
/** @test */
12+
#[Test]
1213
public function it_creates_facade_instance(): void
1314
{
1415
$this->assertInstanceOf(Facade::class, new Newrelic());
1516
}
17+
18+
#[Test]
19+
public function it_creates_newrelic_instance_when_use_facade(): void
20+
{
21+
$this->assertInstanceOf(\Intouch\Newrelic\Newrelic::class, Newrelic::getFacadeRoot());
22+
}
1623
}

0 commit comments

Comments
 (0)