Skip to content

Commit cb2e3a7

Browse files
authored
Add support for Lumberjack 8 (#5)
2 parents 59ebf66 + fdf6f28 commit cb2e3a7

3 files changed

Lines changed: 70 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php_version: [8.1, 8.2, 8.3, 8.4]
11+
composer_flags: ['', '--prefer-lowest']
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php_version }}
20+
extensions: xdebug
21+
22+
- name: Install dependencies
23+
uses: php-actions/composer@v5
24+
with:
25+
php_version: ${{ matrix.php_version }}
26+
args: ${{ matrix.composer_flags }}
27+
command: update
28+
29+
- name: Run tests
30+
run: ./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml
31+
env:
32+
XDEBUG_MODE: coverage
33+
34+
- name: Run Codesniffer
35+
run: vendor/bin/phpcs --standard=PSR2 ./src
36+
37+
# - name: Submit coverage to Coveralls
38+
# # We use php-coveralls library for this, as the official Coveralls GitHub Action lacks support for clover reports:
39+
# # https://github.com/coverallsapp/github-action/issues/15
40+
# env:
41+
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
# COVERALLS_PARALLEL: true
43+
# COVERALLS_FLAG_NAME: ${{ github.job }}-PHP-${{ matrix.php_version }} ${{ matrix.composer_flags }}
44+
# run: |
45+
# composer global require php-coveralls/php-coveralls
46+
# ~/.composer/vendor/bin/php-coveralls -v

composer.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
"name": "rareloop/lumberjack-validation",
33
"require": {
44
"rakit/validation": "^0.13.1",
5-
"rareloop/lumberjack-core": "^5.0.0||^6.0.0||^7.0.0"
5+
"rareloop/lumberjack-core": "^6.0.0||^7.0.0||^8.0.0"
66
},
77
"require-dev": {
8-
"phpunit/phpunit": "^6.0",
9-
"satooshi/php-coveralls": "^1.0",
10-
"mockery/mockery": "^1.0.0",
11-
"brain/monkey": "^2.0.2",
12-
"satooshi/php-coveralls": "^1.0",
13-
"squizlabs/php_codesniffer": "^3.2",
14-
"codedungeon/phpunit-result-printer": "^0.4.4"
8+
"phpunit/phpunit": "^9.6.29",
9+
"php-coveralls/php-coveralls": "^2.8",
10+
"mockery/mockery": "^1.6.12",
11+
"brain/monkey": "^2.6.2",
12+
"antecedent/patchwork": "^2.2.3",
13+
"squizlabs/php_codesniffer": "^3.13.4"
1514
},
1615
"autoload": {
1716
"psr-4": {
@@ -22,5 +21,10 @@
2221
"psr-4": {
2322
"Rareloop\\Lumberjack\\Validation\\Test\\": "tests"
2423
}
24+
},
25+
"config": {
26+
"allow-plugins": {
27+
"composer/installers": true
28+
}
2529
}
26-
}
30+
}

phpunit.xml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
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"
12-
printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer">
13-
<testsuites>
14-
<testsuite name="Rareloop Lumberjack Validation">
15-
<directory>tests</directory>
16-
</testsuite>
17-
</testsuites>
18-
<filter>
19-
<whitelist>
20-
<directory suffix=".php">src/</directory>
21-
</whitelist>
22-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Rareloop Lumberjack Validation">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
2313
</phpunit>

0 commit comments

Comments
 (0)