From dcdcdd2182437d9256d13acefc01b8ebc91e37db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= Date: Thu, 3 Sep 2026 09:29:10 +0200 Subject: [PATCH 1/4] Update `CHANGELOG.md` with details for version `v0.2.3` **Details:** - Added a new section for `v0.2.3` with release date and hyperlink to GitHub comparison. - Documented the addition of the `Copy` utility to the runtime features. - Ensures precise version tracking and consistent changelog formatting. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98e35e8..0e79711 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] +## [[v0.2.3](https://github.com/The-FireHub-Project/Runtime/compare/v0.2.2...v0.2.3)] – 2026-09-03 + +### Added +* Create `Copy` by @dieselxxx + ## [[v0.2.2](https://github.com/The-FireHub-Project/Runtime/compare/v0.2.1...v0.2.2)] – 2026-08-31 ### Added From b79450cea9d48fd35548d6a6a8ef3e6c566b2688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= Date: Thu, 3 Sep 2026 09:46:55 +0200 Subject: [PATCH 2/4] Remove `Cloneable` dependency and update `Copy` behavior in core runtime utilities **Details:** - Removed `copyCloneable()` method and support for `Cloneable` capability in the `Copy` class. - Simplifies deep-copy logic by removing reliance on user-defined copy contracts. - Ensures a more deterministic and uniform copying process using reflection for all user-defined objects. - Updated `Copy` class behavior to preserve internal PHP objects without attempting unsafe reconstruction. - Adjusted PHPDoc annotations in `Copy.php` to reflect the changes in methodology and improve clarity. - Updated `CHANGELOG.md` to document the change for version `v0.2.4`. This update streamlines the `Copy` class functionality while enhancing code maintainability and ensuring safe deep-copy operations. --- CHANGELOG.md | 5 +++++ src/Copy.php | 39 ++++----------------------------------- 2 files changed, 9 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e79711..4607a7e 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] +## [[v0.2.4](https://github.com/The-FireHub-Project/Runtime/compare/v0.2.3...v0.2.4)] – 2026-09-03 + +### Changed +* `Copy` changed behavior by @dieselxxx + ## [[v0.2.3](https://github.com/The-FireHub-Project/Runtime/compare/v0.2.2...v0.2.3)] – 2026-09-03 ### Added diff --git a/src/Copy.php b/src/Copy.php index ae0f4c5..d360080 100644 --- a/src/Copy.php +++ b/src/Copy.php @@ -24,9 +24,10 @@ * Deep copying recursively duplicates mutable arrays and objects while preserving values that are immutable, * non-copyable, or otherwise cannot safely be duplicated. * - * Objects implementing the {@see Cloneable} capability are responsible for defining their own deep-copy behavior. - * Internal PHP objects are never copied through reflection because their internal state may not be safely - * reconstructible without their constructor or native cloning semantics. + * Objects implementing the {@see Cloneable} capability expose a copy operation that delegates to this runtime + * implementation. User-defined objects are copied recursively through reflection, while internal PHP objects are + * preserved because their internal state may not be safely reconstructible without their constructor or native + * cloning semantics. * * Circular object references are preserved during the copy operation. * @since 1.0.0 @@ -127,7 +128,6 @@ private static function copyArray (array $value, array &$objects):array { * ### Copies an object according to its copy semantics * @since 1.0.0 * - * @uses self::copyCloneable() To copy objects implementing the {@see Cloneable} capability. * @uses self::copyReflective() To copy user-defined objects using reflection. * * @param object $value

@@ -145,43 +145,12 @@ private static function copyObject (object $value, array &$objects):object { if ($value instanceof Closure) return $value; - if ($value instanceof Cloneable) return self::copyCloneable($value, $objects); - if (new ReflectionObject($value)->isInternal()) return $value; return self::copyReflective($value, $objects); } - /** - * ### Creates a deep copy using the object's own copy contract - * @since 1.0.0 - * - * @uses \FireHub\Runtime\ObjectModel\Identity::id() To get the object's identifier. - * - * @param Cloneable $value

- * The object to copy. - *

- * @param array $objects

- * Previously copied objects indexed by object identifier. - *

- * - * @return object The copied object. - */ - private static function copyCloneable (Cloneable $value, array &$objects):object { - - $id = ObjectModel\Identity::id($value); - - if (isset($objects[$id])) return $objects[$id]; - - $copy = $value->copy(); - - $objects[$id] = $copy; - - return $copy; - - } - /** * ### Creates a deep copy of a user-defined object using reflection * @since 1.0.0 From 640cdc6a1ea5f7f05555a556c0e4b9b566459238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= <56673130+dieselxxx@users.noreply.github.com> Date: Thu, 3 Sep 2026 09:48:29 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2624087..c92d88f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ /> version From 71049a7ff4a100767dcbedfa701cd2188b834c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= <56673130+dieselxxx@users.noreply.github.com> Date: Thu, 3 Sep 2026 09:49:06 +0200 Subject: [PATCH 4/4] Revise README for repository purpose and community info Updated README.md to reflect changes in repository purpose and community guidelines. --- README.md | 111 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index c92d88f..e8d9159 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ PHP Runtime Foundation
release @@ -22,25 +22,46 @@ /> -[![PHPStan](https://github.com/The-FireHub-Project/Runtime/actions/workflows/PHPStan.yml/badge.svg?branch=develop)](https://github.com/The-FireHub-Project/Runtime/actions/workflows/PHPStan.yml) -[![PHPUnit](https://github.com/The-FireHub-Project/Runtime/actions/workflows/PHPUnit.yml/badge.svg?branch=develop)](https://github.com/The-FireHub-Project/Runtime/actions/workflows/PHPUnit.yml) -[![Codecov](https://codecov.io/gh/The-FireHub-Project/Runtime/branch/develop/graph/badge.svg?token=XW2YEONF51)](https://app.codecov.io/gh/The-FireHub-Project/Runtime/tree/develop) -

- + + GitHub created at + GitHub last commit (branch) - + GitHub activity (branch) - + + GitHub contributors + GitHub commit difference between two branches + + GitHub top language + + GitHub repo size + + GitHub code size

@@ -54,47 +75,55 @@ Its role is to provide a consistent execution foundation between native PHP capa --- -## FireHub Icon Development Branch +## FireHub Icon Repository Purpose -⚠️ **This is the `develop` branch** +This repository provides a lightweight PHP runtime abstraction layer that wraps native PHP functionality into clean, consistent, and deterministic APIs. -- Unstable -- APIs may change without notice -- Not intended for production use +Its purpose is to reduce boilerplate and standardize common execution patterns across the FireHub ecosystem by offering ergonomic helper classes for arrays, strings, files, environment access, and other low-level runtime operations. -## FireHub Icon Branch Purpose +It is strictly focused on execution-level concerns and does not contain domain logic, business rules, or framework-level orchestration. It exists to improve developer productivity while preserving native PHP behavior and ensuring zero framework coupling. -The `develop` branch is the **primary integration branch** for all ongoing development. +## FireHub Icon Security -It serves as the staging area where: -- Feature branches are merged -- Bug fixes are integrated -- Experimental work is stabilized -- Code is prepared for upcoming releases +For security reporting and guidelines, please refer to our [SECURITY.md](https://github.com/The-FireHub-Project/.github/blob/master/.github/SECURITY.md) file. -All **release branches** are created **from `develop`**. +## FireHub Icon Community -## Stability Guarantee +![GitHub watchers](https://img.shields.io/github/watchers/The-FireHub-Project/Runtime?style=social) +![GitHub Repo stars](https://img.shields.io/github/stars/The-FireHub-Project/Runtime?style=social) +![GitHub forks](https://img.shields.io/github/forks/The-FireHub-Project/Runtime?style=social) -❌ No backward compatibility guarantee -❌ APIs may change without notice -❌ Behavior may be incomplete or inconsistent -❌ Breaking changes are expected +- Be sure to review the [Code of Conduct](https://github.com/The-FireHub-Project/.github/blob/master/.github/CODE_OF_CONDUCT.md). +- Read a [Contributing](https://github.com/The-FireHub-Project/.github/blob/master/.github/CONTRIBUTING.md) file to see how you can contribute to this project. +- Read our [Security policy](https://github.com/The-FireHub-Project/.github/blob/master/.github/SECURITY.md) file to see how you can report a vulnerability. +- Review the project [Governance model](https://github.com/The-FireHub-Project/.github/blob/master/.github/GOVERNANCE.md), including roles, decision-making, RFC process, and releases. -This branch is intended **only for contributors and advanced testers**. +## FireHub Icon Support -## FireHub Icon Composer Usage (Not Recommended) +

+ + GitHub in-progress issues + + GitHub total issues + + GitHub opened pull requests +

-For internal testing only: +For help with FireHub products, please refer to the following resources: -```json -{ - "require": { - "the-firehub-project/runtime": "dev-develop" - } -} -``` -⚠️ Never use dev-develop in production. +- **General questions & discussions**: [GitHub Discussions](https://github.com/orgs/The-FireHub-Project/discussions) +- **Bug reports & issues**: [Support](https://github.com/The-FireHub-Project/Runtime/issues) +- **Documentation & guides**: [FireHub Docs](https://the-firehub-project.github.io) +- **Commercial support** (Pro/Enterprise): contact your account manager ## FireHub Icon Authors and Contributors