Skip to content

Commit ab56ecd

Browse files
authored
Updated tests to run in php 8.2, 8.3, 8.4 (#7)
* Updated tests to run in php 8.2, 8.3, 8.4 * Updated deps * Fixing matrix * Fixing sqlite error with foriegn key
1 parent c78ce14 commit ab56ecd

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: tests
33
on:
44
push:
55
pull_request:
6+
pull_request_target:
7+
branches:
8+
- main
9+
- master
10+
- '7.x'
11+
- '6.x'
612
schedule:
713
- cron: '0 0 * * *'
814

@@ -24,8 +30,8 @@ jobs:
2430
strategy:
2531
fail-fast: true
2632
matrix:
27-
php: [7.3, 7.4, 8.0, 8.1]
28-
stability:
33+
php: [8.2, 8.3, 8.4]
34+
stability:
2935
- prefer-stable
3036

3137
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"homepage": "https://github.com/always-open/laravel-process-stamps",
1111
"license": "MIT",
1212
"require": {
13-
"php": "^7.3|^8.0",
14-
"laravel/framework": "^8.0|^9.0|^10.0"
13+
"php": ">=8.2",
14+
"laravel/framework": "^10.0|^11.0"
1515
},
1616
"require-dev": {
17-
"doctrine/dbal": "^2.9|^3.0",
18-
"orchestra/testbench": "^6.0",
19-
"phpunit/phpunit": "^9.0"
17+
"doctrine/dbal": "^4.2",
18+
"orchestra/testbench": "^9.10",
19+
"phpunit/phpunit": "^11.0"
2020
},
2121
"autoload": {
2222
"psr-4": {

migrations/2018_09_04_161009_add_parent_id_to_table.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public function up()
3434
*/
3535
public function down()
3636
{
37+
Schema::table(config('process-stamps.table'), function (Blueprint $table) {
38+
$table->dropForeign(['parent_id']);
39+
$table->dropIndex(['parent_id']);
40+
});
41+
3742
Schema::table(config('process-stamps.table'), function (Blueprint $table) {
3843
$table->dropColumn('parent_id');
3944
});

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
</testsuites>
1717
<filter>
1818
<whitelist>
19-
<directory suffix=".php">src/</directory>
19+
<directory suffix="Test.php">src/</directory>
2020
</whitelist>
2121
</filter>
2222
<php>
2323
<env name="APP_NAME" value="testsite" />
2424
<env name="DB_CONNECTION" value="sqlite" />
2525
<env name="DB_DATABASE" value=":memory:" />
2626
<env name="DB_FOREIGN_KEYS" value="true" />
27+
<env name="foreign_key_constraints" value="true" />
2728
</php>
2829
</phpunit>

0 commit comments

Comments
 (0)