Copilot commented on code in PR #3795:
URL: https://github.com/apache/thrift/pull/3795#discussion_r3944226213
##########
lib/php/test/Integration/Lib/Serializer/BinarySerializerTest.php:
##########
@@ -39,8 +39,24 @@ class BinarySerializerTest extends TestCase
public function testBinarySerializer()
{
$struct = new \Basic\ThriftTest\Xtruct(['string_thing' => 'abc']);
- $serialized = TBinarySerializer::serialize($struct,
'\\Basic\\ThriftTest\\Xtruct');
+ $serialized = TBinarySerializer::serialize($struct);
$deserialized = TBinarySerializer::deserialize($serialized,
'\\Basic\\ThriftTest\\Xtruct');
$this->assertEquals($struct, $deserialized);
Review Comment:
Use the ::class constant instead of a manually escaped class-name string
when calling deserialize(); it’s less error-prone and consistent with the PHP
unit tests (e.g., TBinarySerializerTest) that pass Foo::class.
This issue also appears on line 57 of the same file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]