Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2b2e80c
feat: implement protocol v1 client
vitormattos Sep 8, 2026
dbe401a
test: cover protocol client behavior
vitormattos Sep 8, 2026
2b51c90
docs: document client integration and isolation
vitormattos Sep 8, 2026
78f1170
chore: add REUSE license text
vitormattos Sep 8, 2026
5909aca
fix: resolve initial CI failures
vitormattos Sep 8, 2026
ef472a7
test: enforce coverage and response handling
vitormattos Sep 8, 2026
be38d22
fix: prepare strict static analysis
vitormattos Sep 8, 2026
1de86d4
test: lock installation id derivation vector
vitormattos Sep 8, 2026
a0ef1e2
fix: harden coverage and period helpers
vitormattos Sep 8, 2026
1348616
chore: align project tooling with LibreSign
vitormattos Sep 8, 2026
9caae43
test: strengthen protocol business rules
vitormattos Sep 8, 2026
7529dca
test: align unit test namespaces
vitormattos Sep 8, 2026
f47ae54
fix: synchronize composer lock
vitormattos Sep 8, 2026
863195d
chore: add workflow license texts
vitormattos Sep 8, 2026
555ab3c
chore: add workflow license texts
vitormattos Sep 8, 2026
e2e3dab
fix: isolate infection on php 8.3
vitormattos Sep 8, 2026
87e1305
fix: use vendor bin tool links
vitormattos Sep 8, 2026
40e70f9
test: expect transport timeout error
vitormattos Sep 8, 2026
18040e0
fix: resolve quality tool findings
vitormattos Sep 8, 2026
129af30
style: apply Nextcloud coding standard
vitormattos Sep 8, 2026
ea241d1
chore: remove temporary formatting workflow
vitormattos Sep 8, 2026
c6555d9
fix: tighten server error typing
vitormattos Sep 8, 2026
3340e8f
fix: keep psalm compatible with php 8.2
vitormattos Sep 8, 2026
af57531
test: cover protocol boundary behavior
vitormattos Sep 8, 2026
6032aa7
fix: preserve stream transport contract
vitormattos Sep 8, 2026
c3f86dc
fix: align stream headers with php semantics
vitormattos Sep 8, 2026
811790d
fix: narrow decoded server errors
vitormattos Sep 8, 2026
32664bb
fix: assert php response header type
vitormattos Sep 8, 2026
0980cc0
chore: add LibreSign funding
vitormattos Sep 9, 2026
02b9456
test: strengthen metric business rules
vitormattos Sep 9, 2026
f889f47
test: cover report identifier boundaries
vitormattos Sep 9, 2026
58d3388
test: use data providers for period validation
vitormattos Sep 9, 2026
aa4c469
test: cover client response classes with data providers
vitormattos Sep 9, 2026
29d9bed
test: validate LibreSign namespace scoping
vitormattos Sep 9, 2026
c7c35a9
test: exercise scoped client API
vitormattos Sep 9, 2026
544b743
refactor: make period validation errors explicit
vitormattos Sep 9, 2026
c6891c5
style: wrap report test signatures
vitormattos Sep 9, 2026
c1dcedc
style: wrap reporting period data provider test
vitormattos Sep 9, 2026
a49f9f5
test: raise mutation testing gate
vitormattos Sep 9, 2026
110cba2
chore: strengthen complementary phpcs gate
vitormattos Sep 9, 2026
0ac6fd7
test: enforce 95 percent mutation score
vitormattos Sep 9, 2026
98e3fed
test: cover hostless https endpoints
vitormattos Sep 9, 2026
75bcbb0
docs: document LibreSign integration path
vitormattos Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

github: libresign
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

version: 2
updates:
- package-ecosystem: composer
directory: /
schedule:
interval: weekly
groups:
development-tooling:
dependency-type: development

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
24 changes: 24 additions & 0 deletions .github/workflows/composer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Composer

on: pull_request

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.2'
coverage: none
- run: composer validate --strict
- run: composer install --no-interaction --prefer-dist
- run: composer audit --no-interaction
23 changes: 23 additions & 0 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Infection

on: pull_request

permissions:
contents: read

jobs:
mutation-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
coverage: xdebug
- run: composer install --no-interaction --prefer-dist
- run: composer mutation:test
30 changes: 30 additions & 0 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow follows the Nextcloud organization template style.
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Lint PHP coding style

on: pull_request

permissions:
contents: read

jobs:
coding-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.2'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Nextcloud coding standard
run: composer cs:check
- name: PHPCS
run: composer phpcs
28 changes: 28 additions & 0 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow follows the Nextcloud organization template style.
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Lint PHP

on: pull_request

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.2'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Lint
run: composer lint
23 changes: 23 additions & 0 deletions .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: PHPMD

on: pull_request

permissions:
contents: read

jobs:
phpmd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer phpmd
23 changes: 23 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: PHPStan

on: pull_request

permissions:
contents: read

jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer phpstan
31 changes: 31 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: PHPUnit

on: pull_request

permissions:
contents: read

jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4', '8.5']
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run unit tests
run: composer test:unit
23 changes: 23 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Psalm

on: pull_request

permissions:
contents: read

jobs:
psalm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer psalm
21 changes: 21 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This workflow follows the Nextcloud organization template style.
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
# SPDX-License-Identifier: CC0-1.0

name: REUSE Compliance Check

on: pull_request

permissions:
contents: read

jobs:
reuse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: REUSE compliance
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0
25 changes: 25 additions & 0 deletions .github/workflows/scoping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Namespace scoping

on: pull_request

permissions:
contents: read

jobs:
scoping:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer global require --no-interaction humbug/php-scoper:^0.18.17
- run: '"$(composer global config bin-dir --absolute)/php-scoper" add-prefix --prefix=OCA\\Libresign\\Vendor --output-dir=build/scoped --force src'
- run: php tests/scoping-smoke.php
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

/vendor/
/vendor-bin/*/vendor/
/build/
/.phpunit.cache/
/.phpunit.result.cache
/.phpstan-cache/
/coverage.xml
25 changes: 25 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

declare(strict_types=1);

require_once __DIR__ . '/vendor-bin/coding-standard/vendor/autoload.php';

use Nextcloud\CodingStandard\Config;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$config = new Config();
$config
->setParallelConfig(ParallelConfigFactory::detect())
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('vendor')
->notPath('vendor-bin')
->in(__DIR__);

return $config;
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Contributor notes

This is a small framework-agnostic Protocol v1 client. Keep runtime dependencies and the public API minimal.

- Source: `src/`
- Tests: `tests/`
- Design and integration notes: `docs/`
- Protocol source of truth: `LibreCodeCoop/usage_statistics_server/docs/protocol-v1.md`

Run `composer qa` and `composer audit` before committing. Validate scoping as described in `docs/development.md` when changing namespaces or public contracts.

Use Conventional Commits and `git commit -s`. Do not add application-specific LibreSign/Nextcloud code to the package core.
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Contributing

Contributions are welcome through GitHub pull requests.

## Development setup

```bash
composer install
```

The root Composer project installs isolated development tools from `vendor-bin/` through `bamarni/composer-bin-plugin`.

Before submitting changes, run:

```bash
composer qa
composer mutation:test
composer audit
```

Tests belong in `tests/Unit/` and should mirror the production path under `src/`. Prefer tests for protocol invariants and externally observable behavior over tests written only to increase coverage.

Use Conventional Commits and sign commits with `git commit -s`.
Loading