Skip to content

Commit cc88a5a

Browse files
myraoliveros-cpMyra Oliveros
andauthored
Add Laravel 12 support (#9)
* Add support for Laravel 12 * Update workflow test * Fix syntax error in migration stub --------- Co-authored-by: Myra Oliveros <[email protected]>
1 parent 9601dec commit cc88a5a

File tree

5 files changed

+29
-36
lines changed

5 files changed

+29
-36
lines changed

.github/workflows/run-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: [7.4]
13-
laravel: [6.*]
12+
php: [8.2, 8.3, 8.4]
13+
laravel: [12.*]
1414
dependency-version: [prefer-lowest, prefer-stable]
1515
include:
16-
- laravel: 6.*
17-
testbench: 4.*
16+
- laravel: 12.*
17+
testbench: 10.*
1818

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

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v1
23+
uses: actions/checkout@v4
2424

2525
- name: Cache dependencies
26-
uses: actions/cache@v1
26+
uses: actions/cache@v4
2727
with:
2828
path: ~/.composer/cache/files
2929
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
3030

3131
- name: Setup PHP
32-
uses: shivammathur/setup-php@v1
32+
uses: shivammathur/setup-php@v2
3333
with:
3434
php-version: ${{ matrix.php }}
3535
extension-csv: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.3 || ^8.0"
19+
"php": "^8.2",
20+
"illuminate/support": "^12.0",
21+
"illuminate/database": "^12.0",
22+
"illuminate/contracts": "^12.0",
23+
"nesbot/carbon": "^3.0"
2024
},
2125
"require-dev": {
22-
"symfony/var-dumper": "^4.3 || ^5.1 || ^6.0",
23-
"phpunit/phpunit": "^8.2 || ^9.3"
26+
"orchestra/testbench": "^10.0",
27+
"phpunit/phpunit": "^11.0",
28+
"symfony/var-dumper": "^7.0"
2429
},
2530
"autoload": {
2631
"psr-4": {

database/migrations/create_wallet_plus_tables.php.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
class CreateWalletPlusTables extends Migration
7+
return new class extends Migration
88
{
99
/**
1010
* Run the migrations.
@@ -53,4 +53,4 @@ class CreateWalletPlusTables extends Migration
5353
Schema::dropIfExists('wallets');
5454
Schema::dropIfExists('wallet_ledgers');
5555
}
56-
}
56+
};

phpunit.xml.dist

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
>
127
<testsuites>
13-
<testsuite name="CoreProc Test Suite">
8+
<testsuite name="Package Test Suite">
149
<directory>tests</directory>
1510
</testsuite>
1611
</testsuites>
17-
<filter>
18-
<whitelist>
12+
<source>
13+
<include>
1914
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage"/>
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
28-
</logging>
15+
</include>
16+
</source>
2917
</phpunit>

src/WalletPlusServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class WalletPlusServiceProvider extends ServiceProvider
1111
/**
1212
* Bootstrap the application services.
1313
*/
14-
public function boot(Filesystem $filesystem)
14+
public function boot(Filesystem $filesystem): void
1515
{
1616
$this->publishes([
1717
__DIR__ . '/../database/migrations/create_wallet_plus_tables.php.stub' =>
@@ -22,7 +22,7 @@ public function boot(Filesystem $filesystem)
2222
/**
2323
* Register the application services.
2424
*/
25-
public function register()
25+
public function register(): void
2626
{
2727
// $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'wallet-plus');
2828
}

0 commit comments

Comments
 (0)