Skip to content

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

Merged
loevgaard merged 1 commit into
masterfrom
fix/33-housekeeping
Sep 14, 2026
Merged

loevgaard merged 1 commit into
masterfrom
fix/33-housekeeping

Conversation

@loevgaard

@loevgaard loevgaard commented Sep 7, 2026

Copy link
Copy Markdown
Member

Fixes #33

Stacked on #55.

Changes

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, along with the now-pointless .gitignore entry for it. Both removed.

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 be fixed here, and while they were in the output a new deprecation from this bundle's own code would have gone unnoticed.

<source restrictDeprecations="true"> limits reporting to deprecations triggered by code under src/, which makes failOnDeprecation="true" safe to turn on, together with failOnNotice and failOnWarning.

Note the attribute name: PHPUnit 11 renames it to ignoreIndirectDeprecations, which PHPUnit 10.5 rejects. The bundle supports PHP 8.1, PHPUnit 11 requires PHP 8.2, so 10.5 has to keep working and restrictDeprecations is the spelling that validates under both. There is a comment in the file warning against running the configuration migration, which would silently rename it.

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 this restriction revisited.

Not included

IDE ignores (.idea/, .vscode/) were in an earlier revision and have been dropped: they belong in a developer's global gitignore rather than in the project.

Note on Codecov

The coverage job uploads to Codecov but nothing consumes the result. That is handled in #56 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.93%. Comparing base (df977e6) to head (40d816a).

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #54   +/-   ##
=========================================
  Coverage     81.93%   81.93%           
  Complexity      148      148           
=========================================
  Files            31       31           
  Lines           487      487           
=========================================
  Hits            399      399           
  Misses           88       88           

☔ 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.

@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from c17b1a2 to df6dd77 Compare September 7, 2026 12:03
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from df6dd77 to 00aed2f Compare September 7, 2026 12:18
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 00aed2f to 964b4b5 Compare September 7, 2026 12:47
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 964b4b5 to 6064e42 Compare September 7, 2026 12:51
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 6064e42 to 064cf2d Compare September 7, 2026 12:57
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 064cf2d to 14071bb Compare September 14, 2026 07:29
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 14071bb to caf2c06 Compare September 14, 2026 07:39
Comment thread .gitignore Outdated
@loevgaard loevgaard changed the title Housekeeping: ignore .idea, drop the stale cache, fail on deprecations Housekeeping: drop the stale cache, fail on deprecations Sep 14, 2026
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from caf2c06 to 3ab6fc1 Compare September 14, 2026 07:52
@loevgaard
loevgaard force-pushed the fix/30-bundle-structure branch from 3ab6fc1 to 7b3e810 Compare September 14, 2026 08:00
@loevgaard
loevgaard changed the base branch from fix/30-bundle-structure to fix/29-cookie-domain September 14, 2026 08:01
@loevgaard
loevgaard force-pushed the fix/33-housekeeping branch 2 times, most recently from 18e58ef to e0b0e4d Compare September 14, 2026 08:13
@loevgaard
loevgaard changed the base branch from fix/29-cookie-domain to master September 14, 2026 08:13
Remove the .phpunit.result.cache entry and the file it referred to, left
at the root from before cacheDirectory was configured, and turn on
failOnDeprecation with restrictDeprecations so this bundle's own
deprecations surface without the upstream ones from
setono/bot-detection-bundle masking them.

Fixes #33
@loevgaard
loevgaard merged commit 2b99b02 into master Sep 14, 2026
47 checks passed
@loevgaard
loevgaard deleted the fix/33-housekeeping branch September 14, 2026 08:22
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.

Housekeeping: ignore .idea, stale phpunit cache, upstream PHP 8.4 deprecations

1 participant