Skip to content

4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Jul 18:31
3e304be

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 📝

Documentation 📚,MarkDown 📝,PHP 🐘,Source 🔮,Tests 🧪