php-json-throwable

JSON encode and decode throwables and exceptions

MIT License

Downloads
231.1K
Stars
11
Committers
3

Bot releases are visible (Hide)

php-json-throwable - 4.2.0 Latest Release

Published by github-actions[bot] 6 months ago

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 โœจ

php-json-throwable - 4.1.0

Published by github-actions[bot] almost 4 years ago

The release adds PHP 8 support!

PHP 8 Logo

4.1.0

  • Total issues resolved: 0
  • Total pull requests resolved: 13
  • Total contributors: 2

CI ๐Ÿšง,Configuration โš™,Dependencies ๐Ÿ“ฆ,JSON ๐Ÿ‘จโ€๐Ÿ’ผ,PHP ๐Ÿ˜,YAML ๐Ÿ„

Dependencies ๐Ÿ“ฆ,JSON ๐Ÿ‘จโ€๐Ÿ’ผ,PHP ๐Ÿ˜

Dependencies ๐Ÿ“ฆ,PHP ๐Ÿ˜

php-json-throwable - 4.0.0

Published by github-actions[bot] over 4 years ago

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 WyriHaximusxposeTraceTrait;

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 ๐Ÿงช

php-json-throwable - 3.0.0

Published by github-actions[bot] over 4 years ago

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 WyriHaximusxposeTraceTrait;

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 ๐Ÿงช

php-json-throwable - 2.0.0

Published by WyriHaximus over 4 years ago

php-json-throwable - 1.1.1

Published by WyriHaximus over 6 years ago

  • Added missing previous property
php-json-throwable - 1.1.0

Published by WyriHaximus over 6 years ago

  • Use doctrine/instantiator to create throwables without calling the constructor
php-json-throwable - 1.0.3

Published by WyriHaximus over 6 years ago

  • Use reflection to create exception on PHP 7 and use a fallback for PHP 5
php-json-throwable - 1.0.2

Published by WyriHaximus over 6 years ago

  • Minor performance improvement
php-json-throwable - 1.0.1

Published by WyriHaximus over 6 years ago

  • Bug fix: Only assign values properties to properties when they exist
php-json-throwable - 1.0.0

Published by WyriHaximus over 6 years ago

  • Initial release