author int64 658 755k | date stringlengths 19 19 | timezone int64 -46,800 43.2k | hash stringlengths 40 40 | message stringlengths 5 490 | mods list | language stringclasses 20 values | license stringclasses 3 values | repo stringlengths 5 68 | original_message stringlengths 12 491 |
|---|---|---|---|---|---|---|---|---|---|
323,346 | 28.02.2022 12:34:52 | -28,800 | b6509d7a226bffcfacd0b1d0239d7df657894777 | Remove useless command -t | [
{
"change_type": "MODIFY",
"old_path": "Ext/libQueue.php",
"new_path": "Ext/libQueue.php",
"diff": "@@ -411,7 +411,7 @@ class libQueue extends Factory\n$this->redis->hSet($this->key_slot['watch'], $master_key, time());\n//Build job processor command\n- $job_proc = '\"' . $this->OSUnit->getPhpPath() ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove useless command -t |
323,346 | 28.02.2022 12:48:22 | -28,800 | 175ac30a810acc61711dab824edd6da935298266 | Captura exception inside libQueue class | [
{
"change_type": "MODIFY",
"old_path": "Ext/libQueue.php",
"new_path": "Ext/libQueue.php",
"diff": "@@ -39,7 +39,7 @@ class libQueue extends Factory\nconst TYPE_DELAY = 4;\n//Key lifetime (in seconds)\n- const LIFETIME = 60;\n+ const LIFETIME = 30;\n//Wait properties (in microseconds)\nconst WAIT_TI... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Captura exception inside libQueue class |
323,346 | 28.02.2022 12:57:07 | -28,800 | ae20b85193885d5985c19045f44f1120eced43a3 | Minor changes in libExeC | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -26,17 +26,17 @@ class libExeC extends Factory\n{\n//ExeC key prefix\nconst PREFIX = 'EXEC:';\n- const WORKER = self::PREFIX . 'W';\n+ const WORKER = self::PREFIX . 'worker';\nconst STOP_CMD = 'ExecS... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Minor changes in libExeC |
323,346 | 28.02.2022 22:09:19 | -28,800 | 17845c494ee24ab676a0f8969636d191b454fed1 | Do NOT mark as free when no data returned due to process time | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -300,8 +300,6 @@ class libMPC extends Factory\nprivate function read(array $read): void\n{\nforeach ($read as $idx => $pipe) {\n- $this->proc_busy[$idx] = 0;\n-\nwhile (!feof($pipe)) {\n$msg = fgets($p... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Do NOT mark as free when no data returned due to process time |
323,346 | 01.03.2022 09:36:40 | -28,800 | c08892b8bca266c1be4705bcc41f0d74afa0578b | Always check __construct params for key cache in Factory | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -46,29 +46,26 @@ class Factory\n{\n$key = $class_name;\n- if (!empty($class_params)) {\n- $key .= json_encode($class_params);\n- }\n-\n- $hash_key = hash('md5', $key);\n-\n- if (!isset(self::$objects[$... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always check __construct params for key cache in Factory |
323,346 | 01.03.2022 11:18:57 | -28,800 | ae4043a9b81b383b63fe7390a6a7a88620536db6 | Fix memory leak in Factory | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -44,32 +44,34 @@ class Factory\n*/\npublic static function getObj(string $class_name, array $class_params = []): object\n{\n- $key = $class_name;\n+ $class_key = $class_name;\nif (method_exists($class_... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix memory leak in Factory |
323,346 | 01.03.2022 11:33:27 | -28,800 | 16f902d44371436d5ca5581a631f9f462f471486 | Only build constructor args for non-list params | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -47,10 +47,11 @@ class Factory\n$class_key = $class_name;\nif (method_exists($class_name, '__construct')) {\n- if (1 === count($class_params) && is_array($class_params[0]) && !array_is_list($class_para... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Only build constructor args for non-list params |
323,346 | 01.03.2022 11:54:17 | -28,800 | a10b84c969347a191a6d366f450f766a63db1c56 | Add class_params for creating object | [
{
"change_type": "MODIFY",
"old_path": "Ext/libQueue.php",
"new_path": "Ext/libQueue.php",
"diff": "@@ -743,7 +743,7 @@ class libQueue extends Factory\nthrow new \\Exception('ArgumentError: ' . implode(', ', $params['diff']), E_CORE_WARNING);\n}\n- $result = $this->caller->runCgi($cmd_data, $params[... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add class_params for creating object |
323,346 | 01.03.2022 19:30:42 | -28,800 | d076aa58e10101a36fc211652eaf244ca6f0091f | Throw exception inside Factory when argument error occurred | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -338,16 +338,8 @@ class libMPC extends Factory\nif (!empty($cgi_cmd)) {\nwhile (is_array($cmd_data = array_shift($cgi_cmd))) {\n- $params = parent::buildArgs(\n- Reflect::getMethod($cmd_data[0], $cmd_d... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Throw exception inside Factory when argument error occurred |
323,346 | 01.03.2022 19:42:15 | -28,800 | 5fba03f2a16b49905f8a33753a7a1315fd33d4dc | Change Factory new logic | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -31,43 +31,43 @@ class Factory\n*/\npublic static function new(): static\n{\n- return self::getObj(get_called_class(), func_get_args());\n- }\n-\n- /**\n- * @param string $class_name\n- * @param array ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change Factory new logic |
323,346 | 01.03.2022 19:57:51 | -28,800 | 110bf567248df243d32b2fccd34d8cff93686dfc | Always call __construct using getObj() in Factory without argument | [
{
"change_type": "MODIFY",
"old_path": "LC/Caller.php",
"new_path": "LC/Caller.php",
"diff": "@@ -36,14 +36,13 @@ class Caller extends Factory\n/**\n* @param array $cmd_data\n* @param array $method_params\n- * @param array $class_params\n* @param bool $throw_exception\n*\n* @return array\n* @throws ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always call __construct using getObj() in Factory without argument |
323,346 | 01.03.2022 20:06:03 | -28,800 | 2708e9c1ab970342dceff0712a7b2adaa8f6c734 | Always throw exception in Caller | [
{
"change_type": "MODIFY",
"old_path": "LC/Caller.php",
"new_path": "LC/Caller.php",
"diff": "@@ -23,30 +23,17 @@ namespace Nervsys\\LC;\nclass Caller extends Factory\n{\n- public Error $error;\n-\n- /**\n- * @throws \\ReflectionException\n- */\n- public function __construct()\n- {\n- $this->error =... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always throw exception in Caller |
323,346 | 01.03.2022 22:12:57 | -28,800 | 1b672e5faaf8efe7d5e10464b6b3d5a927f7c394 | Add try {} catch (){} to all needed places | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "namespace Nervsys\\Ext;\nuse Nervsys\\LC\\Caller;\n+use Nervsys\\LC\\Error;\nuse Nervsys\\LC\\Factory;\nuse Nervsys\\LC\\OSUnit;\nuse Nervsys\\LC\\Reflect;\n@@ -30,11 +31,12 @@ use Nervsys\\Lib\\Router;\n... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add try {} catch (){} to all needed places |
323,346 | 01.03.2022 22:49:24 | -28,800 | f038fd12a5e191c86b8ca6a8696784eb0a1e1f4f | Use callback function to process result instead of storing result data | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -42,8 +42,8 @@ class libMPC extends Factory\npublic array $proc_idx = [];\npublic array $proc_busy = [];\n- public array $proc_data = [];\npublic array $proc_list = [];\n+ public array $proc_await = []... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Use callback function to process result instead of storing result data |
323,346 | 01.03.2022 23:16:43 | -28,800 | 6996ba4e627f48e8f314ac9e32cd0dd2516fb300 | Remove unnecessary exception content in Factory | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -117,7 +117,7 @@ class Factory\n}\nif (!empty($diff)) {\n- throw new \\Exception('ArgumentError' . implode(', ', $diff), E_ERROR);\n+ throw new \\Exception(implode(', ', $diff), E_ERROR);\n}\nunset($pa... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove unnecessary exception content in Factory |
323,346 | 01.03.2022 23:17:27 | -28,800 | 161d580b717577485be9f1f01cfa2a4b4563462a | Catch argument error in main logic | [
{
"change_type": "MODIFY",
"old_path": "NS.php",
"new_path": "NS.php",
"diff": "@@ -101,6 +101,7 @@ class NS\n);\n} catch (\\Throwable $throwable) {\n$this->system->error->exceptionHandler($throwable, false, $this->system->app->core_debug);\n+ unset($throwable);\n}\n}\n}\n@@ -117,10 +118,19 @@ class... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Catch argument error in main logic |
323,346 | 02.03.2022 21:15:42 | -28,800 | 2ec895ed618452e2535f8367372696dbadedfda2 | Caller now supports class constructor arguments | [
{
"change_type": "MODIFY",
"old_path": "LC/Caller.php",
"new_path": "LC/Caller.php",
"diff": "@@ -26,18 +26,19 @@ class Caller extends Factory\n/**\n* @param array $cmd_data\n* @param array $method_args\n+ * @param array $class_args\n*\n* @return array\n* @throws \\ReflectionException\n*/\n- public ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Caller now supports class constructor arguments |
323,346 | 02.03.2022 21:56:59 | -28,800 | 0708ef3d363128e6e94f760f84fe3de5089ce869 | Always build arguments for __construct() | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -342,8 +342,13 @@ class libMPC extends Factory\nif (!empty($cgi_cmd)) {\nwhile (is_array($cmd_data = array_shift($cgi_cmd))) {\n- $params = parent::buildArgs(Reflect::getMethod($cmd_data[0], $cmd_data[... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always build arguments for __construct() |
323,346 | 04.03.2022 08:51:53 | -28,800 | 787ed5c74d0922d57d4e523470c938dbe576c853 | Remove buildCmd from libMPC | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -78,46 +78,6 @@ class libMPC extends Factory\nreturn $this;\n}\n- /**\n- * Build full command for NS API\n- *\n- * @param string $c\n- * @param array $data\n- *\n- * @return string\n- */\n- public func... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove buildCmd from libMPC |
323,346 | 04.03.2022 10:13:51 | -28,800 | 804094b637f20453e8c767d1787de0cb3347134d | Change UA in libHttp | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "@@ -42,7 +42,7 @@ class libHttp extends Factory\n'accept_encoding' => 'gzip,deflate,identity,*;q=0',\n'accept_language' => 'en-US,en,zh-CN,zh,*;q=0',\n'accept_type' => 'application/json;q=0.9,applicatio... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change UA in libHttp |
323,346 | 04.03.2022 10:52:16 | -28,800 | df044cb05cf46e3159ecde3d68533818d8dc2c4c | libExeC now supports unique command | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -240,19 +240,24 @@ class libExeC extends Factory\n}\n/**\n- * Send command to process\n+ * Send (unique) command to process\n*\n* @param string $command\n+ * @param bool $unique\n*\n- * @return libEx... | PHP | Apache License 2.0 | jerry-shaw/nervsys | libExeC now supports unique command |
323,346 | 05.03.2022 16:26:46 | -28,800 | a3c6b679fb818ee940a51756e2d8b0ee081cd4d7 | Read pipe for limited time to avoid looping too long to run others | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -307,7 +307,9 @@ class libExeC extends Factory\n}\nforeach ($pipes as $pipe) {\n- while (!feof($pipe)) {\n+ $start = time();\n+\n+ while (!feof($pipe) && $this->idle_time >= time() - $start) {\n$msg ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Read pipe for limited time to avoid looping too long to run others |
323,346 | 18.03.2022 13:05:21 | -28,800 | 3f7f20c287196f985b11e7bb5d5e0dee8173816f | Always pass cmd to router even if it's empty | [
{
"change_type": "MODIFY",
"old_path": "NS.php",
"new_path": "NS.php",
"diff": "@@ -86,7 +86,6 @@ class NS\n$this->system->IOData->readCli();\n}\n- if ('' !== $this->system->IOData->src_cmd) {\nif ($this->system->app->is_cli) {\n$cli_cmd = $this->system->router->parseCli($this->system->IOData->src_c... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always pass cmd to router even if it's empty |
323,346 | 19.03.2022 21:42:49 | -28,800 | d35e07c0bb2b054ee0a00fdd4a0731635d20a028 | Remove empty "c" in default router | [
{
"change_type": "MODIFY",
"old_path": "Lib/Router.php",
"new_path": "Lib/Router.php",
"diff": "@@ -203,6 +203,6 @@ class Router extends Factory\n*/\nprivate function getCmdList(string $c): array\n{\n- return str_contains($c, '|') ? explode('|', $c) : [$c];\n+ return array_filter(str_contains($c, '|... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove empty "c" in default router |
323,346 | 20.03.2022 18:16:00 | -28,800 | 6477d95110944700209de2a84cf8a3d635a1b420 | Using rPop instead of brPop in libExec | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -208,21 +208,22 @@ class libExeC extends Factory\n$this->saveLogs([$pipes[1], $pipes[2]], $log_fn);\n- $command = $this->redis->brPop($this->key_command, $this->idle_time);\n+ $command = $this->redis... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using rPop instead of brPop in libExec |
323,346 | 20.03.2022 18:24:33 | -28,800 | 3f5e92974c82a29341011a44b79e33a56b7585fd | Using rPop instead of brPop | [
{
"change_type": "MODIFY",
"old_path": "Ext/libQueue.php",
"new_path": "Ext/libQueue.php",
"diff": "@@ -582,17 +582,16 @@ class libQueue extends Factory\n*/\nprivate function getJob(string $job_key): string\n{\n- $job = $this->redis->brPop($job_key, self::LIFETIME);\n+ $job = $this->redis->rPop($job... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using rPop instead of brPop |
323,346 | 20.03.2022 18:36:25 | -28,800 | d5ccfa27d1620f3e19662b1a4d1d9de816d77fb5 | Always trim spaces in hardware response result | [
{
"change_type": "MODIFY",
"old_path": "LC/OS/Darwin.php",
"new_path": "LC/OS/Darwin.php",
"diff": "@@ -37,12 +37,20 @@ class Darwin\nthrow new \\Exception(PHP_OS . ': Access denied!', E_USER_ERROR);\n}\n- $output = array_filter($output);\n- $output = array_unique($output);\n+ $hw_info = '';\n- $hw_... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always trim spaces in hardware response result |
323,346 | 22.03.2022 17:08:23 | -28,800 | b8fc6eb37338db651fad8e75f808471c3808d4d7 | Always try to mkdir, but also allows exception to pass | [
{
"change_type": "MODIFY",
"old_path": "Ext/libFileIO.php",
"new_path": "Ext/libFileIO.php",
"diff": "@@ -63,8 +63,12 @@ class libFileIO extends Factory\n}\nif (!is_dir($dir = $root . DIRECTORY_SEPARATOR . $path)) {\n+ try {\nmkdir($dir, 0777, true);\nchmod($dir, 0777);\n+ } catch (\\Throwable) {\n+... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always try to mkdir, but also allows exception to pass |
323,346 | 28.03.2022 09:21:37 | -28,800 | de2e65d44ab1d698a96af347bd6253bb19c14457 | Only get physical net adapter's MAC address under WinNT | [
{
"change_type": "MODIFY",
"old_path": "LC/OS/WINNT.php",
"new_path": "LC/OS/WINNT.php",
"diff": "@@ -34,11 +34,10 @@ class WINNT\n{\n$ps_cmd = 'powershell -Command \"';\n$ps_cmd .= 'Get-WMIObject -class Win32_Processor | select Caption, CreationClassName, Family, Manufacturer, Name, ProcessorId, Pr... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Only get physical net adapter's MAC address under WinNT |
323,346 | 28.03.2022 09:38:11 | -28,800 | e31df2542df854b73eff28361007cc5474382df1 | Using pure k:v to format hardware info under WINNT | [
{
"change_type": "MODIFY",
"old_path": "LC/OS/WINNT.php",
"new_path": "LC/OS/WINNT.php",
"diff": "@@ -33,11 +33,11 @@ class WINNT\npublic function getHwHash(): string\n{\n$ps_cmd = 'powershell -Command \"';\n- $ps_cmd .= 'Get-WMIObject -class Win32_Processor | select Caption, CreationClassName, Fami... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using pure k:v to format hardware info under WINNT |
323,346 | 28.03.2022 11:01:01 | -28,800 | 816aa7e66fbbc18858fe0db3a534cc56f08b7b6e | Use lshw instead of lspci, code cleanup | [
{
"change_type": "MODIFY",
"old_path": "LC/OS/Linux.php",
"new_path": "LC/OS/Linux.php",
"diff": "@@ -33,8 +33,8 @@ class Linux\n{\n$queries = [\n'lscpu | grep -E \"Architecture|CPU|Thread|Core|Socket|Vendor|Model|Stepping|BogoMIPS|L1|L2|L3\"',\n- 'lspci -nn | grep -E \"Host|PCI|VGA|ISA|Serial|Netwo... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Use lshw instead of lspci, code cleanup |
323,346 | 02.04.2022 11:30:50 | -28,800 | 459bd1da2f8f7b2143d39dc6e26c7500a2f661d2 | Simply supports multiple transactions in libMySQL | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMySQL.php",
"new_path": "Ext/libMySQL.php",
"diff": "@@ -34,6 +34,7 @@ class libMySQL extends Factory\npublic libPDO $libPDO;\npublic int $retry_times = 0;\n+ public int $transactions = 0;\npublic int $affected_rows = 0;\npublic string $last_sql = '';\n... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Simply supports multiple transactions in libMySQL |
323,346 | 02.04.2022 11:54:25 | -28,800 | 8acdf45b01dab52f19591ef1dcf2b6bbaae87682 | Fix multiple transactions errors | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMySQL.php",
"new_path": "Ext/libMySQL.php",
"diff": "@@ -27,25 +27,21 @@ use Nervsys\\Lib\\IOData;\nclass libMySQL extends Factory\n{\n- /** @var \\PDO $pdo */\npublic \\PDO $pdo;\n-\n- /** @var libPDO $libPDO */\npublic libPDO $libPDO;\npublic int $ret... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix multiple transactions errors |
323,346 | 19.04.2022 12:14:18 | -28,800 | b31b17373cbff0d6173929a350d0563011153bf6 | Force output data as JSON string even if client required text/html | [
{
"change_type": "MODIFY",
"old_path": "Lib/IOData.php",
"new_path": "Lib/IOData.php",
"diff": "@@ -186,7 +186,9 @@ class IOData extends Factory\n} elseif (is_array($data) && is_string($res = current($data))) {\necho $res;\n} else {\n- echo 'Invalid HTML Page!';\n+ //Force output data as JSON string... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Force output data as JSON string even if client required text/html |
323,346 | 27.04.2022 00:27:45 | -28,800 | 377e415cd8451ac12dc9d145b84677286697da02 | Report HTTP 500 when param data was lost | [
{
"change_type": "MODIFY",
"old_path": "NS.php",
"new_path": "NS.php",
"diff": "@@ -128,6 +128,7 @@ class NS\n: [];\n} catch (\\Throwable $throwable) {\nif ($this->system->app->core_debug) {\n+ http_response_code(500);\n$this->system->IODataAddMsgData('ArgumentError', $throwable->getMessage());\n}\n... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Report HTTP 500 when param data was lost |
323,346 | 02.05.2022 18:59:16 | -28,800 | 1f69ce7708e138810ff6a2a22ef5ac04ff0ec44f | Remove source env from Linux caller | [
{
"change_type": "MODIFY",
"old_path": "LC/Caller.php",
"new_path": "LC/Caller.php",
"diff": "@@ -129,7 +129,7 @@ class Caller extends Factory\n*/\npublic function runAsync(string $cmd): void\n{\n- pclose(popen(OSUnit::new()->setCmd($cmd)->setAsBg()->setEnvPath()->fetchCmd(), 'rb'));\n+ pclose(popen... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove source env from Linux caller |
323,346 | 05.05.2022 14:11:04 | -28,800 | 243dba178b5f26e2eecd0364b2b98c4d95c0e4cd | Add setLocale fn to libExeC | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -73,6 +73,21 @@ class libExeC extends Factory\nreturn $this;\n}\n+ /**\n+ * Set process locale env\n+ *\n+ * @param string $locale\n+ *\n+ * @return void\n+ */\n+ public function setLocale(string $lo... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add setLocale fn to libExeC |
323,346 | 05.05.2022 14:14:57 | -28,800 | bae99db5b6c3e4452bf1f33d6f7d09212678597b | Return this after setting locale data | [
{
"change_type": "MODIFY",
"old_path": "Ext/libExeC.php",
"new_path": "Ext/libExeC.php",
"diff": "@@ -78,14 +78,15 @@ class libExeC extends Factory\n*\n* @param string $locale\n*\n- * @return void\n+ * @return $this\n*/\n- public function setLocale(string $locale): void\n+ public function setLocale(... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Return this after setting locale data |
323,346 | 05.05.2022 17:58:22 | -28,800 | 11f454fe553df19abe6f3a70ec673f0e0e4a117d | Fix mkPath not return absolute readable path | [
{
"change_type": "MODIFY",
"old_path": "Ext/libFileIO.php",
"new_path": "Ext/libFileIO.php",
"diff": "@@ -53,15 +53,19 @@ class libFileIO extends Factory\n*/\npublic function mkPath(string $path, string $root = ''): string\n{\n+ if ('' === $root) {\n$root = App::new()->root_path;\n+ }\n- $path = str... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix mkPath not return absolute readable path |
323,346 | 05.05.2022 18:05:33 | -28,800 | 95d2d495bac14dafd0a7137edcc69a79db6d29d3 | Using $save_path instead of full $to as stored path | [
{
"change_type": "MODIFY",
"old_path": "Ext/libUpload.php",
"new_path": "Ext/libUpload.php",
"diff": "@@ -242,7 +242,7 @@ class libUpload extends Factory\n//Build save properties\n$url_path = trim($to, '\\\\/') . DIRECTORY_SEPARATOR . $as;\n- $file_path = rtrim($this->upload_path, '\\\\/') . DIRECTO... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using $save_path instead of full $to as stored path |
323,346 | 18.05.2022 23:00:22 | -28,800 | a338b23b4a8fa0c71f481f5a11f3ace2e87e2014 | Fix HTTP 500 NOT sent when error occured with log showing | [
{
"change_type": "MODIFY",
"old_path": "LC/Error.php",
"new_path": "LC/Error.php",
"diff": "@@ -137,7 +137,6 @@ class Error extends Factory\n. ' on line ' . $throwable->getLine() . PHP_EOL\n. 'Message: ' . $throwable->getMessage();\n-\n$context = [\n//Memory & Duration\n'Peak' => round(memory_get_pe... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix HTTP 500 NOT sent when error occured with log showing |
323,346 | 06.06.2022 15:54:27 | -28,800 | 75cb45398832405c976907309bd725bfa8d2332c | Add parse HTTP Cookie string fn | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "namespace Nervsys\\Ext;\nuse Nervsys\\LC\\Factory;\n+use Nervsys\\Lib\\IOData;\nclass libHttp extends Factory\n{\n@@ -503,6 +504,33 @@ class libHttp extends Factory\nreturn $this->http_cookie;\n}\n+ /**... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add parse HTTP Cookie string fn |
323,346 | 06.06.2022 16:38:59 | -28,800 | 58f8ba2903b766556a6aa604f546583142c3a82d | Remove unsupported compress type | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "@@ -33,14 +33,14 @@ class libHttp extends Factory\n//cURL default data container\nconst CURL_DEFAULT = [\n- 'http_ver' => 'HTTP/1.1',\n+ 'http_ver' => 'HTTP/2',\n'http_method' => 'GET',\n'http_connectio... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove unsupported compress type |
323,346 | 14.06.2022 00:40:12 | -28,800 | 193a641d078a0b7db82248390ae563fa4b4ee2d3 | Add defination for NS_NAMESPACE | [
{
"change_type": "MODIFY",
"old_path": "NS.php",
"new_path": "NS.php",
"diff": "@@ -45,6 +45,7 @@ class NS\ndefine('NS_VER', '8.1.0');\ndefine('NS_ROOT', __DIR__);\n+ define('NS_NAMESPACE', __NAMESPACE__);\ndefine('JSON_FORMAT', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_T... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add defination for NS_NAMESPACE |
323,346 | 14.06.2022 00:42:48 | -28,800 | 7f2ad5a3493521d5bcef3507b86243ff030db7e2 | Calling NS method directly from API is now NOT allowed for security | [
{
"change_type": "MODIFY",
"old_path": "LC/Caller.php",
"new_path": "LC/Caller.php",
"diff": "@@ -35,6 +35,16 @@ class Caller extends Factory\n{\n$result = [];\n+ $caller_methods = Reflect::getMethods($cmd_data[0], \\ReflectionMethod::IS_PUBLIC);\n+\n+ /** @var \\ReflectionMethod $reflect_method */\... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Calling NS method directly from API is now NOT allowed for security |
323,346 | 14.06.2022 15:46:22 | -28,800 | c83f078b9be2e26a641e74dd2251b6a602e4cfb8 | Always build args when new an object from Factory | [
{
"change_type": "MODIFY",
"old_path": "LC/Factory.php",
"new_path": "LC/Factory.php",
"diff": "@@ -23,7 +23,7 @@ namespace Nervsys\\LC;\nclass Factory\n{\n- protected static array $objects = [];\n+ private static array $objects = [];\n/**\n* @return static\n@@ -34,18 +34,10 @@ class Factory\n$class... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always build args when new an object from Factory |
323,346 | 14.06.2022 16:32:41 | -28,800 | acfc2fdceda81cf2d8fe02aac2507448fb6f24c1 | Structure changed, add Security library | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "namespace Nervsys\\Ext;\n-use Nervsys\\LC\\Caller;\n-use Nervsys\\LC\\Error;\nuse Nervsys\\LC\\Factory;\nuse Nervsys\\LC\\Lib\\App;\n+use Nervsys\\LC\\Lib\\Caller;\n+use Nervsys\\LC\\Lib\\Error;\nuse Nerv... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Structure changed, add Security library |
323,346 | 14.06.2022 20:51:12 | -28,800 | 9a73e2b14872689f4cbd0ab533693ddb31cc3e6a | Update code usage | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -27,7 +27,6 @@ use Nervsys\\LC\\Lib\\Error;\nuse Nervsys\\LC\\Lib\\IOData;\nuse Nervsys\\LC\\Lib\\OSUnit;\nuse Nervsys\\LC\\Lib\\Router;\n-use Nervsys\\LC\\Reflect;\nclass libMPC extends Factory\n{\n@@... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Update code usage |
323,346 | 16.06.2022 12:31:45 | -28,800 | b9fd6ec727a6ffd949e6ea9e3050487d235405da | Change System to trait, code merge and cleanup | [
{
"change_type": "MODIFY",
"old_path": "LC/Lib/Error.php",
"new_path": "LC/Lib/Error.php",
"diff": "@@ -66,16 +66,6 @@ class Error extends Factory\nE_USER_DEPRECATED => 'notice'\n];\n- /**\n- * Error constructor\n- */\n- public function __construct()\n- {\n- register_shutdown_function([$this, 'shutd... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change System to trait, code merge and cleanup |
323,346 | 16.06.2022 13:28:14 | -28,800 | 810973bf1eac66f52c685c746d031f1e569f9309 | Finish Security library | [
{
"change_type": "MODIFY",
"old_path": "LC/Lib/Security.php",
"new_path": "LC/Lib/Security.php",
"diff": "@@ -26,6 +26,8 @@ use Nervsys\\LC\\Reflect;\nclass Security extends Factory\n{\n+ public array $xss_skip_keys = [];\n+\n/**\n* @param string $class_name\n* @param string $method_name\n@@ -65,6 +... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Finish Security library |
323,346 | 16.06.2022 13:29:21 | -28,800 | d347e608a3ed2583a0fc90fe1f8a7174e234f1dc | Method rename runMethod=>runApiFn | [
{
"change_type": "MODIFY",
"old_path": "Ext/libMPC.php",
"new_path": "Ext/libMPC.php",
"diff": "@@ -301,7 +301,7 @@ class libMPC extends Factory\nif (!empty($cgi_cmd)) {\nwhile (is_array($cmd_data = array_shift($cgi_cmd))) {\n- $result += $this->caller->runMethod($cmd_data, $data);\n+ $result += $th... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Method rename runMethod=>runApiFn |
323,346 | 16.06.2022 14:14:51 | -28,800 | c16e9241b63b5b2e780ddc35470dd3e38e18651f | Minor changes on messages | [
{
"change_type": "MODIFY",
"old_path": "LC/Lib/Security.php",
"new_path": "LC/Lib/Security.php",
"diff": "@@ -113,27 +113,33 @@ class Security extends Factory\n}\n/**\n+ * @param App $app\n* @param IOData $IOData\n*\n* @return void\n*/\n- public function targetBlocked(IOData $IOData): void\n+ public... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Minor changes on messages |
323,346 | 16.06.2022 14:16:06 | -28,800 | d93db547fa632ac273b8d6714e8ab72b7f67abed | Catch argument error message and output via replacing api_fn to Security::ArgumentInvalid | [
{
"change_type": "MODIFY",
"old_path": "LC/Lib/Caller.php",
"new_path": "LC/Lib/Caller.php",
"diff": "@@ -28,26 +28,31 @@ class Caller extends Factory\n{\n/**\n* @param array $cmd_data\n- * @param array $method_args\n+ * @param array $input_args\n*\n* @return array\n* @throws \\ReflectionException\n... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Catch argument error message and output via replacing api_fn to Security::ArgumentInvalid |
323,346 | 16.06.2022 15:00:24 | -28,800 | 410c262f400e2b41d83f5f66d84210446f249cd8 | Anti Xss right before excuting | [
{
"change_type": "MODIFY",
"old_path": "LC/Lib/Caller.php",
"new_path": "LC/Lib/Caller.php",
"diff": "@@ -27,20 +27,22 @@ use Nervsys\\LC\\Reflect;\nclass Caller extends Factory\n{\n/**\n- * @param array $cmd_data\n- * @param array $input_args\n+ * @param array $cmd\n+ * @param array $args\n*\n* @re... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Anti Xss right before excuting |
323,346 | 17.06.2022 00:04:30 | -28,800 | 78919b38c2071510522b37b345b6d626c7c17937 | Move out code block for App initializer | [
{
"change_type": "MODIFY",
"old_path": "LC/System.php",
"new_path": "LC/System.php",
"diff": "@@ -61,6 +61,14 @@ trait System\n$this->OSUnit = OSUnit::new();\n$this->security = Security::new();\n+ return $this;\n+ }\n+\n+ /**\n+ * @return $this\n+ */\n+ public function initApp(): self\n+ {\nregister... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Move out code block for App initializer |
323,346 | 17.06.2022 17:58:44 | -28,800 | c0543df0630fb8056835d91e831ff57c9472d5d5 | Add fn to System | [
{
"change_type": "MODIFY",
"old_path": "LC/System.php",
"new_path": "LC/System.php",
"diff": "@@ -332,4 +332,17 @@ trait System\nunset($exe_name, $exe_path);\nreturn $this;\n}\n+\n+ /**\n+ * @param string ...$keys\n+ *\n+ * @return $this\n+ */\n+ public function SecurityAddXssSkipKeys(string ...$key... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add fn to System |
323,346 | 24.06.2022 11:57:06 | -28,800 | 9485b7f3101273c1dbefd013897d1adf83f10514 | Make all cURL options configurable | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "@@ -608,6 +608,12 @@ class libHttp extends Factory\n{\n$curl_opt = $this->runtime_data['options'] ?? [];\n+ $curl_opt += [CURLOPT_NOSIGNAL => true];\n+ $curl_opt += [CURLOPT_AUTOREFERER => true];\n+ $cu... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Make all cURL options configurable |
323,346 | 24.06.2022 12:54:03 | -28,800 | 076d34fe801ec2e923f5f4fc0763ef923096952c | Fix losing data in runtime options | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "@@ -62,6 +62,7 @@ class libHttp extends Factory\npublic string $curl_error = '';\n//Runtime data container\n+ public array $cURL_options = [];\npublic array $runtime_data = [];\n/**\n@@ -148,8 +149,7 @@... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix losing data in runtime options |
323,346 | 24.06.2022 13:04:21 | -28,800 | 8d2139f1d59a10f98b8bd64139421c33c84dede7 | Specific cURL options can now be removed via calling "remOptions" | [
{
"change_type": "MODIFY",
"old_path": "Ext/libHttp.php",
"new_path": "Ext/libHttp.php",
"diff": "@@ -62,6 +62,7 @@ class libHttp extends Factory\npublic string $curl_error = '';\n//Runtime data container\n+ public array $rem_options = [];\npublic array $cURL_options = [];\npublic array $runtime_dat... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Specific cURL options can now be removed via calling "remOptions" |
323,346 | 25.06.2022 21:03:22 | -28,800 | 81e14aad807f8491a0d16c0d452958c8fd364eb1 | Change "-" to "_" in keys when reading data from HEADER and COOKIE | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/IOData.php",
"new_path": "Core/Lib/IOData.php",
"diff": "@@ -375,7 +375,7 @@ class IOData extends Factory\n$find_keys = array_intersect_key($_SERVER, $http_keys);\nforeach ($find_keys as $key => $value) {\n- $header_data[$http_keys[$key]] = $value;\n+... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change "-" to "_" in keys when reading data from HEADER and COOKIE |
323,346 | 04.07.2022 15:58:31 | -28,800 | a8a99c5bf47aa3fce70044d5bd23289d01d81822 | Fix error displaying when basic class as extension cannot be loaded | [
{
"change_type": "MODIFY",
"old_path": "NS.php",
"new_path": "NS.php",
"diff": "@@ -43,7 +43,9 @@ define('JSON_PRETTY', JSON_FORMAT | JSON_PRETTY_PRINT);\nspl_autoload_register(\nstatic function (string $class): void\n{\n- $file_path = __DIR__ . DIRECTORY_SEPARATOR . strtr(strstr($class, '\\\\'), '\... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix error displaying when basic class as extension cannot be loaded |
323,346 | 20.07.2022 23:40:47 | -28,800 | fdec1b7cfbe7c3de23f6c8f03cb95390da466492 | Finish Fiber Manager library in core | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/FiberMan.php",
"new_path": "Core/Lib/FiberMan.php",
"diff": "@@ -27,97 +27,111 @@ use Nervsys\\Core\\Reflect;\nclass FiberMan extends Factory\n{\nprivate \\Fiber $fiber;\n- private array $fibers = [];\n+ private array $child = [];\n/**\n+ * FiberMan c... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Finish Fiber Manager library in core |
323,346 | 21.07.2022 09:09:50 | -28,800 | fa6a7f4f8d9739dc0ae34eb1b572fb4f1fbc7359 | Rename FiberMan to FiberMgr, move to Core/Mgr | [
{
"change_type": "RENAME",
"old_path": "Core/Lib/FiberMan.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "* limitations under the License.\n*/\n-namespace Nervsys\\Core\\Lib;\n+namespace Nervsys\\Core\\Mgr;\nuse Nervsys\\Core\\Factory;\nuse Nervsys\\Core\\Reflect;\n-class FiberMan extends Factor... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Rename FiberMan to FiberMgr, move to Core/Mgr |
323,346 | 21.07.2022 09:16:25 | -28,800 | 93818e68cf364ec7d11551132ae3ceedb44112b8 | Change OSUnit to OSMgr | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/Caller.php",
"new_path": "Core/Lib/Caller.php",
"diff": "@@ -134,7 +134,7 @@ class Caller extends Factory\n*/\npublic function runAsync(string $cmd): void\n{\n- pclose(popen(OSUnit::new()->setCmd($cmd)->setAsBg()->fetchCmd(), 'rb'));\n+ pclose(popen(O... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change OSUnit to OSMgr |
323,346 | 21.07.2022 09:21:30 | -28,800 | e931f83c15d0f312d106cf7e864aa1b48da1f428 | Move OSMgr from Lib to Mgr | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/Caller.php",
"new_path": "Core/Lib/Caller.php",
"diff": "@@ -23,6 +23,7 @@ namespace Nervsys\\Core\\Lib;\nuse Nervsys\\Core\\Factory;\nuse Nervsys\\Core\\Reflect;\n+use Nervsys\\Core\\Mgr\\OSMgr;\nclass Caller extends Factory\n{\n"
},
{
"chang... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Move OSMgr from Lib to Mgr |
323,346 | 25.07.2022 12:09:17 | -28,800 | 7b3e9560d7ab50bedd9067de986ad1d987ace30b | Remove useless fn | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/OSMgr.php",
"new_path": "Core/Mgr/OSMgr.php",
"diff": "@@ -90,18 +90,6 @@ class OSMgr extends Factory\nreturn $this->lib_os->os_cmd;\n}\n- /**\n- * @param int $return_var\n- *\n- * @return array\n- */\n- public function execCmd(int &$return_var = 0): ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Remove useless fn |
323,346 | 25.07.2022 13:52:07 | -28,800 | 0d025d4245e6ac53ce953778880eb95dbfa9ab13 | Update OSMgr and related classes | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/Caller.php",
"new_path": "Core/Lib/Caller.php",
"diff": "@@ -136,7 +136,7 @@ class Caller extends Factory\n*/\npublic function runAsync(string $cmd): void\n{\n- pclose(popen(OSMgr::new()->setCmd($cmd)->setAsBg()->fetchCmd(), 'rb'));\n+ pclose(popen(OS... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Update OSMgr and related classes |
323,346 | 25.07.2022 14:12:26 | -28,800 | 5b5a934e431db80f59a80c3e13fdfbfe7333b69a | Add build proc command array | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/OSMgr.php",
"new_path": "Core/Mgr/OSMgr.php",
"diff": "@@ -112,4 +112,20 @@ class OSMgr extends Factory\nreturn $command;\n}\n+\n+ /**\n+ * @param string $command\n+ * @param string $separator\n+ *\n+ * @return string[]\n+ */\n+ public function buildP... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add build proc command array |
323,346 | 25.07.2022 18:32:27 | -28,800 | 1899747253cca998baaf0cd7587eff29d0129dd8 | Parse command for proc_open | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/OSMgr.php",
"new_path": "Core/Mgr/OSMgr.php",
"diff": "@@ -119,7 +119,7 @@ class OSMgr extends Factory\n*\n* @return string[]\n*/\n- public function buildProcArray(string $command, string $separator = \"\\n\"): array\n+ public function buildProcCmd(st... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Parse command for proc_open |
323,346 | 25.07.2022 21:02:12 | -28,800 | c82401f279633f98185a726919684d6f6fba339d | Exchange async and await | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -41,7 +41,7 @@ class FiberMgr extends Factory\n}\n/**\n- * Generate async fiber, should always be suspended inside\n+ * Await callable function, generate Fiber instance\n*\n* @param calla... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Exchange async and await |
323,346 | 25.07.2022 21:05:31 | -28,800 | 25e13b756c66fcf576735c8f277edf03963efdcc | Rename go to start | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -112,12 +112,12 @@ class FiberMgr extends Factory\n}\n/**\n- * Resume main fiber process\n+ * Start main fiber process\n*\n* @return void\n* @throws \\Throwable\n*/\n- public function go(... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Rename go to start |
323,346 | 25.07.2022 22:16:07 | -28,800 | 260e0659e1cf1d0f25ac3636b4a3bbb8983aa07b | Fix not all fiber returned result are captured | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -52,40 +52,40 @@ class FiberMgr extends Factory\n*/\npublic function await(callable $callable, array $args = []): \\Fiber\n{\n- $fiber = new \\Fiber($callable);\n+ $await_fiber = new \\Fi... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix not all fiber returned result are captured |
323,346 | 27.07.2022 18:04:24 | -28,800 | 62879393a482634520a24ff1f5bf4fc02a3127c0 | Change select timeout to 200 microseconds | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/ProcMgr.php",
"new_path": "Core/Mgr/ProcMgr.php",
"diff": "@@ -112,7 +112,7 @@ class ProcMgr extends Factory\nwhile (true) {\n$read = [$this->output_list[$proc_idx]];\n- if (0 === (int)stream_select($read, $write, $except, 0, 10)) {\n+ if (0 === (int)... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change select timeout to 200 microseconds |
323,346 | 27.07.2022 18:47:37 | -28,800 | 9e17197a44bc292ae51c3bf39ce302b1743a4341 | Code block changes | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -45,7 +45,7 @@ class SocketMgr extends Factory\npublic array $context_options = [];\nprivate array $event_fn = [\n- 'onAccept' => null,\n+ 'onConnect' => null,\n'onWsHandshake' => null,... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Code block changes |
323,346 | 28.07.2022 15:25:18 | -28,800 | e0e4ced9b758c11e5d635f850392c436e6037eed | Do NOT change param type in FiberMgr | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -90,7 +90,7 @@ class FiberMgr extends Factory\nif (is_callable($callable)) {\n$args = is_array($result) && !empty($result) && !array_is_list($result)\n? parent::buildArgs(Reflect::getCall... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Do NOT change param type in FiberMgr |
323,346 | 28.07.2022 15:29:00 | -28,800 | 75b5b43c131f651377643200a0f970bc91e722bb | Make SocketMgr more easily to use | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -36,12 +36,10 @@ class SocketMgr extends Factory\npublic bool $debug_mode = false;\npublic bool $is_websocket = false;\n- public string $main_id = '';\n+ public string $socket_id = '';\... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Make SocketMgr more easily to use |
323,346 | 28.07.2022 17:02:36 | -28,800 | a875e07fbe2dc8a333ca791dd96262e957c027e8 | Make all functions public in SOcketMgr | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -515,7 +515,7 @@ class SocketMgr extends Factory\n*\n* @return void\n*/\n- private function consoleLog(string $action, string $message): void\n+ public function consoleLog(string $actio... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Make all functions public in SOcketMgr |
323,346 | 28.07.2022 21:32:02 | -28,800 | d3fa654a518bd2f5a33ba4fb621075b68297e442 | Fix callback functions not being called on event | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -248,8 +248,7 @@ class SocketMgr extends Factory\nunset($address, $context, $flags, $server, $errno, $errstr);\n- $this->fiberMgr->async($this->fiberMgr->await([$this, 'serverStart']));... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix callback functions not being called on event |
323,346 | 28.07.2022 23:33:50 | -28,800 | 774ae075adf633e68f01d1fb2db57077e8732c16 | Add websocketStart fn | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -248,55 +248,12 @@ class SocketMgr extends Factory\nunset($address, $context, $flags, $server, $errno, $errstr);\n- $this->serverStart();\n+ $this->is_websocket ? $this->websocketStart(... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add websocketStart fn |
323,346 | 29.07.2022 21:32:00 | -28,800 | 5af28bc5afcb47101f23c161f4c6c36de197d227 | Add websocket related code block | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -38,8 +38,8 @@ class SocketMgr extends Factory\npublic string $socket_id = '';\n+ public array $activities = [];\npublic array $connections = [];\n- public array $active_clients = [];\n... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add websocket related code block |
323,346 | 30.07.2022 11:39:41 | -28,800 | 615bd4bb4034e706fbff8e8fe05f429e563b78bc | Keep going on websocket | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -491,7 +491,7 @@ class SocketMgr extends Factory\n*\n* @return int[]\n*/\n- public function wsGetCodes(string $buff): array\n+ public function wsGetFrameCodes(string $buff): array\n{\n$... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Keep going on websocket |
323,346 | 30.07.2022 12:11:20 | -28,800 | 485f9915e07df676b8f54b914c713a9707806acd | Only process messages which are not empty | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -759,7 +759,7 @@ class SocketMgr extends Factory\n$this->fiberMgr->await([$this, 'read'], [$socket_id]),\nfunction (string $socket_id, string $message): void\n{\n- if (is_callable($this... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Only process messages which are not empty |
323,346 | 30.07.2022 12:26:46 | -28,800 | 920494829a81020167946b5fa6f325b9ab00ddce | Add websocket frame control | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -759,7 +759,33 @@ class SocketMgr extends Factory\n$this->fiberMgr->await([$this, 'read'], [$socket_id]),\nfunction (string $socket_id, string $message): void\n{\n- if ('' !== $message ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add websocket frame control |
323,346 | 30.07.2022 13:38:33 | -28,800 | 3dd84a649a57af18334f2ff857b6c02f30960447 | Change arguments' order | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -369,12 +369,12 @@ class SocketMgr extends Factory\n}\n/**\n- * @param string $message\n* @param string $socket_id\n+ * @param string $message\n*\n* @return void\n*/\n- public function ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Change arguments' order |
323,346 | 30.07.2022 13:49:58 | -28,800 | c5047d5b61621887f4ef8498be2a02950950bbeb | Using Fiber to send message to clients | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -800,7 +800,20 @@ class SocketMgr extends Factory\n}\nif (is_callable($this->event_fn['onSend'])) {\n- $this->fiberMgr->async($this->fiberMgr->await($this->event_fn['onSend']));\n+ $thi... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using Fiber to send message to clients |
323,346 | 30.07.2022 21:09:20 | -28,800 | 06c87e71e4a451a2fb0e8d4ef6e7e51c9546b3d8 | Using property instead of variable for handshakes | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -38,6 +38,7 @@ class SocketMgr extends Factory\npublic string $socket_id = '';\n+ public array $handshakes = [];\npublic array $activities = [];\npublic array $connections = [];\npublic... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using property instead of variable for handshakes |
323,346 | 30.07.2022 22:06:27 | -28,800 | 87e5f516e76316d2b7091ebea4cfe967e8e171dd | Response the first protocol | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -571,9 +571,9 @@ class SocketMgr extends Factory\n$ws_protocol = '';\nif ('' !== $ws_proto) {\n- //Only response the last protocol value\n+ //Only response the first protocol value\nif ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Response the first protocol |
323,346 | 30.07.2022 22:36:37 | -28,800 | bd78d4866b42204102767c3e1faa2b290bbc2b45 | Improve handshake logic | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -594,11 +594,11 @@ class SocketMgr extends Factory\n* @param string $socket_id\n* @param string $header_msg\n*\n- * @return void\n+ * @return string\n* @throws \\ReflectionException\n* ... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Improve handshake logic |
323,346 | 31.07.2022 10:29:47 | -28,800 | b1ec48e334c830b5bbcbe75fae6d280ea502a4dd | Improve read and send logic, add more error track details | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -251,7 +251,8 @@ class SocketMgr extends Factory\n$this->is_websocket ? $this->websocketStart() : $this->serverStart();\n} catch (\\Throwable $throwable) {\n- $this->consoleLog('ERROR',... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Improve read and send logic, add more error track details |
323,346 | 31.07.2022 12:03:10 | -28,800 | 1640ec5ee0acb275b54660aa49acb87f71696b03 | Always console log decoded messages | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -357,8 +357,6 @@ class SocketMgr extends Factory\n}\n$this->activities[$socket_id] = time();\n-\n- $this->consoleLog(__FUNCTION__, $socket_id . ': ' . $message);\n} catch (\\Throwable $... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Always console log decoded messages |
323,346 | 31.07.2022 12:13:12 | -28,800 | 3bd2affd83cf8b8e91010d87fc6f8852504d1b68 | Add more consoleLog entries | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -739,6 +739,8 @@ class SocketMgr extends Factory\n[$data['socket_id'], $this->is_websocket ? $this->wsEncode($data['message']) : $data['message']]\n)\n);\n+\n+ $this->consoleLog('sendTo... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add more consoleLog entries |
323,346 | 31.07.2022 12:20:09 | -28,800 | d0b41f4ce1d8c1f75a5363090afe14c42b59c3b9 | Improve consoleLog calling order | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -479,13 +479,13 @@ class SocketMgr extends Factory\npublic function close(string $socket_id): void\n{\ntry {\n- if (is_callable($this->event_fn['onClose'])) {\n- $this->fiberMgr->async(... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Improve consoleLog calling order |
323,346 | 31.07.2022 12:37:46 | -28,800 | 39d05132098de089f99555a9ba062db4b1d820b0 | Add comments for all callbacks | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -44,12 +44,12 @@ class SocketMgr extends Factory\npublic array $context_options = [];\nprivate array $event_fn = [\n- 'onConnect' => null,\n- 'onWsHandshake' => null,\n- 'onHeartbeat' =... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Add comments for all callbacks |
323,346 | 31.07.2022 15:24:43 | -28,800 | c0d6c38001c3a283a1b0d27fd1d0360da6aaf2e2 | Make FiberMgr more suitable to call a function with empty array returned | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -92,7 +92,9 @@ class FiberMgr extends Factory\n? parent::buildArgs(Reflect::getCallable($callable)->getParameters(), $result)\n: (array)$result;\n- $result = call_user_func_array($callabl... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Make FiberMgr more suitable to call a function with empty array returned |
323,346 | 31.07.2022 15:36:25 | -28,800 | 047f5dbf0756b7c3cd3d8f1bd8f9c89aaf1fb441 | Fix readFrom return data error | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -364,8 +364,8 @@ class SocketMgr extends Factory\nreturn [$socket_id, ''];\n}\n- unset($clients, $client);\n- return [$socket_id, $socket, $message, $fragment];\n+ unset($socket, $fragm... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Fix readFrom return data error |
323,346 | 31.07.2022 15:41:50 | -28,800 | 32583cd26a1559a4833eedf27f1bc7c33dff8a15 | Shorten space padding | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -453,7 +453,7 @@ class SocketMgr extends Factory\n}\necho '[' . date('Y-m-d H:i:s') . ']: '\n- . str_pad(ucfirst($action), 15)\n+ . str_pad(ucfirst($action), 12)\n. strtr($message, [\"\... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Shorten space padding |
323,346 | 03.08.2022 19:38:18 | -28,800 | 63b38ab3af4edcbb2c31d2de52f9f376de598808 | Allow calling internal functions inside NS under CLI | [
{
"change_type": "MODIFY",
"old_path": "Core/Lib/Security.php",
"new_path": "Core/Lib/Security.php",
"diff": "@@ -46,7 +46,7 @@ class Security extends Factory\n* @var \\ReflectionClass $obj\n*/\nforeach ($traits as $name => $obj) {\n- if (str_starts_with($name, NS_NAMESPACE)) {\n+ if (str_starts_wit... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Allow calling internal functions inside NS under CLI |
323,346 | 04.08.2022 13:05:01 | -28,800 | 504a24fa35e74f94d15f98ae0dbf5686ece2daf4 | Try to catch more exceptions inside loop | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -733,6 +733,7 @@ class SocketMgr extends Factory\nfunction (array $messages): void\n{\nwhile (null !== ($data = array_pop($messages))) {\n+ try {\n$this->consoleLog('sendTo', $data['soc... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Try to catch more exceptions inside loop |
323,346 | 04.08.2022 13:39:49 | -28,800 | 07647e61b7e439309d140c7d40f4c5a499d51e4d | Keep the structure of the result data from await fiber | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/FiberMgr.php",
"new_path": "Core/Mgr/FiberMgr.php",
"diff": "@@ -88,16 +88,12 @@ class FiberMgr extends Factory\n$result = $await_fiber->getReturn();\nif (is_callable($callable)) {\n- $args = is_array($result) && !empty($result) && !array_is_list($res... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Keep the structure of the result data from await fiber |
323,346 | 04.08.2022 13:52:22 | -28,800 | 8f75abe1e366c9258c22d305e5e03c7e4ee0588b | Using array object instead of list | [
{
"change_type": "MODIFY",
"old_path": "Core/Mgr/SocketMgr.php",
"new_path": "Core/Mgr/SocketMgr.php",
"diff": "@@ -341,7 +341,7 @@ class SocketMgr extends Factory\n{\nif (!isset($this->connections[$socket_id])) {\nunset($this->activities[$socket_id]);\n- return [$socket_id, ''];\n+ return ['socket_... | PHP | Apache License 2.0 | jerry-shaw/nervsys | Using array object instead of list |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.