t808: add autoload-order regression tests for mpdf PSR HTTP message shim#818
Conversation
Adds MpdfPsrHttpMessageShim_Test covering all four shim classes (Request, Response, Stream, Uri) to prevent future regressions where the mpdf-psr-http-message-shim-php8-compat.patch is reverted or only partially applied. The tests verify via reflection that each public PSR-7 method has an explicit return type declaration, which is required for compatibility when psr/http-message v2 interfaces (bundled by plugin-check and others) are loaded before the shim classes. Addresses CodeRabbit review feedback on PR #782. Resolves #808
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 56 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Completion Summary
aidevops.sh v3.8.6 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 2m and ~8,000 tokens on this as a headless worker. |
Completion Summary
aidevops.sh v3.8.6 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 2m and ~8,000 tokens on this as a headless worker. Merged via PR #818 to main. |
|
Performance Test Results Performance test results for df145d3 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
Summary
MpdfPsrHttpMessageShim_Test(42 tests / 85 assertions) covering all four shim classes:Request,Response,Stream,Uripsr/http-messagev2 is autoloaded before the shimgetMethod()→ string,getStatusCode()→ int,getSize()→ ?int,getPort()→ ?int)Context
PR #782 added return type declarations to the mpdf shim via
patches/mpdf-psr-http-message-shim-php8-compat.patch. Without those declarations, loadingplugin-check(which bundlespsr/http-messagev2 with return types on interface methods) before the shim causes:CodeRabbit flagged the absence of a regression test in its review of PR #782 (issue #808).
What was verified
WP_TESTS_DIR=/tmp/wordpress-tests-lib vendor/bin/phpunit --filter MpdfPsrHttpMessageShim_Test --no-coverage # OK (42 tests, 85 assertions)Patch was confirmed fully applied after
composer reinstall mpdf/psr-http-message-shim(the vendor directory had stale state from the pre-#782 patch).Files
tests/WP_Ultimo/MpdfPsrHttpMessageShim_Test.php— 42 reflection + behavioural testsResolves #808
aidevops.sh v3.8.6 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 8m and 24,795 tokens on this as a headless worker.