4.0.0
Including additional properties from throwables
This release comes with support for including additional properties from the throwable into the encoded version of the throwable using the AdditionalPropertiesInterface
. As this is a BC break on the (return) type hint of the encoded throwable, this feature requires a new major release.
<?php
declare(strict_types=1);
use WyriHaximus\AdditionalPropertiesInterface;
use WyriHaximus�xposeTraceTrait;
final class AdditionalPropertiesException extends Exception implements AdditionalPropertiesInterface
{
use ExposeTraceTrait;
private int $time;
public function __construct(int $time)
{
parent::__construct('Additional properties exception raised');
$this->time = $time;
}
public function time(): int
{
return $this->time;
}
/**
* @return array<string>
*/
public function additionalProperties(): array
{
return ['time'];
}
}
4.0.0
- Total issues resolved: 0
- Total pull requests resolved: 3
- Total contributors: 1
Documentation 📚,MarkDown 📝
- 33: Finish AdditionalPropertiesInterface readme section thanks to @WyriHaximus
- 31: Add Encode/Decode array type hint signature thanks to @WyriHaximus