Closed iget-master closed 1 year ago
Voting this up
Any plans to fix these?
Tons of annoying lines each request and each time I use the API:
[2023-01-09 09:45:05] production.WARNING: Return type of Pipedrive\Utils\JsonSerializer::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Utils/JsonSerializer.php on line 19
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\GetAddedDeal::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/GetAddedDeal.php on line 64
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\Data1::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/Data1.php on line 544
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\CreatorUserId::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/CreatorUserId.php on line 89
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\UserId::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/UserId.php on line 89
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\PersonId::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/PersonId.php on line 71
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\Email::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/Email.php on line 54
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\Phone::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/Phone.php on line 54
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\OrgId::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/OrgId.php on line 90
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\RelatedObjects::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/RelatedObjects.php on line 54
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\DealUserData::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/DealUserData.php on line 81
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\DealOrganizationData::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/DealOrganizationData.php on line 82
[2023-01-09 09:45:08] production.WARNING: Return type of Pipedrive\Models\DealPersonData::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vendor/pipedrive/pipedrive/src/Models/DealPersonData.php on line 63
PLEASE!
In PHP 8.1, most of the PHP internal classes are updated with tentative return types. A tentative return types means that the return types are added merely to inform the classes that extend them, and they will be enforced since PHP 9.0.
Solution 1
Add this line just before the "public function jsonSerialize()" of all these files:
#[\ReturnTypeWillChange]
Solution 2 (I hate this one)
Disabled E_DEPRECATED in your php.ini (or htaccess or wherever)
$ cat /etc/php/8.1/cli/php.ini | grep 'error_reporting =' error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Solution 3 (the desirable)
To wait for somebody in PipeDrive team to understand that we (the developers) are the ones promoting their tools and SaaS using their API's (and therefore, making more money for THEM)... That's why I prefer to use Hubspot for integrations, they act quicker.
up
up!!! we must fork to fix, cannot wait years
up
Hi! I tried here with the latest version (6) and I can't see these warnings anymore, so I would recommend to switch to it.
Using this package with PHP8.1 thows a lot of deprecation notices: