Deprecated: Return type of Ramsey\Uuid\Uuid::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize():
Deprecated: Return type of Ramsey\Uuid\Uuid::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /sugar/vendor/ramsey/uuid/src/Uuid.php on line 216
PHP Version - 8.1.13 Sugar - 12.3.0 OS - Mac
What version of ramsey/uuid do you have installed? Run composer info ramsey/uuid to find out which version is installed in your project.
I'm not familiar with "Sugar." What is that?
Hi,
Ramsey/uuid version is 3.9 and Sugar is nothing but CRM(SugarCRM).
Regards, Pankaj
On Tue 7 Mar 2023 at 04:07, Ben Ramsey @.***> wrote:
What version of ramsey/uuid do you have installed? Run composer info ramsey/uuid to find out which version is installed in your project.
I'm not familiar with "Sugar." What is that?
— Reply to this email directly, view it on GitHub https://github.com/ramsey/uuid/issues/498#issuecomment-1457493070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNH2TQVR4EN2EZL6PZ3E63W22YA3ANCNFSM6AAAAAAVRR6P64 . You are receiving this because you authored the thread.Message ID: @.***>
--
ThanksPankaj Sapkal
Thanks. It looks like SugarCRM is using an old version of ramsey/uuid. Do you know where I can find their "community" edition so I can see if it's feasible to submit a pull request to them to update the library?
I have the same issue with v4.7.4 using php version 8.2.6
I looked at the old issue https://github.com/ramsey/uuid/issues/439 which mentioned this being fixed in v3.9.7 - which it was, however I'd rather use the newest version.
3.9.7 Uuid::jsonSerialize function
/**
* Converts this UUID object to a string when the object is serialized
* with `json_encode()`
*
* @return string
* @link http://php.net/manual/en/class.jsonserializable.php
*/
#[ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toString();
}
v4.7.4 Uuid::jsonSerialize function, which has been that way since 4.0.0
/**
* Converts the UUID to a string for JSON serialization
*/
public function jsonSerialize(): string
{
return $this->toString();
}
I have the same issue with v4.7.4 using php version 8.2.6
Are you saying that you're seeing the deprecation message when using ramsey/uuid v4.74 on PHP 8.2.6?