Skip to content

Commit 0b10890

Browse files
lukinovecstancl
andauthored
Add L10 support, remove L6 and L8 support (#11)
* Add L10 support * Update PHP version in ci.yml * Update ci.yml * Revert ci.yml changes * Migrate PHPUnit XML config using "--migrate-configuration" * Update phpunit.xml (delete cacheDirectory, use backupStaticAttributes instead of backupStaticProperties) * Delete backupStaticAttributes * Add PHP version matrix * Use ci.yml from #12 * Correct Laravel matrix versions * Revert ci.yml changes * Use multiple PHP versions * Update ci.yml * Don't use PHP 8 with Laravel 10 in CI * Update ci.yml * Remove L6 and L8 support * Use single PHP version in CI * Update ci.yml * Change matrix in ci.yml * swap laravel 9 & 10 * Update README.md --------- Co-authored-by: Samuel Štancl <[email protected]>
1 parent 46c590e commit 0b10890

File tree

4 files changed

+38
-43
lines changed

4 files changed

+38
-43
lines changed

.github/workflows/ci.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ name: run-tests
33
on: [push, pull_request]
44

55
jobs:
6-
test:
6+
tests:
77
runs-on: ubuntu-latest
88
strategy:
99
fail-fast: true
1010
matrix:
11-
laravel: [6, 8, 9]
12-
11+
include:
12+
- laravel: 9
13+
php: 8.0
14+
- laravel: 10
15+
php: 8.1
1316

1417
name: Tests (PHPUnit) - L${{ matrix.laravel }}
1518

@@ -20,7 +23,7 @@ jobs:
2023
- name: Setup PHP
2124
uses: shivammathur/setup-php@v2
2225
with:
23-
php-version: '8.0'
26+
php-version: ${{matrix.php}}
2427

2528
- name: Install dependencies
2629
run: composer require "laravel/framework:^${{matrix.laravel}}.0"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Installation
44

5-
Supports Laravel 6, 7, 8, and 9.
5+
Supports Laravel 9 and 10.
66

77
```
88
composer require stancl/virtualcolumn
@@ -20,7 +20,7 @@ class MyModel extends Model
2020
use VirtualColumn;
2121

2222
public $guarded = [];
23-
23+
2424
public static function getCustomColumns(): array
2525
{
2626
return [

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
}
2020
},
2121
"require": {
22-
"illuminate/support": "^6.0|^8.0|^9.0",
23-
"illuminate/database": "^6.0|^8.0|^9.0"
22+
"illuminate/support": "^9.0|^10.0",
23+
"illuminate/database": "^9.0|^10.0"
2424
},
2525
"require-dev": {
26-
"orchestra/testbench": "^4.0|^6.0|^7.0"
26+
"orchestra/testbench": "^7.0|^8.0"
2727
},
2828
"minimum-stability": "dev",
2929
"prefer-stable": true

phpunit.xml

+26-34
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
11-
<testsuites>
12-
<testsuite name="Unit">
13-
<directory suffix="Test.php">./tests</directory>
14-
</testsuite>
15-
</testsuites>
16-
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">./src</directory>
19-
<exclude>
20-
<file>./src/routes.php</file>
21-
</exclude>
22-
</whitelist>
23-
</filter>
24-
<php>
25-
<env name="APP_ENV" value="testing"/>
26-
<env name="BCRYPT_ROUNDS" value="4"/>
27-
<env name="CACHE_DRIVER" value="redis"/>
28-
<env name="MAIL_DRIVER" value="array"/>
29-
<env name="QUEUE_CONNECTION" value="sync"/>
30-
<env name="SESSION_DRIVER" value="array"/>
31-
<env name="DB_CONNECTION" value="sqlite"/>
32-
<env name="DB_DATABASE" value=":memory:"/>
33-
<env name="AWS_DEFAULT_REGION" value="us-west-2"/>
34-
</php>
35-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">./src</directory>
6+
</include>
7+
<exclude>
8+
<file>./src/routes.php</file>
9+
</exclude>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="Unit">
13+
<directory suffix="Test.php">./tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<php>
17+
<env name="APP_ENV" value="testing"/>
18+
<env name="BCRYPT_ROUNDS" value="4"/>
19+
<env name="CACHE_DRIVER" value="redis"/>
20+
<env name="MAIL_DRIVER" value="array"/>
21+
<env name="QUEUE_CONNECTION" value="sync"/>
22+
<env name="SESSION_DRIVER" value="array"/>
23+
<env name="DB_CONNECTION" value="sqlite"/>
24+
<env name="DB_DATABASE" value=":memory:"/>
25+
<env name="AWS_DEFAULT_REGION" value="us-west-2"/>
26+
</php>
27+
</phpunit>

0 commit comments

Comments
 (0)