Skip to content

Commit 7144f4c

Browse files
committed
test on php 8.4 and laravel 12
1 parent 958d5d5 commit 7144f4c

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: tests
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- master
@@ -17,14 +18,14 @@ jobs:
1718
strategy:
1819
fail-fast: false
1920
matrix:
20-
php: [ 8.2, 8.3 ]
21-
laravel: [ 10, 11 ]
21+
php: [ 8.2, 8.3, 8.4 ]
22+
laravel: [ 11, 12 ]
2223

2324
name: PHP ${{ matrix.php }} - Laravel v${{ matrix.laravel }}
2425

2526
steps:
2627
- name: Checkout code
27-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2829

2930
- name: Setup PHP
3031
uses: shivammathur/setup-php@v2
@@ -40,4 +41,4 @@ jobs:
4041
composer update --prefer-dist --no-interaction --no-progress
4142
4243
- name: Execute tests
43-
run: composer test -- --coverage-clover=coverage.xml
44+
run: composer test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
vendor
1+
.idea/
2+
vendor/
23
composer.lock
4+
phpunit.xml
5+
coverage.xml
6+
.phpunit.cache/
37
.phpunit.result.cache

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Ilya Sakovich
3+
Copyright (c) 2025 Ilya Sakovich
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
},
2424
"require-dev": {
2525
"mockery/mockery": "^1.4.4",
26-
"orchestra/testbench": "^8.0 || ^9.0",
27-
"laminas/laminas-diactoros": "^2.8",
28-
"phpunit/phpunit": "^9.5 || ^10.0"
26+
"orchestra/testbench": "^9.0 || ^10.0",
27+
"laminas/laminas-diactoros": "^3.0",
28+
"phpunit/phpunit": "^10.0 || ^11.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

phpunit.xml.dist

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
54
bootstrap="vendor/autoload.php"
6-
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
12-
<coverage>
13-
<include>
14-
<directory suffix=".php">./src</directory>
15-
</include>
16-
</coverage>
5+
cacheDirectory=".phpunit.cache"
6+
executionOrder="depends,defects"
7+
shortenArraysForExportThreshold="10"
8+
requireCoverageMetadata="true"
9+
beStrictAboutCoverageMetadata="true"
10+
beStrictAboutOutputDuringTests="true"
11+
displayDetailsOnPhpunitDeprecations="true"
12+
failOnPhpunitDeprecation="true"
13+
failOnRisky="true"
14+
failOnWarning="true">
1715
<testsuites>
18-
<testsuite name="Test Suite">
19-
<directory suffix="Test.php">./tests</directory>
16+
<testsuite name="default">
17+
<directory>tests</directory>
2018
</testsuite>
2119
</testsuites>
20+
21+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
22+
<include>
23+
<directory>src</directory>
24+
</include>
25+
</source>
2226
</phpunit>

tests/SocialGrantTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
use Coderello\SocialGrant\Tests\Stubs\RefreshTokenEntity;
2020
use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface;
2121
use Coderello\SocialGrant\Resolvers\SocialUserResolverInterface;
22+
use PHPUnit\Framework\Attributes\CoversClass;
2223

24+
#[CoversClass(SocialUserResolverInterface::class)]
25+
#[CoversClass(RefreshTokenRepositoryInterface::class)]
2326
class SocialGrantTest extends AbstractTestCase
2427
{
2528
const DEFAULT_SCOPE = 'default_scope';

0 commit comments

Comments
 (0)