Skip to content

fix: remove dead Suhosin warning from HomeController#20167

Open
somethingwithproof wants to merge 1 commit intophpmyadmin:masterfrom
somethingwithproof:fix/remove-suhosin-warning-v4
Open

fix: remove dead Suhosin warning from HomeController#20167
somethingwithproof wants to merge 1 commit intophpmyadmin:masterfrom
somethingwithproof:fix/remove-suhosin-warning-v4

Conversation

@somethingwithproof
Copy link
Copy Markdown
Contributor

@somethingwithproof somethingwithproof commented Feb 23, 2026

Summary

  • Remove the Suhosin extension check from HomeController (dead code on PHP 8+)
  • Remove SuhosinDisableWarning from user-facing settings form and descriptions
  • Add deprecated:: 6.0.0 directive to docs/config.rst, keeping original description text
  • Withdraw FAQ 1.38 in docs/faq.rst
  • Remove 2 stale PHPStan baseline entries for removed HomeController code
  • Keep SuhosinDisableWarning property in Settings.php as deprecated no-op to avoid a 540-entry Psalm baseline cascade from the type shape change

Replaces #20123 which had a corrupted branch push.

Test plan

  • phpunit tests/unit/Controllers/HomeControllerTest.php passes
  • phpstan analyse -- no errors
  • psalm --no-diff -- no errors

@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 19f1fa4 to 62f9f9d Compare February 24, 2026 09:19
@somethingwithproof
Copy link
Copy Markdown
Contributor Author

Addressed all three review comments:

  1. Removed SuhosinDisableWarning setting entirely — property, setter, asArray() entry, psalm type annotation, form registration, descriptions, and all tests deleted.
  2. Withdrew FAQ 1.38 — replaced the Suhosin configuration advice with a brief withdrawal notice.
  3. Fixed versionremoveddeprecated:: 6.0.0 — matches the pattern used by ServerLibraryDifference_DisableWarning and OBGzip.

Also updated phpstan-baseline.neon to remove SuhosinDisableWarning: bool from the Settings type strings (9 occurrences).

@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 62f9f9d to 3224cde Compare February 25, 2026 20:57
@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 3224cde to 3766910 Compare February 25, 2026 23:37
@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch 3 times, most recently from c9b66cb to 7b8d4d3 Compare March 1, 2026 04:58
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.95%. Comparing base (690be10) to head (7b8d4d3).
⚠️ Report is 48 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20167      +/-   ##
============================================
- Coverage     63.44%   62.95%   -0.50%     
+ Complexity    16090    16081       -9     
============================================
  Files           668      675       +7     
  Lines         60072    60062      -10     
============================================
- Hits          38114    37811     -303     
- Misses        21958    22251     +293     
Flag Coverage Δ
dbase-extension ?
unit-8.3-ubuntu-latest 62.94% <ø> (?)
unit-8.4-ubuntu-latest 62.95% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 9b88d8f to 2da36ec Compare March 3, 2026 04:00
somethingwithproof added a commit to somethingwithproof/phpmyadmin that referenced this pull request Mar 9, 2026
Remove the SuhosinDisableWarning configuration property, which warned about
Suhosin PHP extension conflicts. Suhosin is unmaintained and no longer relevant
to modern PHP environments.

- Remove SuhosinDisableWarning from Settings.php (type shape, property,
  constructor assignment, toArray, setSuhosinDisableWarning method)
- Remove from Descriptions.php, FeaturesForm.php, HomeController.php
- Remove testSuhosinDisableWarning() and related test assertions
- Update phpstan-baseline.neon and psalm-baseline.xml
- Remove FAQ 2.8 Suhosin bullet; add note that Suhosin is no longer relevant
- Add config.rst note that this option was removed

Closes phpmyadmin#20167

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 2da36ec to 0d9039e Compare March 9, 2026 02:15
Copy link
Copy Markdown
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now, thank you

Remove the SuhosinDisableWarning configuration property, which warned about
Suhosin PHP extension conflicts. Suhosin is unmaintained and no longer relevant
to modern PHP environments.

- Remove SuhosinDisableWarning from Settings.php (type shape, property,
  constructor assignment, toArray, setSuhosinDisableWarning method)
- Remove from Descriptions.php, FeaturesForm.php, HomeController.php
- Remove testSuhosinDisableWarning() and related test assertions
- Update phpstan-baseline.neon and psalm-baseline.xml
- Remove FAQ 2.8 Suhosin bullet; add note that Suhosin is no longer relevant
- Add config.rst note that this option was removed

Closes phpmyadmin#20167

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the fix/remove-suhosin-warning-v4 branch from 0d9039e to c27c373 Compare March 26, 2026 07:30
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.

[Feat]: Remove Suhosin support and warnings

3 participants