javonet-ruby-sdk 2.6.7 → 2.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs2218RuntimeNative.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  15. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetActivationService.dylib +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetJvmRuntimeNative.dylib +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
  18. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/version.txt +1 -1
  19. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs2218RuntimeNative.dylib +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  23. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPhpRuntimeNative.dll +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Configs.dll +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs2218RuntimeNative.dll +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhp848RuntimeNative.dll +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.dll +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  56. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Configs.dll +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  59. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPhpRuntimeNative.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  70. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Plugins.dll +0 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +51 -18
  74. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeInstanceMethodHandler.cjs +1 -1
  75. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeStaticMethodHandler.cjs +1 -1
  76. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/LoadLibraryHandler.cjs +15 -9
  77. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/PassDelegateHandler.cjs +2 -2
  78. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/RegisterForUpdateHandler.cjs +60 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ValueForUpdateHandler.cjs +36 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/interpreter/Interpreter.cjs +11 -33
  81. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandSerializer.cjs +3 -8
  82. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/Receiver.cjs +6 -6
  83. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Activator.cjs +44 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ActivatorDetails.cjs +13 -3
  85. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ConfigRuntimeFactory.cjs +9 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +140 -62
  87. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Javonet.cjs +3 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +9 -9
  89. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/configuration/ConfigSourceResolver.cjs +43 -21
  90. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/ComplexTypeResolver.cjs +84 -34
  91. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +9 -1
  92. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/PassDelegateHandler.d.ts +2 -2
  93. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/RegisterForUpdateHandler.d.ts +17 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ValueForUpdateHandler.d.ts +7 -0
  95. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/interpreter/Interpreter.d.ts +2 -2
  96. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandSerializer.d.ts +3 -3
  97. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/Receiver.d.ts +4 -4
  98. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Activator.d.ts +12 -0
  99. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ActivatorDetails.d.ts +5 -3
  100. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ConfigRuntimeFactory.d.ts +7 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +20 -22
  102. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Javonet.d.ts +2 -1
  103. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/RuntimeContext.d.ts +4 -3
  104. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/configuration/ConfigSourceResolver.d.ts +21 -4
  105. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/ComplexTypeResolver.d.ts +21 -5
  106. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CommandType.d.ts +2 -0
  107. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Primitives.d.ts +5 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CommandType.cjs +3 -1
  109. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Primitives.cjs +201 -0
  110. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
  111. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
  112. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
  113. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  115. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
  116. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
  117. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
  118. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  119. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
  120. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +86 -86
  121. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  122. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
  123. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
  124. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
  125. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  129. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +24 -24
  131. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  132. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
  134. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
  135. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/handler/LoadLibraryHandler.php +56 -21
  136. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/interpreter/Interpreter.php +2 -2
  137. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandDeserializer.php +219 -106
  138. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandSerializer.php +55 -13
  139. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/utils/Command.php +27 -9
  140. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  141. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
  142. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AsOutHandler.py +1 -1
  144. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +0 -2
  145. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +2 -2
  146. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/Handler.py +26 -1
  147. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/LoadLibraryHandler.py +54 -14
  148. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/RegisterForUpdateHandler.py +38 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/ValueForUpdateHandler.py +6 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AddEventListenerHandler.cpython-312.pyc +0 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayReferenceHandler.cpython-312.pyc +0 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsOutHandler.cpython-312.pyc +0 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsRefHandler.cpython-312.pyc +0 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ConvertTypeHandler.cpython-312.pyc +0 -0
  163. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateNullHandler.cpython-312.pyc +0 -0
  165. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  167. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ExceptionHandler.cpython-312.pyc +0 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GenerateLibHandler.cpython-312.pyc +0 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetAsyncOperationResultHandler.cpython-312.pyc +0 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetGlobalFieldHandler.cpython-312.pyc +0 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
  176. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetKwargHandler.cpython-312.pyc +0 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetModuleHandler.cpython-312.pyc +0 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetRefValueHandler.cpython-312.pyc +0 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetResultTypeHandler.cpython-312.pyc +0 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HeartBeatHandler.cpython-312.pyc +0 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericMethodHandler.cpython-312.pyc +0 -0
  189. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericStaticMethodHandler.cpython-312.pyc +0 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.cpython-312.pyc +0 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/OptimizeHandler.cpython-312.pyc +0 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PluginWrapperHandler.cpython-312.pyc +0 -0
  197. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RegisterForUpdateHandler.cpython-312.pyc +0 -0
  198. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  199. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RetrieveArrayHandler.cpython-312.pyc +0 -0
  200. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueForUpdateHandler.cpython-312.pyc +0 -0
  203. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  204. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  205. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  206. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  208. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  209. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  210. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  211. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  212. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  213. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  214. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  215. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  217. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  219. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  220. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/CommandType.py +3 -1
  221. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/LazyModuleLoader.py +8 -11
  222. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  223. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  224. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  225. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  226. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/LazyModuleLoader.cpython-312.pyc +0 -0
  227. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
  228. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  229. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  230. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  231. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/TypesHandler.cpython-312.pyc +0 -0
  232. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.cpython-312.pyc +0 -0
  233. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  234. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  235. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  236. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  237. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/ExceptionSerializer.py +1 -1
  238. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  239. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionThrower.cpython-312.pyc +0 -0
  240. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/JavonetException.cpython-312.pyc +0 -0
  241. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  242. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
  243. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
  244. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  245. data/lib/javonet-ruby-sdk/core/handler/handler.rb +50 -9
  246. data/lib/javonet-ruby-sdk/core/handler/load_library_handler.rb +22 -9
  247. data/lib/javonet-ruby-sdk/core/handler/register_for_update_handler.rb +28 -0
  248. data/lib/javonet-ruby-sdk/core/handler/value_for_update_handler.rb +11 -0
  249. data/lib/javonet-ruby-sdk/sdk/config_runtime_factory.rb +8 -0
  250. data/lib/javonet-ruby-sdk/utils/command_type.rb +6 -0
  251. data/lib/javonet-ruby-sdk/utils/exceptions/exception_serializer.rb +0 -1
  252. metadata +18 -2
@@ -27,29 +27,38 @@ final class LoadLibraryHandler extends AbstractHandler
27
27
  {
28
28
  if ($command->getPayloadSize() < self::REQUIRED_ARGUMENTS_COUNT) {
29
29
  throw new JavonetArgumentsMismatchException(
30
- self::class,
30
+ self::class,
31
31
  self::REQUIRED_ARGUMENTS_COUNT
32
32
  );
33
33
  }
34
34
 
35
35
  $assemblyName = (string) $command->getPayload()[0];
36
+
36
37
  if (!file_exists($assemblyName)) {
37
38
  throw new Exception('File not found: ' . $assemblyName);
38
39
  }
39
40
 
40
- if (in_array($assemblyName, self::$loadedLibraries, true)) {
41
+ // Normalize path first
42
+ $canonicalPath = realpath($assemblyName);
43
+ if ($canonicalPath === false) {
44
+ throw new Exception('Cannot resolve path: ' . $assemblyName);
45
+ }
46
+
47
+ // Already loaded? bail out early
48
+ if (in_array($canonicalPath, self::$loadedLibraries, true)) {
41
49
  return 0;
42
50
  }
43
51
 
44
- if (is_dir($assemblyName)) {
45
- $this->loadDirectory($assemblyName);
46
- } elseif (pathinfo($assemblyName, PATHINFO_EXTENSION) === 'phar') {
47
- $this->loadPharFile($assemblyName);
52
+ // Use canonical path for type detection as well
53
+ if (is_dir($canonicalPath)) {
54
+ $this->loadDirectory($canonicalPath);
55
+ } elseif (pathinfo($canonicalPath, PATHINFO_EXTENSION) === 'phar') {
56
+ $this->loadPharFile($canonicalPath);
48
57
  } else {
49
- $this->loadPhpFile($assemblyName);
58
+ $this->loadPhpFile($canonicalPath);
50
59
  }
51
60
 
52
- self::$loadedLibraries[] = $assemblyName;
61
+ self::$loadedLibraries[] = $canonicalPath;
53
62
  return 0;
54
63
  }
55
64
 
@@ -79,51 +88,69 @@ final class LoadLibraryHandler extends AbstractHandler
79
88
  throw new Exception('PHAR file is not readable: ' . $pharPath);
80
89
  }
81
90
 
91
+ $realPath = realpath($pharPath);
92
+ if ($realPath === false) {
93
+ throw new Exception('Cannot resolve PHAR path: ' . $pharPath);
94
+ }
95
+
82
96
  try {
83
- $phar = new Phar($pharPath);
97
+ $phar = new Phar($realPath);
84
98
 
85
99
  $currentIncludePath = get_include_path();
86
- if (strpos($currentIncludePath, $pharPath) === false) {
87
- set_include_path($currentIncludePath . PATH_SEPARATOR . $pharPath);
88
- $this->loadedClassPaths[] = $pharPath;
100
+ if (strpos($currentIncludePath, $realPath) === false) {
101
+ set_include_path($currentIncludePath . PATH_SEPARATOR . $realPath);
102
+ $this->loadedClassPaths[] = $realPath;
89
103
  }
90
104
 
91
105
  if (isset($phar['bootstrap.php'])) {
92
- include_once 'phar://' . $pharPath . '/bootstrap.php';
106
+ include_once 'phar://' . $realPath . '/bootstrap.php';
93
107
  }
94
108
  } catch (Exception $e) {
95
109
  throw new Exception(sprintf('Error loading PHAR file %s : %s', $pharPath, $e->getMessage()));
96
110
  }
97
111
  }
98
112
 
113
+ private static array $loadedPhpFiles = []; // optional extra safeguard
114
+
99
115
  private function loadPhpFile(string $filePath): void
100
116
  {
101
117
  if (!is_readable($filePath)) {
102
118
  throw new Exception('PHP file is not readable: ' . $filePath);
103
119
  }
104
120
 
105
- $fileExtension = pathinfo($filePath, PATHINFO_EXTENSION);
121
+ $realPath = realpath($filePath);
122
+ if ($realPath === false) {
123
+ throw new Exception('Cannot resolve PHP file path: ' . $filePath);
124
+ }
125
+
126
+ $fileExtension = pathinfo($realPath, PATHINFO_EXTENSION);
106
127
  if (!in_array($fileExtension, ['php', 'inc'], true)) {
107
- throw new Exception('File is not a valid PHP file: ' . $filePath);
128
+ throw new Exception('File is not a valid PHP file: ' . $realPath);
108
129
  }
109
130
 
110
- $code = file_get_contents($filePath);
131
+ // OPTIONAL: skip if we already loaded this exact file
132
+ if (in_array($realPath, self::$loadedPhpFiles, true)) {
133
+ return;
134
+ }
135
+
136
+ $code = file_get_contents($realPath);
111
137
  if ($code === false) {
112
- throw new Exception(sprintf('Failed to read php file: %s', $filePath));
138
+ throw new Exception(sprintf('Failed to read php file: %s', $realPath));
113
139
  }
114
140
 
115
141
  try {
116
142
  token_get_all($code, TOKEN_PARSE);
117
143
  } catch (ParseError $e) {
118
- throw new Exception(sprintf('PHP syntax error in file %s: %s', $filePath, $e->getMessage()));
144
+ throw new Exception(sprintf('PHP syntax error in file %s: %s', $realPath, $e->getMessage()));
119
145
  }
120
146
 
121
147
  $lastError = error_get_last();
122
148
  if ($lastError && $lastError['type'] === E_PARSE) {
123
- throw new Exception(sprintf('PHP syntax error in file %s: %s', $filePath, $lastError['message']));
149
+ throw new Exception(sprintf('PHP syntax error in file %s: %s', $realPath, $lastError['message']));
124
150
  }
125
151
 
126
- include_once $filePath;
152
+ include_once $realPath;
153
+ self::$loadedPhpFiles[] = $realPath;
127
154
  }
128
155
 
129
156
  private function autoloadPhpFilesFromDirectory(string $directory): void
@@ -134,7 +161,15 @@ final class LoadLibraryHandler extends AbstractHandler
134
161
 
135
162
  foreach ($iterator as $file) {
136
163
  if ($file->isFile() && $file->getExtension() === 'php') {
137
- include_once $file->getPathname();
164
+ $realPath = $file->getRealPath() ?: $file->getPathname();
165
+
166
+ // Optional: same guard as loadPhpFile
167
+ if (in_array($realPath, self::$loadedPhpFiles, true)) {
168
+ continue;
169
+ }
170
+
171
+ include_once $realPath;
172
+ self::$loadedPhpFiles[] = $realPath;
138
173
  }
139
174
  }
140
175
  }
@@ -44,7 +44,7 @@ final class Interpreter
44
44
  return $responseByteArray;
45
45
  }
46
46
 
47
- $response = (new CommandDeserializer($responseByteArray))->deserialize();
47
+ $response = CommandDeserializer::deserialize($responseByteArray);
48
48
  if ($this->debugMode === 'TRUE') {
49
49
  echo 'Received command: ' . $response;
50
50
  MessageHelper::getInstance()->sendMessageToAppInsights('ReceivedCommand', $response->toString());
@@ -89,7 +89,7 @@ final class Interpreter
89
89
 
90
90
  public function process(array $byteArray): CommandInterface
91
91
  {
92
- $receivedCommand = (new CommandDeserializer($byteArray))->deserialize();
92
+ $receivedCommand = CommandDeserializer::deserialize($byteArray);
93
93
  if ($this->debugMode === 'TRUE') {
94
94
  echo 'Received command: ' . $receivedCommand;
95
95
  MessageHelper::getInstance()->sendMessageToAppInsights('ReceivedCommand', $receivedCommand->toString());
@@ -14,81 +14,90 @@ use utils\type\JType;
14
14
 
15
15
  final class CommandDeserializer
16
16
  {
17
- private int $position;
18
- private Command $command;
19
- private array $buffer;
20
-
21
- public function __construct(
22
- array $buffer
23
- ) {
24
- $this->command = new Command(
25
- new RuntimeName($buffer[0]),
26
- new CommandType($buffer[10])
27
- );
28
- $this->buffer = $buffer;
29
- $this->position = 11;
30
- }
31
-
32
- private function isNotEnd(): bool
17
+ private function __construct()
33
18
  {
34
- return $this->position < count($this->buffer);
35
19
  }
36
20
 
37
- public function deserialize(): CommandInterface
21
+ /**
22
+ * @param int[] $buffer
23
+ */
24
+ public static function deserialize(array $buffer): CommandInterface
38
25
  {
39
- while ($this->isNotEnd()) {
40
- $this->command = $this->command->addArgToPayload($this->readObject($this->buffer[$this->position]));
26
+ $position = 11;
27
+ $bufferLength = count($buffer);
28
+
29
+ $runtimeName = new RuntimeName($buffer[0]);
30
+ $commandType = new CommandType($buffer[10]);
31
+ $payload = [];
32
+
33
+ while ($position < $bufferLength) {
34
+ $payload[] = self::readObject($buffer, $position);
41
35
  }
42
36
 
43
- return $this->command;
37
+ // Single Command instance created once with full payload
38
+ return new Command($runtimeName, $commandType, $payload);
44
39
  }
45
40
 
46
- private function readObject(int $typeNum)
41
+ /**
42
+ * @param int[] $buffer
43
+ * @return mixed
44
+ */
45
+ private static function readObject(array $buffer, int &$position)
47
46
  {
48
- $typeByte = new JType($typeNum);
47
+ $typeByte = new JType($buffer[$position]);
49
48
 
50
49
  switch ($typeByte->getValue()) {
51
50
  case JType::JAVONET_COMMAND:
52
- return $this->readCommand();
51
+ return self::readCommand($buffer, $position);
53
52
  case JType::JAVONET_STRING:
54
- return $this->readString();
53
+ return self::readString($buffer, $position);
55
54
  case JType::JAVONET_INTEGER:
56
- return $this->readInt();
55
+ return self::readInt($buffer, $position);
57
56
  case JType::JAVONET_BOOLEAN:
58
- return $this->readBool();
57
+ return self::readBool($buffer, $position);
59
58
  case JType::JAVONET_FLOAT:
60
- return $this->readFloat();
59
+ return self::readFloat($buffer, $position);
61
60
  case JType::JAVONET_BYTE:
62
- return $this->readByte();
61
+ return self::readByte($buffer, $position);
63
62
  case JType::JAVONET_CHAR:
64
- return $this->readChar();
63
+ return self::readChar($buffer, $position);
65
64
  case JType::JAVONET_LONG:
66
- return $this->readLong();
65
+ return self::readLong($buffer, $position);
67
66
  case JType::JAVONET_DOUBLE:
68
- return $this->readDouble();
67
+ return self::readDouble($buffer, $position);
69
68
  case JType::JAVONET_UNSIGNED_LONG_LONG:
70
- return $this->readUnsignedLong();
69
+ return self::readUnsignedLong($buffer, $position);
71
70
  case JType::JAVONET_UNSIGNED_INTEGER:
72
- return $this->readUnsignedInteger();
71
+ return self::readUnsignedInteger($buffer, $position);
73
72
  case JType::JAVONET_NULL:
74
- return $this->readNull();
73
+ return self::readNull($buffer, $position);
75
74
  default:
76
- throw new TypeByteNotSupportedException($typeNum);
75
+ throw new TypeByteNotSupportedException($buffer[$position]);
77
76
  }
78
77
  }
79
78
 
80
- protected function readCommand(): CommandInterface
79
+ /**
80
+ * @param int[] $buffer
81
+ */
82
+ protected static function readCommand(array $buffer, int &$position): CommandInterface
81
83
  {
82
- $p = $this->position;
83
- $numberOfElementsInPayload = TypeDeserializer::deserializeInt(array_slice($this->buffer, $p + 1, 4));
84
- $runtime = $this->buffer[$p + 5];
85
- $commandType = $this->buffer[$p + 6];
84
+ $p = $position;
85
+
86
+ $numberOfElementsInPayload = TypeDeserializer::deserializeInt([
87
+ $buffer[$p + 1],
88
+ $buffer[$p + 2],
89
+ $buffer[$p + 3],
90
+ $buffer[$p + 4],
91
+ ]);
92
+
93
+ $runtime = $buffer[$p + 5];
94
+ $commandType = $buffer[$p + 6];
86
95
 
87
- $this->position += 7;
96
+ $position += 7;
88
97
 
89
98
  $payload = [];
90
99
  for ($i = 0; $i < $numberOfElementsInPayload; $i++) {
91
- $payload[$i] = $this->readObject($this->buffer[$this->position]);
100
+ $payload[$i] = self::readObject($buffer, $position);
92
101
  }
93
102
 
94
103
  return new Command(
@@ -98,114 +107,218 @@ final class CommandDeserializer
98
107
  );
99
108
  }
100
109
 
101
- private function readString(): string
110
+ /**
111
+ * @param int[] $buffer
112
+ */
113
+ private static function readString(array $buffer, int &$position): string
102
114
  {
103
- $p = $this->position;
104
- $stringEncodingMode = new StringEncodingMode($this->buffer[$p + 1]);
105
- $size = TypeDeserializer::deserializeInt(array_slice($this->buffer, $p + 2, 4));
106
- $this->position += 6;
107
- $p = $this->position;
108
- $this->position += $size;
109
-
110
- return TypeDeserializer::deserializeString($stringEncodingMode, array_slice($this->buffer, $p, $size));
115
+ $p = $position;
116
+
117
+ $stringEncodingMode = new StringEncodingMode($buffer[$p + 1]);
118
+
119
+ $size = TypeDeserializer::deserializeInt([
120
+ $buffer[$p + 2],
121
+ $buffer[$p + 3],
122
+ $buffer[$p + 4],
123
+ $buffer[$p + 5],
124
+ ]);
125
+
126
+ $position += 6;
127
+ $p = $position;
128
+ $position += $size;
129
+
130
+ // For strings, size can be large, so array_slice is acceptable here.
131
+ $bytes = array_slice($buffer, $p, $size);
132
+
133
+ return TypeDeserializer::deserializeString($stringEncodingMode, $bytes);
111
134
  }
112
135
 
113
- private function readInt(): int
136
+ /**
137
+ * @param int[] $buffer
138
+ */
139
+ private static function readInt(array $buffer, int &$position): int
114
140
  {
115
141
  $size = 4;
116
- $this->position += 2;
117
- $p = $this->position;
118
- $this->position += $size;
119
-
120
- return TypeDeserializer::deserializeInt(array_slice($this->buffer, $p, $size));
142
+ $position += 2;
143
+ $p = $position;
144
+ $position += $size;
145
+
146
+ $bytes = [
147
+ $buffer[$p],
148
+ $buffer[$p + 1],
149
+ $buffer[$p + 2],
150
+ $buffer[$p + 3],
151
+ ];
152
+
153
+ return TypeDeserializer::deserializeInt($bytes);
121
154
  }
122
155
 
123
- private function readBool(): bool
156
+ /**
157
+ * @param int[] $buffer
158
+ */
159
+ private static function readBool(array $buffer, int &$position): bool
124
160
  {
125
161
  $size = 1;
126
- $this->position += 2;
127
- $p = $this->position;
128
- $this->position += $size;
162
+ $position += 2;
163
+ $p = $position;
164
+ $position += $size;
165
+
166
+ // Keep passing array to match existing TypeDeserializer signature
167
+ $bytes = [$buffer[$p]];
129
168
 
130
- return TypeDeserializer::deserializeBool(array_slice($this->buffer, $p, $size));
169
+ return TypeDeserializer::deserializeBool($bytes);
131
170
  }
132
171
 
133
- private function readFloat(): float
172
+ /**
173
+ * @param int[] $buffer
174
+ */
175
+ private static function readFloat(array $buffer, int &$position): float
134
176
  {
135
177
  $size = 4;
136
- $this->position += 2;
137
- $p = $this->position;
138
- $this->position += $size;
139
-
140
- return TypeDeserializer::deserializeFloat(array_slice($this->buffer, $p, $size));
178
+ $position += 2;
179
+ $p = $position;
180
+ $position += $size;
181
+
182
+ $bytes = [
183
+ $buffer[$p],
184
+ $buffer[$p + 1],
185
+ $buffer[$p + 2],
186
+ $buffer[$p + 3],
187
+ ];
188
+
189
+ return TypeDeserializer::deserializeFloat($bytes);
141
190
  }
142
191
 
143
- private function readByte(): int
192
+ /**
193
+ * @param int[] $buffer
194
+ */
195
+ private static function readByte(array $buffer, int &$position): int
144
196
  {
145
197
  $size = 1;
146
- $this->position += 2;
147
- $p = $this->position;
148
- $this->position += $size;
198
+ $position += 2;
199
+ $p = $position;
200
+ $position += $size;
149
201
 
150
- return TypeDeserializer::deserializeByte($this->buffer[$p]);
202
+ return TypeDeserializer::deserializeByte($buffer[$p]);
151
203
  }
152
204
 
153
- private function readChar(): string
205
+ /**
206
+ * @param int[] $buffer
207
+ */
208
+ private static function readChar(array $buffer, int &$position): string
154
209
  {
155
210
  $size = 1;
156
- $this->position += 2;
157
- $p = $this->position;
158
- $this->position += $size;
211
+ $position += 2;
212
+ $p = $position;
213
+ $position += $size;
159
214
 
160
- return TypeDeserializer::deserializeChar($this->buffer[$p]);
215
+ return TypeDeserializer::deserializeChar($buffer[$p]);
161
216
  }
162
217
 
163
- private function readLong(): int
218
+ /**
219
+ * @param int[] $buffer
220
+ */
221
+ private static function readLong(array $buffer, int &$position): int
164
222
  {
165
223
  $size = 8;
166
- $this->position += 2;
167
- $p = $this->position;
168
- $this->position += $size;
169
-
170
- return TypeDeserializer::deserializeLong(array_slice($this->buffer, $p, $size));
224
+ $position += 2;
225
+ $p = $position;
226
+ $position += $size;
227
+
228
+ $bytes = [
229
+ $buffer[$p],
230
+ $buffer[$p + 1],
231
+ $buffer[$p + 2],
232
+ $buffer[$p + 3],
233
+ $buffer[$p + 4],
234
+ $buffer[$p + 5],
235
+ $buffer[$p + 6],
236
+ $buffer[$p + 7],
237
+ ];
238
+
239
+ return TypeDeserializer::deserializeLong($bytes);
171
240
  }
172
241
 
173
- private function readDouble(): float
242
+ /**
243
+ * @param int[] $buffer
244
+ */
245
+ private static function readDouble(array $buffer, int &$position): float
174
246
  {
175
247
  $size = 8;
176
- $this->position += 2;
177
- $p = $this->position;
178
- $this->position += $size;
179
-
180
- return TypeDeserializer::deserializeDouble(array_slice($this->buffer, $p, $size));
248
+ $position += 2;
249
+ $p = $position;
250
+ $position += $size;
251
+
252
+ $bytes = [
253
+ $buffer[$p],
254
+ $buffer[$p + 1],
255
+ $buffer[$p + 2],
256
+ $buffer[$p + 3],
257
+ $buffer[$p + 4],
258
+ $buffer[$p + 5],
259
+ $buffer[$p + 6],
260
+ $buffer[$p + 7],
261
+ ];
262
+
263
+ return TypeDeserializer::deserializeDouble($bytes);
181
264
  }
182
265
 
183
- private function readUnsignedLong(): int
266
+ /**
267
+ * @param int[] $buffer
268
+ */
269
+ private static function readUnsignedLong(array $buffer, int &$position): int
184
270
  {
185
271
  $size = 8;
186
- $this->position += 2;
187
- $p = $this->position;
188
- $this->position += $size;
189
-
190
- return TypeDeserializer::deserializeLong(array_slice($this->buffer, $p, $size));
272
+ $position += 2;
273
+ $p = $position;
274
+ $position += $size;
275
+
276
+ $bytes = [
277
+ $buffer[$p],
278
+ $buffer[$p + 1],
279
+ $buffer[$p + 2],
280
+ $buffer[$p + 3],
281
+ $buffer[$p + 4],
282
+ $buffer[$p + 5],
283
+ $buffer[$p + 6],
284
+ $buffer[$p + 7],
285
+ ];
286
+
287
+ return TypeDeserializer::deserializeLong($bytes);
191
288
  }
192
289
 
193
- private function readUnsignedInteger(): int
290
+ /**
291
+ * @param int[] $buffer
292
+ */
293
+ private static function readUnsignedInteger(array $buffer, int &$position): int
194
294
  {
195
295
  $size = 4;
196
- $this->position += 2;
197
- $p = $this->position;
198
- $this->position += $size;
199
-
200
- return TypeDeserializer::deserializeInt(array_slice($this->buffer, $p, $size));
296
+ $position += 2;
297
+ $p = $position;
298
+ $position += $size;
299
+
300
+ $bytes = [
301
+ $buffer[$p],
302
+ $buffer[$p + 1],
303
+ $buffer[$p + 2],
304
+ $buffer[$p + 3],
305
+ ];
306
+
307
+ return TypeDeserializer::deserializeInt($bytes);
201
308
  }
202
309
 
203
- private function readNull()
310
+ /**
311
+ * @param int[] $buffer
312
+ * @return mixed
313
+ */
314
+ private static function readNull(array $buffer, int &$position)
204
315
  {
205
316
  $size = 1;
206
- $this->position += 2;
207
- $this->position += $size;
317
+ $position += 2;
318
+ $position += $size;
208
319
 
320
+ // Current TypeDeserializer::deserializeNull() in your PHP version
321
+ // takes no args; keep that behavior.
209
322
  return TypeDeserializer::deserializeNull();
210
323
  }
211
324
  }