Skip to content

Commit f27a8f2

Browse files
authored
Merge branch 'master' into git-history
2 parents 9f77fc6 + 6a05784 commit f27a8f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1372
-760
lines changed

.github/workflows/php-psr.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PSR12 (PHP codesniffer)
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
name: deafult with ${{ matrix.php }}
8+
runs-on: ubuntu-24.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: [ '8.3' ]
13+
steps:
14+
- uses: actions/checkout@v2
15+
name: Checkout
16+
with:
17+
submodules: recursive
18+
- uses: shivammathur/setup-php@v2
19+
name: Setup PHP
20+
with:
21+
php-version: ${{ matrix.php }}
22+
extensions: curl, mbstring, mysql, soap, xml
23+
tools: composer
24+
ini-values: session.gc_probability=0, date.timezone="Europe/Prague", display_startup_errors = Off
25+
- name: Composer install
26+
run: composer install --no-progress --prefer-dist
27+
- run: composer run-script testPSR
28+
name: Test
29+
- if: failure()
30+
name: Failure output
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: output ${{ matrix.php }} with ${{ matrix.database }}
34+
path: tests/**/*.actual

.github/workflows/php-stan.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHPStan
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: PHP ${{ matrix.php }} with ${{ matrix.database }}
8+
runs-on: ubuntu-24.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: [ '8.3' ]
13+
steps:
14+
- uses: actions/checkout@v2
15+
name: Checkout
16+
with:
17+
submodules: recursive
18+
- uses: shivammathur/setup-php@v2
19+
name: Setup PHP
20+
with:
21+
php-version: ${{ matrix.php }}
22+
extensions: curl, mbstring, mysql, soap, xml
23+
tools: composer
24+
ini-values: session.gc_probability=0, date.timezone="Europe/Prague", display_startup_errors = Off
25+
- name: Composer install
26+
run: composer install --no-progress --prefer-dist
27+
- uses: php-actions/phpstan@v3
28+
with:
29+
level: 6
30+
path: src/ tests/

.github/workflows/php.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on: [push, pull_request]
55
jobs:
66
test:
77
name: PHP ${{ matrix.php }} with ${{ matrix.database }}
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-24.04
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
php: [ '7.4', '8.0']
12+
php: [ '8.3' ]
1313
database: [ 'mysql' ]
1414
steps:
1515
# MariaDB container has to be started in advance to initialize itself before using it.
@@ -35,15 +35,15 @@ jobs:
3535
- run: composer run-script initTestDatabase
3636
name: Init test database
3737
- run: composer run-script testCoverage
38-
name: Test
38+
name: Test
3939
- name: Archive code coverage results
40-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v4
4141
with:
42-
name: code-coverage-report
42+
name: code-coverage-report ${{ matrix.php }} with ${{ matrix.database }}
4343
path: coverage.html
4444
- if: failure()
4545
name: Failure output
46-
uses: actions/upload-artifact@v2
46+
uses: actions/upload-artifact@v4
4747
with:
48-
name: output
48+
name: output ${{ matrix.php }} with ${{ matrix.database }}
4949
path: tests/**/*.actual

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/tests/config.local.neon
33
/tests/temp/*
44
!/tests/temp/.gitignore
5+
tests/**/*.actual
6+
tests/**/*.expected
57
coverage.html

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Nette ORM
22

33
![GitHub branch checks state](https://img.shields.io/github/checks-status/fykosak/nette-orm/master)
4-
<img src="https://img.shields.io/badge/coverage-99%25-green" />
4+
<img src="https://img.shields.io/badge/coverage-83%25-green" />
55

66
## install
77

composer.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
"type": "library",
55
"license": "GPL-3.0-or-later",
66
"require": {
7-
"php": ">=7.4 <8.1",
8-
"nette/di": "^3.0",
9-
"nette/database": "^3.1",
7+
"php": ">=8.3",
8+
"nette/di": "v3.*",
9+
"nette/database": "v3.*",
1010
"ext-pdo": "*",
1111
"ext-gettext": "*"
1212
},
1313
"require-dev": {
14-
"nette/tester": "^2.4.0"
14+
"nette/tester": "^2.4.0",
15+
"squizlabs/php_codesniffer": "3.6.0",
16+
"phpstan/phpstan": "2.1.21"
1517
},
1618
"authors": [
1719
{
@@ -34,6 +36,7 @@
3436
}
3537
},
3638
"scripts": {
39+
"testPSR": "php -e vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PSR12 src/",
3740
"initTestDatabase": [
3841
"mysql < tests/resource/schema.sql "
3942
],
@@ -45,6 +48,9 @@
4548
],
4649
"testCoverage": [
4750
"vendor/bin/tester tests -p php --coverage coverage.html --coverage-src src/ -s -c tests/php.ini -j 1"
51+
],
52+
"testPHPStan": [
53+
"vendor/bin/phpstan analyse --level 6 src/ tests/"
4854
]
4955
}
5056
}

0 commit comments

Comments
 (0)