Skip to content

Commit 9200ecf

Browse files
committed
feat: bootstrap pdf signature validator package
Add complete package structure with parser/model APIs, quality gates, CI workflows, and focused tests.\n\nResolve static-analysis blockers (phpmd/psalm), keep all core checks green, and improve mutation-testing quality coverage with additional real-fixture and crypto tests. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
0 parents  commit 9200ecf

72 files changed

Lines changed: 16468 additions & 0 deletions

Some content is hidden

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

.github/dependabot.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "composer"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
open-pull-requests-limit: 10
11+
12+
- package-ecosystem: "composer"
13+
directory: "/vendor-bin/phpunit"
14+
schedule:
15+
interval: "weekly"
16+
17+
- package-ecosystem: "composer"
18+
directory: "/vendor-bin/psalm"
19+
schedule:
20+
interval: "weekly"
21+
22+
- package-ecosystem: "composer"
23+
directory: "/vendor-bin/phpstan"
24+
schedule:
25+
interval: "weekly"
26+
27+
- package-ecosystem: "composer"
28+
directory: "/vendor-bin/php-cs-fixer"
29+
schedule:
30+
interval: "weekly"
31+
32+
- package-ecosystem: "composer"
33+
directory: "/vendor-bin/phpmd"
34+
schedule:
35+
interval: "weekly"
36+
37+
- package-ecosystem: "composer"
38+
directory: "/vendor-bin/rector"
39+
schedule:
40+
interval: "weekly"
41+
42+
- package-ecosystem: "composer"
43+
directory: "/vendor-bin/infection"
44+
schedule:
45+
interval: "weekly"
46+
47+
- package-ecosystem: "composer"
48+
directory: "/vendor-bin/deptrac"
49+
schedule:
50+
interval: "weekly"
51+
52+
- package-ecosystem: "github-actions"
53+
directory: "/"
54+
schedule:
55+
interval: "weekly"

.github/workflows/deptrac.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: Deptrac
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: deptrac-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
php-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
min: ${{ steps.php.outputs.min }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: Read PHP min version from composer.json
28+
id: php
29+
run: |
30+
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
31+
echo "min=$min" >> $GITHUB_OUTPUT
32+
33+
deptrac:
34+
runs-on: ubuntu-latest
35+
needs: php-version
36+
name: deptrac
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
persist-credentials: false
41+
42+
- name: Set up PHP ${{ needs.php-version.outputs.min }}
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: ${{ needs.php-version.outputs.min }}
46+
tools: composer:v2
47+
coverage: none
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Install dependencies
52+
run: composer install --no-interaction --prefer-dist
53+
54+
- name: Run Deptrac
55+
run: composer run deptrac
56+
57+
summary:
58+
runs-on: ubuntu-latest
59+
needs: deptrac
60+
if: always()
61+
name: deptrac-summary
62+
steps:
63+
- name: Summary status
64+
run: if ${{ needs.deptrac.result != 'success' && needs.deptrac.result != 'skipped' }}; then exit 1; fi

.github/workflows/lint-php-cs.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: Lint PHP CS
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: lint-php-cs-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
php-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
min: ${{ steps.php.outputs.min }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: Read PHP min version from composer.json
28+
id: php
29+
run: |
30+
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
31+
echo "min=$min" >> $GITHUB_OUTPUT
32+
33+
cs-check:
34+
runs-on: ubuntu-latest
35+
needs: php-version
36+
37+
name: php-cs
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
43+
44+
- name: Set up PHP ${{ needs.php-version.outputs.min }}
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ needs.php-version.outputs.min }}
48+
tools: composer:v2
49+
coverage: none
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Install dependencies
54+
run: composer install --no-interaction --prefer-dist
55+
56+
- name: Check coding standard
57+
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
58+
59+
summary:
60+
runs-on: ubuntu-latest
61+
needs: cs-check
62+
if: always()
63+
name: lint-php-cs-summary
64+
steps:
65+
- name: Summary status
66+
run: if ${{ needs.cs-check.result != 'success' && needs.cs-check.result != 'skipped' }}; then exit 1; fi

.github/workflows/lint-php.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: Lint PHP
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: lint-php-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
php-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
min: ${{ steps.php.outputs.min }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: Read PHP min version from composer.json
28+
id: php
29+
run: |
30+
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
31+
echo "min=$min" >> $GITHUB_OUTPUT
32+
33+
lint:
34+
runs-on: ubuntu-latest
35+
needs: php-version
36+
37+
name: php-lint
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
43+
44+
- name: Set up PHP ${{ needs.php-version.outputs.min }}
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ needs.php-version.outputs.min }}
48+
coverage: none
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Lint
53+
run: composer run lint
54+
55+
summary:
56+
runs-on: ubuntu-latest
57+
needs: lint
58+
if: always()
59+
name: lint-php-summary
60+
steps:
61+
- name: Summary status
62+
run: if ${{ needs.lint.result != 'success' && needs.lint.result != 'skipped' }}; then exit 1; fi
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: Mutation tests
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: mutation-${{ github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
php-version:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
min: ${{ steps.php.outputs.min }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
27+
submodules: recursive
28+
29+
- name: Read PHP min version from composer.json
30+
id: php
31+
run: |
32+
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
33+
echo "min=$min" >> $GITHUB_OUTPUT
34+
35+
infection:
36+
runs-on: ubuntu-latest
37+
needs: php-version
38+
39+
name: infection PHP ${{ needs.php-version.outputs.min }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
persist-credentials: false
45+
submodules: recursive
46+
47+
- name: Set up PHP ${{ needs.php-version.outputs.min }}
48+
uses: shivammathur/setup-php@v2
49+
with:
50+
php-version: ${{ needs.php-version.outputs.min }}
51+
tools: composer:v2
52+
coverage: xdebug
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Install dependencies
57+
run: composer install --no-interaction --prefer-dist
58+
59+
- name: Run mutation tests
60+
env:
61+
XDEBUG_MODE: coverage
62+
run: composer run test:mutation

.github/workflows/phpmd.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: PHPMD
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: phpmd-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
php-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
min: ${{ steps.php.outputs.min }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: Read PHP min version from composer.json
28+
id: php
29+
run: |
30+
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
31+
echo "min=$min" >> $GITHUB_OUTPUT
32+
33+
phpmd:
34+
runs-on: ubuntu-latest
35+
needs: php-version
36+
37+
name: phpmd
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
43+
44+
- name: Set up PHP ${{ needs.php-version.outputs.min }}
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ needs.php-version.outputs.min }}
48+
tools: composer:v2
49+
coverage: none
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Install dependencies
54+
run: composer install --no-interaction --prefer-dist
55+
56+
- name: Run PHPMD
57+
run: composer run phpmd
58+
59+
summary:
60+
runs-on: ubuntu-latest
61+
needs: phpmd
62+
if: always()
63+
name: phpmd-summary
64+
steps:
65+
- name: Summary status
66+
run: if ${{ needs.phpmd.result != 'success' && needs.phpmd.result != 'skipped' }}; then exit 1; fi

0 commit comments

Comments
 (0)