feat: implement usage statistics protocol client - #3
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
|
CI status note The first Actions run (on #1) exercised the same implementation chain and exposed three real issues: PHP 8.1 dependency resolution was blocked by PHP-Scoper requiring PHP 8.2, PHPCS found style/file-layout violations, and REUSE found missing metadata for After those fixes, connector-authored branch updates and newly opened replacement PRs did not emit any new GitHub Actions workflow run. I tried branch ref updates, Contents API updates, closing/reopening, and new PR heads; GitHub still reports no run for the current PR head. This is therefore an execution/trigger limitation of the authenticated integration, not a green CI claim. The current head additionally adds a real 75% coverage gate, separates PHP-Scoper from the PHP 8.1 dependency matrix, normalizes response headers, locks the installation-ID derivation with a golden vector, removes an ambiguous package-version User-Agent, and hardens period/coverage helpers for strict static analysis. A normal user-authored push or rerun-capable workflow trigger should execute the configured matrix before merge. |
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Summary
Implements the first reusable PHP client for Usage Statistics Protocol v1 and aligns the repository structure/tooling with LibreSign and
usage_statistics_serverconventions.Protocol
unknown,enabled,disabled)Composer and package structure
librecodecoop/usage-statistics-client^8.2composer.lockcommitted for reproducible project development/CIbamarni/composer-bin-pluginat the rootvendor-bin/lint,cs:check,cs:fix,test:unit,test:coverage,phpstan,psalm,phpmd,mutation:test)The root lock file is versioned.
vendor-bin/*keeps only itscomposer.json, matching the current server pattern.Quality and tests
tests/Unit/, mirroringsrc/paths such asTransport/andException/nextcloud/coding-standardCurrent Infection result: 100% mutation code coverage and 95% covered-code MSI. Both
minMsiandminCoveredMsiare enforced at 95%.PHPCPD was not added because it is obsolete/unmaintained; PHPMD is used for maintainability/complexity checks and Infection measures test effectiveness.
LibreSign readiness
The client was revalidated against the current
LibreSign/3rdpartydependency model.OCA\\Libresign\\Vendorprefix used by LibreSignOCA\\Libresign\\Vendor\\LibreCode\\UsageStatistics^8.2is compatible with LibreSign's current PHP 8.3 platformdocs/integration.mddocuments the LibreSign/Nextcloud adapter and ownership boundariesThe remaining LibreSign work is intentionally application-specific: consent persistence, metric/schema definition, endpoint configuration, background scheduling, a Nextcloud HTTP-client adapter, and adding the released package to
LibreSign/3rdparty. The receiving server must also have the corresponding LibreSign schema registered.A stable Composer tag should be published before production integration. Until then, only a temporary VCS/dev dependency can consume this branch.
CI
Replaces the monolithic
ci.ymlwith separate workflow files following the Nextcloud/LibreSign workflow-template style:All workflows are green on the current head.
Documentation, licensing and funding
COPYING.gitignorecarries SPDX headers directly instead of being listed inREUSE.tomlCONTRIBUTING.mddocs/.github/FUNDING.ymlmatches LibreSign and points GitHub Sponsors tolibresignPackage vendor
The repository is expected to move to the
LibreCodeCooporganization. Existing LibreCodeCoop packages and installation documentation use thelibrecodecoop/*Composer vendor convention, so this PR useslibrecodecoop/usage-statistics-clientrather than the personalvitormattos/*vendor.