lorenzo / audit-stash

Flexible and rock solid audit log tracking for CakePHP 3
MIT License
78 stars 37 forks source link

PHP 8.1 while maintaining PHP 7.2 & 7.3 compatibility #61

Closed swiffer closed 1 year ago

gildonei commented 2 years ago

I think that in SerializableEventTrait.php in serialize and unserialize methods you could call __serialize and __unserialize reducing duplicated code

/**
 * Returns the string representation of this object.
 *
 * @return string
 */
public function serialize()
{
    return $this->__serialize();
}

/**
 * Takes the string representation of this object so it can be reconstructed.
 *
 * @param string $data serialized string
 * @return void
 */
public function unserialize($data)
{
    $this->__unserialize($data);
}
swiffer commented 2 years ago

@gildonei done ;)

swiffer commented 2 years ago

@lorenzo - can this get merged ?

kyleweishaupt commented 1 year ago

Is there anything that can be done to get this merged? I have tons of logs with the following message using PHP 8.1:

AuditStash\Event\AuditUpdateEvent implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)

gildonei commented 1 year ago

Goodwill of Lorenzo to do the merge

lorenzo commented 1 year ago

sorry this took long

swiffer commented 1 year ago

@lorenzo thanks merging. As it was Part of master shouldn't this have been tagged as 3.1.0?🤔

kyleweishaupt commented 1 year ago

@lorenzo Thank you so much!

lorenzo commented 1 year ago

@swiffer thanks, released now

swiffer commented 1 year ago

@swiffer thanks, released now

thanks!