Repository navigation
Update tests and add PHP 8.3 to the CI matrix - #3299
Merged
Merged
Conversation
From PHP 8.3, calling ReflectionProperty::setValue() with a single value is deprecated, so we use ReflectionClass::setStaticPropertyValue() instead.
It's not used and causes a warning.
Dynamically adding a property to a class is deprecated and so rather than adding the request to the response from the handler, we now add it to the handler itself and test it there.
Also use 8.2 for the CS and static analysis tests.
akrabat
force-pushed
the
update-for-php83
branch
from
November 23, 2023 12:52
c5df4e7 to
85a19ec
Compare
Member
|
@akrabat it appears installing the dependencies fails on PHP 8.3 |
Member
Author
Yes. See "note" in PR description :) |
Member
|
@akrabat my apologies 😅 I guess we'll just have to be patient! |
|
Seems that phpspec/prophecy now supports PHP 8.3 (commit 3 days ago): |
Member
Author
|
Thanks @stemd. I have re-run the PHP 8.3 CI test and it passed. Over to @l0gicgate for review. |
l0gicgate
requested changes
Dec 12, 2023
Member
Author
Done. |
l0gicgate
approved these changes
Dec 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A few things that we were doing in the tests are deprecated and so have been updated to be correct.
setStaticPropertyValue()to set static properties on a reflected class rather thansetValue()on a reflected property.requestproperty to the response class inBodyParsingMiddlewareTest, instead we add it to our handler class.ErrorHandlerTest.I have also added PHP 8.3 to the CI matrix and moved our static analysis tests to PHP 8.2.
Note that we'll need to wait for
phpspec/prophecyto support PHP 8.3 before we can merge.