Skip to content

Commit f14af88

Browse files
committed
Initial version
1 parent fed91a5 commit f14af88

19 files changed

+3058
-0
lines changed

.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: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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.4'
66+
67+
fail-fast: false
68+
69+
runs-on: ${{ matrix.os }}
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- uses: shivammathur/setup-php@v2
75+
with:
76+
php-version: ${{ matrix.php }}
77+
coverage: none
78+
79+
- run: composer install --ansi --no-progress --prefer-dist
80+
81+
- run: composer update --ansi --no-progress --prefer-lowest
82+
if: matrix.deps == 'lowest'
83+
84+
- name: Run tests
85+
run: composer run test
86+
87+
- if: failure()
88+
uses: actions/upload-artifact@v4
89+
with:
90+
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

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2025, Vojtěch Dobeš
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

composer.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"authors": [
3+
{
4+
"name": "Vojtěch Dobeš",
5+
"homepage": "https://vojtechdobes.com"
6+
}
7+
],
8+
"autoload": {
9+
"psr-4": {
10+
"Vojtechdobes\\PHPStan\\": "src/"
11+
}
12+
},
13+
"autoload-dev": {
14+
"psr-4": {
15+
"Vojtechdobes\\Tests\\": "tests/"
16+
}
17+
},
18+
"config": {
19+
"allow-plugins": {
20+
"dealerdirect/phpcodesniffer-composer-installer": false
21+
},
22+
"sort-packages": true
23+
},
24+
"extra": {
25+
"phpstan": {
26+
"includes": [
27+
"extension.neon"
28+
]
29+
}
30+
},
31+
"keywords": [
32+
"ci",
33+
"integration",
34+
"normalization",
35+
"phpstan",
36+
"phpstan-rules",
37+
"sanitization",
38+
"static-analysis",
39+
"static-code-analysis",
40+
"validation"
41+
],
42+
"license": [
43+
"BSD-3-Clause"
44+
],
45+
"name": "vojtech-dobes/phpstan-php-conformance",
46+
"repositories": [
47+
{
48+
"type": "path",
49+
"url": "../php-conformance"
50+
}
51+
],
52+
"require": {
53+
"php": "~8.4",
54+
"vojtech-dobes/php-conformance": "dev-initial-version@dev"
55+
},
56+
"require-dev": {
57+
"php-parallel-lint/php-parallel-lint": "^1.4.0",
58+
"phpstan/phpstan": "^2.1.12",
59+
"phpstan/phpstan-strict-rules": "^2.0.4",
60+
"phpunit/phpunit": "^12.1",
61+
"spaze/phpstan-disallowed-calls": "^4.5.0",
62+
"tracy/tracy": "^2.10.9",
63+
"vojtech-dobes/php-codestyle": "~0.2.0"
64+
},
65+
"scripts": {
66+
"lint": "parallel-lint src tests",
67+
"phpstan": "phpstan analyse --memory-limit 256M",
68+
"test": "composer dump-autoload && phpunit tests"
69+
},
70+
"type": "phpstan-extension"
71+
}

0 commit comments

Comments
 (0)