diff --git a/CHANGELOG.md b/CHANGELOG.md index ed7fe33..166c8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0] 2023-11-15 + +### Changed + +- All implementations of Data are now `readonly` + ## [1.2.0] 2023-11-11 ### Added diff --git a/src/DataProxy.php b/src/DataProxy.php index dbe3c2e..dbc70a0 100644 --- a/src/DataProxy.php +++ b/src/DataProxy.php @@ -4,7 +4,7 @@ namespace Focus\Data; -abstract class DataProxy implements Data +abstract readonly class DataProxy implements Data { abstract protected function source(): Data; diff --git a/src/JsonData.php b/src/JsonData.php index 48a897d..d7542a2 100644 --- a/src/JsonData.php +++ b/src/JsonData.php @@ -13,7 +13,7 @@ use const JSON_THROW_ON_ERROR; -final class JsonData extends DataProxy +final readonly class JsonData extends DataProxy { use DataProxyBehavior; diff --git a/tests/ProxiesData.php b/tests/ProxiesData.php index 026d586..5c32d26 100644 --- a/tests/ProxiesData.php +++ b/tests/ProxiesData.php @@ -7,7 +7,7 @@ use Focus\Data\Behavior\DataProxyBehavior; use Focus\Data\DataProxy; -final class ProxiesData extends DataProxy +final readonly class ProxiesData extends DataProxy { use DataProxyBehavior; }