From 2b32f99b35c4285d180710d430729a1523cd1f81 Mon Sep 17 00:00:00 2001 From: Teppo Koivula Date: Thu, 30 May 2024 21:23:14 +0300 Subject: [PATCH] Fix PHP 8.2 deprecation notices, fixes #27 --- CHANGELOG.md | 5 +++++ Wireframe.info.json | 4 ++-- Wireframe.module.php | 2 +- lib/ViewData.php | 23 ++++++++++++++++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 810c8df..866eb6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.29.2] - 2024-05-30 + +### Fixed +- PHP 8.2 deprecation errors resulting from dynamic ViewData properties. + ## [0.29.1] - 2024-03-05 ### Fixed diff --git a/Wireframe.info.json b/Wireframe.info.json index 4cd1f29..374fe88 100644 --- a/Wireframe.info.json +++ b/Wireframe.info.json @@ -1,7 +1,7 @@ { "title": "Wireframe", "summary": "Wireframe is an output framework for ProcessWire CMS/CMF.", - "version": "0.29.1", + "version": "0.29.2", "author": "Teppo Koivula", "href": "https://wireframe-framework.com", "requires": [ @@ -10,4 +10,4 @@ ], "singular": true, "autoload": false -} +} \ No newline at end of file diff --git a/Wireframe.module.php b/Wireframe.module.php index 8596c8a..ec9bf5f 100644 --- a/Wireframe.module.php +++ b/Wireframe.module.php @@ -14,7 +14,7 @@ * @method static string|Page|NullPage page($source, $args = []) Static getter (factory) method for Pages. * @method static string|null partial(string $partial_name, array $args = []) Static getter (factory) method for Partials. * - * @version 0.29.1 + * @version 0.29.2 * @author Teppo Koivula * @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ */ diff --git a/lib/ViewData.php b/lib/ViewData.php index da9a0c1..19bec7d 100644 --- a/lib/ViewData.php +++ b/lib/ViewData.php @@ -9,7 +9,7 @@ * * @internal This class is only intended for use within the Wireframe internals. * - * @version 0.1.0 + * @version 0.1.1 * @author Teppo Koivula * @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ */ @@ -22,6 +22,13 @@ final class ViewData { */ public $controller; + /** + * Component instance + * + * @var Component|null + */ + public $component; + /** * View file name * @@ -50,6 +57,20 @@ final class ViewData { */ public $views_path; + /** + * Path to the layouts directory + * + * @var string + */ + public $layouts_path; + + /** + * Rendering context + * + * @var string + */ + public $context; + /** * The extension for view, layout, and partial files *