Add InteractsWithData trait and enhance Fluent class by huangdijia · Pull Request #7476 · hyperf/hyperf
added 4 commits
August 2, 2025 17:53Introduces the InteractsWithData trait to provide advanced data interaction methods. Updates the Fluent class to use this trait and adds new methods for attribute access, mutation, and data retrieval. Also adds the enum_value helper to Functions.php for handling enum values.
This commit adds new test cases for the Fluent class, covering methods such as getIterator, set, fill, value, scope, all, data interaction methods, conditional methods (whenHas, whenFilled, whenMissing), date parsing, and enum handling. These tests improve coverage and ensure correct behavior for a wide range of Fluent features.
Replaced fully qualified class names with imported classes for ArrayIterator, Carbon, Collection, and Stringable in assertions. Also standardized array formatting by adding trailing commas for consistency and readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters