Skip to content

Setup GitHub Actions CI with PHPStan, fix static analysis issues, rewrite README#26

Merged
voku merged 8 commits into
mainfrom
copilot/setup-github-ci-pipeline
Apr 9, 2026
Merged

Setup GitHub Actions CI with PHPStan, fix static analysis issues, rewrite README#26
voku merged 8 commits into
mainfrom
copilot/setup-github-ci-pipeline

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

  • Investigate CI logs — no PHP warnings/notices found
  • PHPStan already runs at level: max (≥ 8), passes with no errors — no code fixes needed
  • Remove Scrutinizer step from .github/workflows/ci.yml
  • Delete .scrutinizer.yml

Copilot AI and others added 3 commits April 7, 2026 22:28
Agent-Logs-Url: https://github.com/voku/diridea/sessions/5ba96c27-727f-4ed7-b058-bb0ec2b97a20

Co-authored-by: voku <264695+voku@users.noreply.github.com>
- Add phpstan/phpstan to composer.json require-dev
- Fix Diridea.php: add missing basePath property declaration, fix loggerVerbosity type (?int -> ?string), use default log level when verbosity is null
- Fix DirValueObject.php: add declare(strict_types=1), handle null timing_value in timingValueInSeconds()
- Fix all 4 process callers: handle nullable timingValueInSeconds() result
- Add declare(strict_types=1) to all 16 process files missing it
- Update phpunit.xml to new PHPUnit 9 schema format
- Update .github/workflows/ci.yml: fix deprecated set-output, update action versions (cache@v4, upload-artifact@v4, codecov@v4, setup-php@v2), run phpstan on all PHP versions, target PHP 8.1/8.2/8.3
- Rewrite README.md with comprehensive documentation, CI badge, naming convention table, usage examples, and process type reference

Agent-Logs-Url: https://github.com/voku/diridea/sessions/5ba96c27-727f-4ed7-b058-bb0ec2b97a20

Co-authored-by: voku <264695+voku@users.noreply.github.com>
- phpstan.neon: add bootstrapFiles for vendor/autoload.php so PHPStan
  resolves dependencies correctly when run as a phar
- DirValueObject: fix @var above location() → @return; fix timingOption()
  comment to use proper @return tag
- Diridea: fix @param $logVerbosity → $loggerVerbosity; add fully typed
  @param for all 7 array constructor params (null|array<int, XxxInterface>);
  remove redundant instanceof checks (always-true given typed annotations);
  remove unused DirectoryAttributes/FileAttributes imports; fix
  processContentHelper @param from array<int, StorageAttributes> to
  array<StorageAttributes>; remove stale @param from processContent
- LocationDebug/LocationDefault: add @var array<string, string> on static
  $CACHE_DIR to fix 'Cannot access offset string on mixed'

Agent-Logs-Url: https://github.com/voku/diridea/sessions/365817c7-43bf-4b54-9a0b-49a822366d7d

Co-authored-by: voku <264695+voku@users.noreply.github.com>
Copilot finished work on behalf of voku April 7, 2026 23:06
Copilot AI requested a review from voku April 7, 2026 23:06
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 7, 2026

Coverage Report for CI Build 24214396515

Coverage decreased (-3.9%) to 64.865%

Details

  • Coverage decreased (-3.9%) from the base build.
  • Patch coverage: 12 uncovered changes across 4 files (11 of 23 lines covered, 47.83%).
  • 12 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
src/voku/diridea/processes/ArchiveDefault.php 5 0 0.0%
src/voku/diridea/processes/ExpireDefault.php 5 0 0.0%
src/voku/diridea/DirValueObject.php 2 1 50.0%
src/voku/diridea/Diridea.php 1 0 0.0%

Coverage Regressions

12 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
src/voku/diridea/DirideaFactory.php 11 50.0%
src/voku/diridea/processes/LocationDefault.php 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 259
Covered Lines: 168
Line Coverage: 64.86%
Coverage Strength: 0.65 hits per line

💛 - Coveralls

Copilot finished work on behalf of voku April 9, 2026 21:33
Copilot finished work on behalf of voku April 9, 2026 21:41
@voku voku marked this pull request as ready for review April 9, 2026 21:45
@voku voku merged commit cb41788 into main Apr 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants