Skip to content

Commit

Permalink
Merge branch 'release/v0.15.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
betterthanclay committed May 7, 2024
2 parents 202b3da + adbbdb6 commit f27aaec
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.15.0 (2024-05-07)
* Added JsonSerializable to Markup interface

## v0.14.14 (2024-04-29)
* Fixed Veneer stubs in gitattributes

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"decodelabs/coercion": "^0.2",
"decodelabs/collections": "^0.8",
"decodelabs/cosmos": "^0.1.2",
"decodelabs/elementary": "^0.2",
"decodelabs/elementary": "^0.3",
"decodelabs/exceptional": "^0.4",
"decodelabs/glitch-support": "^0.4",
"decodelabs/veneer": "^0.10.10"
Expand All @@ -37,7 +37,7 @@
},
"extra": {
"branch-alias": {
"dev-develop": "0.14.x-dev"
"dev-develop": "0.15.x-dev"
}
},
"repositories": {
Expand Down
8 changes: 8 additions & 0 deletions src/Embed/MediaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,4 +530,12 @@ public function __toString(): string
{
return (string)$this->render();
}

/**
* Serialize to json
*/
public function jsonSerialize(): mixed
{
return (string)$this;
}
}
8 changes: 8 additions & 0 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ public function esc(
return Coercion::forceString($value);
}
}

/**
* Serialize to json
*/
public function jsonSerialize(): mixed
{
return (string)$this;
}
}


Expand Down
3 changes: 3 additions & 0 deletions stubs/DecodeLabs/Tagged.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ public static function image(Ref4|string|null $url, ?string $alt = NULL, string|
public static function esc(mixed $value): ?string {
return static::$instance->esc(...func_get_args());
}
public static function jsonSerialize(): mixed {
return static::$instance->jsonSerialize();
}
};

0 comments on commit f27aaec

Please sign in to comment.