Skip to content

Commit 7635f1e

Browse files
committed
Initial version
1 parent 960a12d commit 7635f1e

79 files changed

Lines changed: 7758 additions & 0 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = tab
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{md,neon,yml}]
10+
indent_size = 2
11+
indent_style = space
12+
13+
[phpstan-baseline.neon]
14+
indent_style = tab

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
.gitignore export-ignore
4+
.github export-ignore
5+
phpstan-baseline.neon export-ignore
6+
phpstan.neon export-ignore
7+
tests/ export-ignore
8+
9+
*.php* diff=php linguist-language=PHP

.github/workflows/checks.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: checks
2+
3+
on:
4+
- push
5+
6+
env:
7+
COMPOSER_NO_INTERACTION: "1"
8+
9+
jobs:
10+
format:
11+
name: Code style
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.4'
21+
coverage: none
22+
23+
- run: composer install --ansi --no-progress --prefer-dist
24+
25+
- name: Run PHP_Codesniffer
26+
run: vendor/bin/phpcs
27+
28+
static_analysis:
29+
name: Static analysis
30+
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: '8.4'
39+
coverage: none
40+
41+
- run: composer install --ansi --no-progress --prefer-dist
42+
43+
- name: Run parallel-lint
44+
run: composer run lint
45+
46+
- name: Run PHPStan
47+
run: composer run phpstan
48+
49+
tests:
50+
name: PHP ${{ matrix.php }} tests on ${{ matrix.os }} with ${{ matrix.deps }} deps
51+
52+
needs:
53+
- static_analysis
54+
55+
strategy:
56+
matrix:
57+
deps:
58+
- stable
59+
- lowest
60+
os:
61+
- macos-latest
62+
- ubuntu-latest
63+
- windows-latest
64+
php:
65+
- '8.1'
66+
- '8.2'
67+
- '8.3'
68+
- '8.4'
69+
70+
exclude:
71+
- deps: lowest
72+
os: macos-latest
73+
74+
- deps: lowest
75+
os: windows-latest
76+
77+
fail-fast: false
78+
79+
runs-on: ${{ matrix.os }}
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- uses: shivammathur/setup-php@v2
85+
with:
86+
php-version: ${{ matrix.php }}
87+
coverage: none
88+
extensions: pdo, pdo_mysql, pdo_sqlite
89+
90+
- run: composer install --ansi --no-progress --prefer-dist
91+
92+
- run: composer update --ansi --no-progress --prefer-lowest
93+
if: matrix.deps == 'lowest'
94+
95+
- name: Run tests
96+
run: composer run test
97+
98+
- if: failure()
99+
uses: actions/upload-artifact@v4
100+
with:
101+
path: tests/output

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
.phpunit.cache
3+
.phpunit.result.cache
4+
tests-temp
5+
vendor

composer.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"authors": [
3+
{
4+
"name": "Vojtěch Dobeš",
5+
"homepage": "https://vojtechdobes.com"
6+
}
7+
],
8+
"autoload": {
9+
"psr-4": {
10+
"Vojtechdobes\\PHPStan\\Dibi\\": "src/"
11+
}
12+
},
13+
"autoload-dev": {
14+
"classmap": [
15+
"tests/objects"
16+
],
17+
"psr-4": {
18+
"Vojtechdobes\\Tests\\": "tests/"
19+
}
20+
},
21+
"config": {
22+
"allow-plugins": {
23+
"dealerdirect/phpcodesniffer-composer-installer": false
24+
},
25+
"sort-packages": true
26+
},
27+
"keywords": [
28+
"ci",
29+
"dibi",
30+
"phpstan",
31+
"phpstan-rules",
32+
"sql",
33+
"static-analysis",
34+
"static-code-analysis"
35+
],
36+
"license": [
37+
"BSD-3-Clause"
38+
],
39+
"name": "vojtech-dobes/phpstan-dibi-steroids",
40+
"require": {
41+
"php": "~8.1",
42+
"greenlion/php-sql-parser": "^4.7"
43+
},
44+
"require-dev": {
45+
"dibi/dibi": "^5.0",
46+
"nette/di": "^3.2",
47+
"php-parallel-lint/php-parallel-lint": "^1.4.0",
48+
"phpstan/phpstan": "^2.1.12",
49+
"phpstan/phpstan-strict-rules": "^2.0.4",
50+
"phpunit/phpunit": "^10.5",
51+
"spaze/phpstan-disallowed-calls": "^4.5.0",
52+
"tracy/tracy": "^2.10.9",
53+
"vojtech-dobes/php-codestyle": "~0.2.0"
54+
},
55+
"scripts": {
56+
"lint": "parallel-lint src tests",
57+
"phpstan": "phpstan analyse --memory-limit 512M",
58+
"test": "composer dump-autoload && phpunit tests"
59+
}
60+
}

0 commit comments

Comments
 (0)