Skip to content

Fix unit test error on latest php 8.4 and php 8.5 build - #1298

Merged
roxblnfk merged 2 commits into
spiral:masterfrom
samsonasik:fix-php-test
Aug 5, 2026
Merged

Fix unit test error on latest php 8.4 and php 8.5 build#1298
roxblnfk merged 2 commits into
spiral:masterfrom
samsonasik:fix-php-test

Conversation

@samsonasik

Copy link
Copy Markdown
Contributor

What was changed

Related by latest build error

https://github.com/spiral/framework/actions/runs/30915207986/job/92011479490?pr=1297#step:11:84

Why?

To fix latest build that seems due to latest php release.

Checklist

  • Tested
    • Tested manually

Documentation

@samsonasik

Copy link
Copy Markdown
Contributor Author

@roxblnfk ready to merge 👍. Rector notice is handled on PR:

@roxblnfk

roxblnfk commented Aug 5, 2026

Copy link
Copy Markdown
Member

Thanks! I think it's better to fix the tests rather than the renderer itself: both string representations are valid PHP expressions that evaluate to the same value, so the generated proxy code was never broken — only the literal assertion in the test. I've pushed an update that makes the test accept both variants via assertContains, without maintaining a hand-rolled string-literal normalizer in the production code.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (fa3f57b) to head (b1b2319).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1298   +/-   ##
=========================================
  Coverage     90.65%   90.65%           
  Complexity     6703     6703           
=========================================
  Files           876      876           
  Lines         18978    18978           
=========================================
  Hits          17204    17204           
  Misses         1774     1774           

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

@samsonasik

Copy link
Copy Markdown
Contributor Author

@roxblnfk yes 👍

@roxblnfk
roxblnfk merged commit 28e5aac into spiral:master Aug 5, 2026
15 checks passed
@samsonasik
samsonasik deleted the fix-php-test branch August 5, 2026 12:24
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.

2 participants