@@ -42,8 +42,86 @@ I will be really happy hearing from you.
4242
4343----
4444
45+ ## Important notes
46+ 1 . Currently JSON serialization and deserialization does not work properly.
47+ Please do not rely on it for now! ** IMPORTANT!**
48+ When fix for this problem comes, and you are using current logic - you might get
49+ into a broken code logic. Please do not use ` \spaf\simputils\PHP::serialize() ` and
50+ ` \spaf\simputils\PHP::deserialize() ` code with JSON mechanics, you can switch the
51+ mechanics to native PHP like this (workaround):
52+ ``` php
53+ PHP::$serialization_mechanism = PHP::SERIALIZATION_TYPE_PHP;
54+ PHP::init();
55+ ```
56+ That will use native PHP mechanics for serialization, which should work properly
57+ starting from this release (1.1.3)
58+
4559## Changelog
4660
61+ ### 1.1.3
62+
63+ * Implemented method `\spaf\simputils\models\Box::batch()` that allows to easily export items
64+ of specified keys to the local variable scope
65+ * Implemented methods `setFromData()` and meta-magic methods `___serialize()` and
66+ `___deserialize()` to fix PHP native serialization/deserialization for the
67+ following classes:
68+ * `\spaf\simputils\models\Version`
69+ * `\spaf\simputils\models\UrlObject`
70+ * `\spaf\simputils\models\Time`
71+ * `\spaf\simputils\models\L10n`
72+ * `\spaf\simputils\models\IPv4Range`
73+ * `\spaf\simputils\models\IPv4`
74+ * `\spaf\simputils\models\File`
75+ * `\spaf\simputils\models\Dir`
76+ * `\spaf\simputils\models\DateTimeZone`
77+ * `\spaf\simputils\models\DateTime`
78+ * `\spaf\simputils\models\DatePeriod`
79+ * `\spaf\simputils\models\DateInterval`
80+ * `\spaf\simputils\models\Date`
81+ * `\spaf\simputils\models\DataUnit`
82+ * `\spaf\simputils\models\BigNumber`
83+ * Code Sniffer is removed from the project (got really annoyed, and it does not work correctly)
84+ * `\spaf\simputils\models\Time` and `\spaf\simputils\models\Date` have been refactored a bit.
85+ The caching mechanics has been fixed.
86+ * Additionally have been added the properties for `\spaf\simputils\models\Date`
87+ and `\spaf\simputils\models\Time` from the target `DateTime` object
88+ * `\spaf\simputils\models\Date` and `\spaf\simputils\models\Time` result of `for_system`
89+ now returns the whole DateTime string value of UTC, not only the date or time component.
90+ * Implemented `\spaf\simputils\generic\BasicExecEnvHandler` Execution-Environment (aka stages),
91+ besides that implemented `\spaf\simputils\generic\BasicInitConfig::@$ee` property that
92+ automatically will be assigned during `PHP::init()`, the object or params could be
93+ adjusted in the incoming config, example:
94+ ```php
95+ $ic = PHP::init([
96+ 'l10n' => 'AT',
97+ // 'ee' => new DummyExecEnvHandler(false, ee_name: 'TOO'),
98+ 'ee' => [
99+ 'ee' => 'test3-local',
100+ 'is_hierarchical' => true,
101+ 'permitted_values' => [
102+ 'test1',
103+ 'test2',
104+ 'test3',
105+ 'test4',
106+ ]
107+ ]
108+ ]);
109+ pd("{$ic->ee}", Boolean::to($ic->ee->is('test4-local')));
110+ ```
111+ For now not much of documentation is provided, but you always can define your own
112+ implementation of the class like ` \spaf\simputils\components\execenvs\DummyExecEnvHandler `
113+ to handle your Exec-Env/stages implementation! More documentation and example will follow.
114+ * Additionally implemented ` \spaf\simputils\components\execenvs\DummyExecEnvHandler `
115+ which is a dummy handler that just returns the predefined value. Should not be used
116+ on production.
117+ * Implemented ` \spaf\simputils\exceptions\ExecEnvException ` exception for Exec-Env cases
118+ * Implemented ` \spaf\simputils\models\Box::popFromStart() ` and
119+ ` \spaf\simputils\models\Box::popFromEnd() ` methods to get value from the box, return
120+ and remove it from the box.
121+ * Implemented tests for:
122+ * Exec-Env
123+ * Box batch functionality
124+
47125### 1.1.2
48126
49127 * Implemented ` \spaf\simputils\basic\with ` functionality of a transactional style like
@@ -137,13 +215,14 @@ so documentation will come after that in the very nearest time. My apologies.
137215
138216Minimal PHP version: ** 8.0**
139217
140- Current framework version: ** 1.1.2 **
218+ Current framework version: ** 1.1.3 **
141219``` shell
142220composer require spaf/simputils " ^1"
143221```
144222
145223Keep in mind that the library development suppose to follow the semantic versioning,
146- so the functionality within the same major version - should be backward-compatible.
224+ so the functionality within the same major version - should be backward-compatible (Except
225+ cases of bugs and issues).
147226
148227More about semantic versioning: [ Semantic Versioning Explanation] ( https://semver.org ) .
149228
0 commit comments