File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## 1.0.3 (2019-10-14)
4+
5+ - Fix for PHP setup where extensions are not compiled-in, loaded as modules. Standard php.ini is now loaded.
6+ - Code style: replaced traditional syntax array literals
7+ - Code smells: fixes various minor code smells
8+ - Pushed minimum required PHP version to 7.2
9+ - Improved array to object conversion in ConfigLoader by using json_encode/decode trick.
10+
311## 1.0.2 (2015-11-04)
412
513- workaround for duplicate headers that should not appear more than once (@onlime )
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function __construct()
3939 }
4040 }
4141
42- $ this ->_conf = $ this ->_arrayToObject ($ config );
42+ $ this ->_conf = $ this ->arrayToObject ($ config );
4343
4444 $ this ->init ();
4545 }
@@ -70,20 +70,10 @@ public function getConfig()
7070 *
7171 * @param array $arr
7272 * @return StdClass
73- * @link http ://onli.me/array2object
73+ * @link https ://stackoverflow.com/a/9185337
7474 */
75- protected function _arrayToObject (array $ arr )
75+ protected function arrayToObject (array $ arr )
7676 {
77- if (is_array ($ arr )) {
78- /*
79- * Return array converted to object
80- * Using __FUNCTION__ (Magic constant)
81- * for recursive call
82- */
83- return (object )array_map ([$ this , __FUNCTION__ ], $ arr );
84- } else {
85- // Return object
86- return $ arr ;
87- }
77+ return json_decode (json_encode ($ arr ));
8878 }
8979}
Original file line number Diff line number Diff line change 1919 "php" : " >=7.2.0" ,
2020 "ext-mbstring" : " *" ,
2121 "ext-pdo" : " *" ,
22- "ext-imap" : " *"
22+ "ext-imap" : " *" ,
23+ "ext-json" : " *"
2324 }
2425}
You can’t perform that action at this time.
0 commit comments