Skip to content

[3.x] Support pages with more output file extensions (Fix conflicting states)#2541

Merged
emmadesilva merged 7 commits into
v3/non-html-pagesfrom
v3/non-html-pages-code-refactors
Jul 14, 2026
Merged

[3.x] Support pages with more output file extensions (Fix conflicting states)#2541
emmadesilva merged 7 commits into
v3/non-html-pagesfrom
v3/non-html-pages-code-refactors

Conversation

@emmadesilva

Copy link
Copy Markdown
Member

Fix Broken Static/Instance Symmetry in InMemoryPage

We introduced $exactOutputPath as an instance-level boolean flag on InMemoryPage, but HydePage path resolution relies heavily on static methods.

Because exactOutputPath is stateful, InMemoryPage now has a dangerous inconsistency: instance methods return the exact output path, while static methods still assume HTML output.

$page = InMemoryPage::file('robots.txt', ...);

// The instance method works correctly:
$page->getOutputPath(); // "robots.txt"

// The static method incorrectly applies the HTML fallback:
InMemoryPage::outputPath('robots.txt'); // "robots.txt.html"

Fixes an unreleased issue introduced in #2524

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0e7f2b2) to head (d9b070e).
⚠️ Report is 8 commits behind head on v3/non-html-pages.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             v3/non-html-pages     #2541   +/-   ##
=====================================================
  Coverage               100.00%   100.00%           
+ Complexity                1793      1782   -11     
=====================================================
  Files                      179       179           
  Lines                     4472      4453   -19     
=====================================================
- Hits                      4472      4453   -19     

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

@emmadesilva emmadesilva force-pushed the v3/non-html-pages-code-refactors branch from 50987fb to d9b070e Compare July 14, 2026 21:20
@emmadesilva emmadesilva merged commit b406e43 into v3/non-html-pages Jul 14, 2026
6 checks passed
@emmadesilva emmadesilva deleted the v3/non-html-pages-code-refactors branch July 14, 2026 21: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.

1 participant