Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dynamic property deprecation notice in testsuite on php 8.3 #103

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

lubiana
Copy link

@lubiana lubiana commented Aug 27, 2024

ApplicationTest::test_array_action() uses the dynamic property $actionCalled, which is not registered in the testclass. on 8.3 this throws a depecration notice, this small pr fixes that.

adhocore
adhocore previously approved these changes Aug 29, 2024
@lubiana
Copy link
Author

lubiana commented Sep 4, 2024

So I tried to figure out, why the pipeline fails, althoug the tests run locally without problem. It seems that the Terminal::width() method returns 0 in the github action runner, which causes the justify method to not return any dashes and therefore the tests fail.

I was able to make that testcase work again: c90400b but i am not sure if that is the correct direction as i had to use reflection, to change ther Writers terminal property into a mocked terminal. I think the better solution would be to make the terminal property injectable via constructor, so we can provide a mocked instance in the test. On the other hand the failing test should not be concerned about the terminal class working properly so my solution for the test might be ok, and the other issues could be dealt with in the future.

fix WriterTest::test_justify with reflection
Copy link
Owner

@adhocore adhocore left a comment

Choose a reason for hiding this comment

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

thank you 👍

adhocore
adhocore approved these changes Sep 5, 2024
@adhocore adhocore merged commit 8d776d0 into adhocore:main Sep 5, 2024
5 of 6 checks passed
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