docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
196 stars 123 forks source link

PHP 8+ Error, missing #[\ReturnTypeWillChange] on EnvelopeTemplateDefinition #214

Closed Caster000 closed 6 months ago

Caster000 commented 7 months ago

Hello,

Using the latest version of the SDK, 6.18, there is an error on prod environment.

PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of DocuSign\eSign\Model\EnvelopeTemplateDefinition::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/docusign/esign-client/src/Model/EnvelopeTemplateDefinition.php:564

It seems like this issue already happened and was fixed in 6.7.1: #165

But I think that the Model EnvelopeTemplateDefinition was forgotten in the PR because adding the attribute #[\ReturnTypeWillChange] to the methods solve the issue:

smd9788 commented 7 months ago

@Caster000 - How is this error being triggered for you? Does it occur when a certain method is invoked or during the build?

Caster000 commented 7 months ago

It is triggered during the build on prod environment.

smd9788 commented 6 months ago

@Caster000 - I've tried various tests in a NA3 production account using SDK version 6.18.0 and have not been able to reproduce this error. Can you provide the steps you are taking to reproduce the error?