Skip to content

Housekeeping: ignore .idea, drop the stale cache, fail on deprecations - #54

Open
loevgaard wants to merge 1 commit into
fix/30-bundle-structurefrom
fix/33-housekeeping
Open

Housekeeping: ignore .idea, drop the stale cache, fail on deprecations#54
loevgaard wants to merge 1 commit into
fix/30-bundle-structurefrom
fix/33-housekeeping

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Fixes #33

Stacked on #53.

Changes

.gitignore. /.idea/ was untracked only because nobody had added it yet. Added, along with /.vscode/. Dropped the /.phpunit.result.cache entry, since that file no longer belongs at the root.

Stale cache. phpunit.xml.dist sets cacheDirectory=".build/phpunit", but a .phpunit.result.cache from before that change was still sitting at the repository root. Deleted.

Deprecations now fail the build. The suite reported three PHP deprecations on PHP 8.4, all from setono/bot-detection-bundle (BotDetector::__construct() parameter $popular and BotDetectorInterface::isBotRequest() parameter $request are implicitly nullable). Because they came from a dependency, they could not simply be fixed here, and while they were in the output a new deprecation from this bundle's own code would have gone unnoticed.

<source ignoreIndirectDeprecations="true"> limits reporting to deprecations triggered by code under src/, which makes failOnDeprecation="true" safe to turn on, together with failOnNotice and failOnWarning. The suite now reports OK (136 tests, 316 assertions) with nothing after it.

The configuration was also migrated to the current PHPUnit schema, which the runner had been warning about.

Still worth doing upstream: giving those two BotDetectorInterface parameters an explicit ?Type, since PHP 9 turns the deprecation into an error. Once released, the constraint here can be bumped and ignoreIndirectDeprecations revisited.

Note on Codecov

The coverage job uploads to Codecov but nothing consumes the result. That is handled in the test coverage PR rather than here.

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.97%. Comparing base (064cf2d) to head (05661e3).

Additional details and impacted files
@@                    Coverage Diff                     @@
##             fix/30-bundle-structure      #54   +/-   ##
==========================================================
  Coverage                      81.97%   81.97%           
  Complexity                       171      171           
==========================================================
  Files                             35       35           
  Lines                            538      538           
==========================================================
  Hits                             441      441           
  Misses                            97       97           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Ignore the IDE directory, remove the stale .phpunit.result.cache left at
the root from before cacheDirectory was configured, and turn on
failOnDeprecation with ignoreIndirectDeprecations so this bundle's own
deprecations surface without the upstream ones from
setono/bot-detection-bundle masking them.

Fixes #33
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 6064e42 to 064cf2d Compare September 7, 2026 12:57
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.

1 participant