Skip to content

Releases: WyriHaximus/php-json-throwable

4.2.0

09 May 13:14
91c3538
Compare
Choose a tag to compare

Final minor release supporting PHP 8.1 and lower, includes widening of several support packages to new major versions.

4.2.0

  • Total issues resolved: 0
  • Total pull requests resolved: 43
  • Total contributors: 3

Bug 🐞

Dependencies 📦

Dependencies 📦,Enhancement ✨

Enhancement ✨

4.1.0

25 Nov 13:17
d01d59a
Compare
Choose a tag to compare

4.0.0

18 Jul 18:31
3e304be
Compare
Choose a tag to compare

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 🧪

3.0.0

18 Jul 12:08
f65c9c2
Compare
Choose a tag to compare

Trace access

This package now includes a trait for easy access to the trace from the original throwable, note that arguments of each item in the trace have been dropped to be able to serialize it. You can use the trait the following way, and access the original trace through getOriginalTrace():

<?php

declare(strict_types=1);

use WyriHaximus�xposeTraceTrait;

final class ExposeTraceException extends Exception
{
    use ExposeTraceTrait;
}

3.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 21
  • Total contributors: 3

CI 🚧,Configuration ⚙,YAML 🍄

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

Documentation 📚,MarkDown 📝

Configuration ⚙,YAML 🍄

CI 🚧,Configuration ⚙,Dependencies 📦,JSON 👨‍💼,NEON 🦹‍♂️,PHP 🐘,Source 🔮,Tests 🧪,YAML 🍄

PHP 🐘,Source 🔮

Dependencies 📦,PHP 🐘

PHP 🐘,Tests 🧪

2.0.0

17 Jul 16:24
2.0.0
8b11703
Compare
Choose a tag to compare

1.1.1

12 Mar 21:46
1.1.1
Compare
Choose a tag to compare
  • Added missing previous property

1.1.0

11 Mar 16:25
1.1.0
014a5ff
Compare
Choose a tag to compare
  • Use doctrine/instantiator to create throwables without calling the constructor

1.0.3

26 Feb 21:59
1.0.3
Compare
Choose a tag to compare
  • Use reflection to create exception on PHP 7 and use a fallback for PHP 5

1.0.2

25 Feb 22:03
1.0.2
Compare
Choose a tag to compare
  • Minor performance improvement

1.0.1

25 Feb 15:47
Compare
Choose a tag to compare
  • Bug fix: Only assign values properties to properties when they exist