audit-stash icon indicating copy to clipboard operation
audit-stash copied to clipboard

PHP 8.1 while maintaining PHP 7.2 & 7.3 compatibility

Open swiffer opened this issue 3 years ago • 3 comments

swiffer avatar Nov 06 '21 15:11 swiffer

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);
}

gildonei avatar Aug 24 '22 13:08 gildonei

@gildonei done ;)

swiffer avatar Aug 27 '22 10:08 swiffer

@lorenzo - can this get merged ?

swiffer avatar Sep 04 '22 18:09 swiffer

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)

kyleweishaupt avatar Dec 15 '22 18:12 kyleweishaupt

Goodwill of Lorenzo to do the merge

gildonei avatar Dec 15 '22 18:12 gildonei

sorry this took long

lorenzo avatar Dec 15 '22 22:12 lorenzo

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

swiffer avatar Dec 16 '22 06:12 swiffer

@lorenzo Thank you so much!

kyleweishaupt avatar Dec 16 '22 15:12 kyleweishaupt

@swiffer thanks, released now

lorenzo avatar Dec 16 '22 20:12 lorenzo

@swiffer thanks, released now

thanks!

swiffer avatar Dec 16 '22 21:12 swiffer