wp-studio 1.7.8-beta2 → 1.7.8-beta4

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 (312) hide show
  1. package/README.md +54 -1
  2. package/assets/demo.gif +0 -0
  3. package/dist/cli/{_events-BRGCap7g.mjs → _events-C2dFSpKE.mjs} +2 -2
  4. package/dist/cli/{certificate-manager-Dd4zv2_k.mjs → certificate-manager-BMngpL-s.mjs} +12 -4
  5. package/dist/cli/{index-9Oz-0bqF.mjs → index-CkFXAp-n.mjs} +5 -5
  6. package/dist/cli/{index-CT4S2538.mjs → index-odShRBgM.mjs} +171 -117
  7. package/dist/cli/{login-D4E3GoXe.mjs → login-BeT1uKwW.mjs} +2 -2
  8. package/dist/cli/{logout-DE-RoshK.mjs → logout-BFQJBJD0.mjs} +2 -2
  9. package/dist/cli/main.mjs +3 -2
  10. package/dist/cli/proxy-daemon.mjs +1 -1
  11. package/dist/cli/{resume-DLoXmzNG.mjs → resume-D_K0QEl5.mjs} +1 -1
  12. package/dist/cli/{set-B8YYUENH.mjs → set-C5l116L7.mjs} +2 -2
  13. package/dist/cli/{set-B0L-QiXT.mjs → set-DzcR6sFr.mjs} +2 -2
  14. package/dist/cli/{status-DEOAA0yx.mjs → status-CbXnAskz.mjs} +1 -1
  15. package/dist/cli/{wp-CobSX6C6.mjs → wp-CUKyZNTP.mjs} +1 -1
  16. package/dist/cli/wp-files/latest/available-site-translations.json +1 -1
  17. package/dist/cli/wp-files/latest/languages/admin-de_DE.l10n.php +2 -2
  18. package/dist/cli/wp-files/latest/languages/admin-network-de_DE.l10n.php +1 -1
  19. package/dist/cli/wp-files/latest/languages/admin-pl_PL.l10n.php +2 -2
  20. package/dist/cli/wp-files/latest/languages/de_DE-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
  21. package/dist/cli/wp-files/latest/languages/de_DE-0ce75ad2f775d1cac9696967d484808c.json +1 -1
  22. package/dist/cli/wp-files/latest/languages/de_DE-0eebe503220d4a00341eb011b92769b4.json +1 -1
  23. package/dist/cli/wp-files/latest/languages/de_DE-17179a5f2930647c89151e365f843b6e.json +1 -1
  24. package/dist/cli/wp-files/latest/languages/de_DE-1780a2033cf98d69ce13c2e5c8510004.json +1 -1
  25. package/dist/cli/wp-files/latest/languages/de_DE-1a0cd6a7128913b15c1a10dd68951869.json +1 -1
  26. package/dist/cli/wp-files/latest/languages/de_DE-1bba9045bb07c89671c88a3f328548e8.json +1 -1
  27. package/dist/cli/wp-files/latest/languages/de_DE-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
  28. package/dist/cli/wp-files/latest/languages/de_DE-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
  29. package/dist/cli/wp-files/latest/languages/de_DE-2617ce121227a46077ede6c69aa9fcb5.json +1 -1
  30. package/dist/cli/wp-files/latest/languages/de_DE-270d72d1cff17227d37f3244759cbecb.json +1 -1
  31. package/dist/cli/wp-files/latest/languages/de_DE-28b3c3d595952907e08d98287077426c.json +1 -1
  32. package/dist/cli/wp-files/latest/languages/de_DE-2b390f85a3048c5b4255fb45960b6514.json +1 -1
  33. package/dist/cli/wp-files/latest/languages/de_DE-2c5d274ea625dd91556554ad82901529.json +1 -1
  34. package/dist/cli/wp-files/latest/languages/de_DE-320f4ad9792aaa6dedb1e71cbdf85d57.json +1 -1
  35. package/dist/cli/wp-files/latest/languages/de_DE-440127dd25bde48a531ded36f33e927b.json +1 -1
  36. package/dist/cli/wp-files/latest/languages/de_DE-49c6d4acf36cf3aca9f0b2a77617304f.json +1 -1
  37. package/dist/cli/wp-files/latest/languages/de_DE-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
  38. package/dist/cli/wp-files/latest/languages/de_DE-4bfa11da57ff2600004bb500368247f4.json +1 -1
  39. package/dist/cli/wp-files/latest/languages/de_DE-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
  40. package/dist/cli/wp-files/latest/languages/de_DE-5251f7623766a714c8207c7edb938628.json +1 -1
  41. package/dist/cli/wp-files/latest/languages/de_DE-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
  42. package/dist/cli/wp-files/latest/languages/de_DE-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
  43. package/dist/cli/wp-files/latest/languages/de_DE-6025add6bde16aaeb12787d250f9b414.json +1 -1
  44. package/dist/cli/wp-files/latest/languages/de_DE-60d06fac6f98e8e8f0ec5a945738b660.json +1 -1
  45. package/dist/cli/wp-files/latest/languages/de_DE-68f2cec7514bf8563c723a4d675fcfe6.json +1 -1
  46. package/dist/cli/wp-files/latest/languages/de_DE-7233008897033de5ee0d14f86a42a65a.json +1 -1
  47. package/dist/cli/wp-files/latest/languages/de_DE-7289286ed59e90a8f36ae797df62220b.json +1 -1
  48. package/dist/cli/wp-files/latest/languages/de_DE-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
  49. package/dist/cli/wp-files/latest/languages/de_DE-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
  50. package/dist/cli/wp-files/latest/languages/de_DE-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
  51. package/dist/cli/wp-files/latest/languages/de_DE-7c90cd4398ee2d9d3628c387a87a70e5.json +1 -1
  52. package/dist/cli/wp-files/latest/languages/de_DE-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
  53. package/dist/cli/wp-files/latest/languages/de_DE-7f13c36c641b114bf18cd0bcc9ecc7e0.json +1 -1
  54. package/dist/cli/wp-files/latest/languages/de_DE-803bf1ce2131e13efc590c1bc47851fc.json +1 -1
  55. package/dist/cli/wp-files/latest/languages/de_DE-81c889563f09dd13de1701135dc62941.json +1 -1
  56. package/dist/cli/wp-files/latest/languages/de_DE-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
  57. package/dist/cli/wp-files/latest/languages/de_DE-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
  58. package/dist/cli/wp-files/latest/languages/de_DE-8860e58c20c6a2ab5876a0f07be43bd9.json +1 -1
  59. package/dist/cli/wp-files/latest/languages/de_DE-93882e8f9976382d7f724ac595ed7151.json +1 -1
  60. package/dist/cli/wp-files/latest/languages/de_DE-947c76bb5095da30e16668eec15406b2.json +1 -1
  61. package/dist/cli/wp-files/latest/languages/de_DE-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
  62. package/dist/cli/wp-files/latest/languages/de_DE-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
  63. package/dist/cli/wp-files/latest/languages/de_DE-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
  64. package/dist/cli/wp-files/latest/languages/de_DE-a25d1cc7bf7ca0b4e114f6bea64943f4.json +1 -1
  65. package/dist/cli/wp-files/latest/languages/de_DE-a2796e57f680e25d84c4b352ee6d7280.json +1 -1
  66. package/dist/cli/wp-files/latest/languages/de_DE-a9dc201dcd011fe71849743133052619.json +1 -1
  67. package/dist/cli/wp-files/latest/languages/de_DE-aabfce98c410957228848dc581e3c420.json +1 -1
  68. package/dist/cli/wp-files/latest/languages/de_DE-ac23eee47530ac63a1178c827db28087.json +1 -1
  69. package/dist/cli/wp-files/latest/languages/de_DE-bf0f094965d3d4a95b47babcb35fc136.json +1 -1
  70. package/dist/cli/wp-files/latest/languages/de_DE-bf23b24175490c2e46aaf92ff6a0c70f.json +1 -1
  71. package/dist/cli/wp-files/latest/languages/de_DE-c31d5f185753910c14afebc6deb2ce24.json +1 -1
  72. package/dist/cli/wp-files/latest/languages/de_DE-ca28138671823450e87dfd354f7afc6b.json +1 -1
  73. package/dist/cli/wp-files/latest/languages/de_DE-daeb084aab42199d26393a56c3465bc0.json +1 -1
  74. package/dist/cli/wp-files/latest/languages/de_DE-e2791ba830489d23043be8650a22a22b.json +1 -1
  75. package/dist/cli/wp-files/latest/languages/de_DE-e2e4c4b80f3adf2c70b431bfdb1b4872.json +1 -1
  76. package/dist/cli/wp-files/latest/languages/de_DE-e53526243551a102928735ec9eed4edf.json +1 -1
  77. package/dist/cli/wp-files/latest/languages/de_DE-f575f481034e90e21d832e415fd95fcf.json +1 -1
  78. package/dist/cli/wp-files/latest/languages/de_DE-f70806bf0c7d62f2908bd5a1c3fe4efc.json +1 -1
  79. package/dist/cli/wp-files/latest/languages/de_DE-f8f49d9fc4a9cf7d78ec99285417bd9c.json +1 -1
  80. package/dist/cli/wp-files/latest/languages/de_DE.l10n.php +27 -27
  81. package/dist/cli/wp-files/latest/languages/pl_PL-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
  82. package/dist/cli/wp-files/latest/languages/pl_PL-0eebe503220d4a00341eb011b92769b4.json +1 -1
  83. package/dist/cli/wp-files/latest/languages/pl_PL-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
  84. package/dist/cli/wp-files/latest/languages/pl_PL-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
  85. package/dist/cli/wp-files/latest/languages/pl_PL-2b390f85a3048c5b4255fb45960b6514.json +1 -1
  86. package/dist/cli/wp-files/latest/languages/pl_PL-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
  87. package/dist/cli/wp-files/latest/languages/pl_PL-4bfa11da57ff2600004bb500368247f4.json +1 -1
  88. package/dist/cli/wp-files/latest/languages/pl_PL-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
  89. package/dist/cli/wp-files/latest/languages/pl_PL-5251f7623766a714c8207c7edb938628.json +1 -1
  90. package/dist/cli/wp-files/latest/languages/pl_PL-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
  91. package/dist/cli/wp-files/latest/languages/pl_PL-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
  92. package/dist/cli/wp-files/latest/languages/pl_PL-6025add6bde16aaeb12787d250f9b414.json +1 -1
  93. package/dist/cli/wp-files/latest/languages/pl_PL-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
  94. package/dist/cli/wp-files/latest/languages/pl_PL-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
  95. package/dist/cli/wp-files/latest/languages/pl_PL-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
  96. package/dist/cli/wp-files/latest/languages/pl_PL-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
  97. package/dist/cli/wp-files/latest/languages/pl_PL-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
  98. package/dist/cli/wp-files/latest/languages/pl_PL-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
  99. package/dist/cli/wp-files/latest/languages/pl_PL-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
  100. package/dist/cli/wp-files/latest/languages/pl_PL-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
  101. package/dist/cli/wp-files/latest/languages/pl_PL-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
  102. package/dist/cli/wp-files/latest/languages/pl_PL-a9dc201dcd011fe71849743133052619.json +1 -1
  103. package/dist/cli/wp-files/latest/languages/pl_PL-aabfce98c410957228848dc581e3c420.json +1 -1
  104. package/dist/cli/wp-files/latest/languages/pl_PL-ca28138671823450e87dfd354f7afc6b.json +1 -1
  105. package/dist/cli/wp-files/latest/languages/pl_PL-e2e4c4b80f3adf2c70b431bfdb1b4872.json +1 -1
  106. package/dist/cli/wp-files/sqlite-command/composer.json +4 -3
  107. package/dist/cli/wp-files/sqlite-command/composer.lock +132 -80
  108. package/dist/cli/wp-files/sqlite-command/vendor/autoload.php +1 -1
  109. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_classmap.php +58 -70
  110. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_namespaces.php +1 -0
  111. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_psr4.php +1 -1
  112. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_real.php +5 -5
  113. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_static.php +78 -80
  114. package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.json +104 -49
  115. package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.php +29 -16
  116. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/CHANGELOG.md +103 -0
  117. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/Comparator.php +62 -0
  118. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/DateComparator.php +50 -0
  119. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/NumberComparator.php +78 -0
  120. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/AccessDeniedException.php +19 -0
  121. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +19 -0
  122. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Finder.php +851 -0
  123. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Gitignore.php +91 -0
  124. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Glob.php +116 -0
  125. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/CustomFilterIterator.php +61 -0
  126. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +58 -0
  127. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +48 -0
  128. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +110 -0
  129. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +51 -0
  130. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +58 -0
  131. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +45 -0
  132. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/LazyIterator.php +32 -0
  133. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +107 -0
  134. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/PathFilterIterator.php +56 -0
  135. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +134 -0
  136. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +57 -0
  137. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SortableIterator.php +115 -0
  138. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +173 -0
  139. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/LICENSE +19 -0
  140. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/README.md +14 -0
  141. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/SplFileInfo.php +80 -0
  142. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/composer.json +31 -0
  143. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/.gitattributes +8 -0
  144. package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/LICENSE +1 -1
  145. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/README.md +76 -0
  146. package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/composer.json +6 -16
  147. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/src/Mustache/Autoloader.php +88 -0
  148. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/AbstractCache.php +7 -15
  149. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/FilesystemCache.php +15 -20
  150. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/NoopCache.php +4 -8
  151. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache.php +7 -10
  152. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Compiler.php +87 -144
  153. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Context.php +19 -23
  154. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Engine.php +134 -251
  155. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/InvalidArgumentException.php +2 -6
  156. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/LogicException.php +2 -6
  157. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/RuntimeException.php +2 -6
  158. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/SyntaxException.php +8 -7
  159. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownFilterException.php +7 -7
  160. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownHelperException.php +7 -7
  161. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownTemplateException.php +7 -7
  162. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception.php +5 -4
  163. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/HelperCollection.php +17 -22
  164. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/LambdaHelper.php +8 -28
  165. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ArrayLoader.php +9 -12
  166. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/CascadingLoader.php +15 -18
  167. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/FilesystemLoader.php +18 -24
  168. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/InlineLoader.php +13 -19
  169. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/MutableLoader.php +7 -4
  170. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ProductionFilesystemLoader.php +16 -23
  171. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/StringLoader.php +4 -8
  172. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader.php +7 -8
  173. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/AbstractLogger.php +26 -22
  174. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/StreamLogger.php +20 -25
  175. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger.php +37 -13
  176. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Parser.php +93 -100
  177. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source/FilesystemSource.php +7 -11
  178. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source.php +5 -4
  179. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Template.php +32 -39
  180. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Tokenizer.php +29 -33
  181. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.actrc +3 -0
  182. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.gitattributes +6 -0
  183. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.mailmap +234 -0
  184. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/README.md +4 -4
  185. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/VERSION +1 -1
  186. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/CHANGELOG.md +0 -65
  187. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/README.md +1 -2
  188. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem +372 -315
  189. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem.sha256 +1 -1
  190. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/composer.json +5 -7
  191. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Iri.php +18 -20
  192. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php +1 -1
  193. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Response/Headers.php +1 -1
  194. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Curl.php +1 -5
  195. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Fsockopen.php +0 -2
  196. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php +0 -12
  197. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/FilteredIterator.php +2 -2
  198. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/composer.json +13 -30
  199. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/dependencies.yml +6 -0
  200. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/manifest.json +1 -1
  201. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Autoloader.php +2 -4
  202. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php +1 -10
  203. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/CheckRoot.php +2 -20
  204. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/DefineProtectedCommands.php +3 -3
  205. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeFrameworkAutoloader.php +4 -3
  206. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php +3 -4
  207. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeContexts.php +0 -3
  208. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeLogger.php +1 -1
  209. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php +3 -6
  210. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/{RegisterShutdownHandler.php → LoadDispatcher.php} +4 -6
  211. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadRequiredCommand.php +5 -9
  212. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadUtilityFunctions.php +0 -1
  213. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Completions.php +6 -149
  214. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Configurator.php +49 -202
  215. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php +21 -113
  216. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Auto.php +1 -1
  217. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Cli.php +1 -0
  218. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Frontend.php +1 -0
  219. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php +26 -63
  220. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php +9 -19
  221. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php +19 -284
  222. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php +5 -17
  223. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Exception/NonExistentKeyException.php +3 -6
  224. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Extractor.php +54 -30
  225. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Base.php +3 -7
  226. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Comment.php +2 -4
  227. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Post.php +3 -8
  228. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Signup.php +1 -3
  229. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Site.php +4 -12
  230. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/User.php +1 -3
  231. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/FileCache.php +33 -135
  232. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Formatter.php +57 -221
  233. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Inflector.php +4 -4
  234. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/CSV.php +1 -6
  235. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Query.php +1 -3
  236. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Table.php +1 -7
  237. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Transform.php +0 -2
  238. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Base.php +0 -15
  239. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Quiet.php +3 -2
  240. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Regular.php +3 -4
  241. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/NoOp.php +0 -4
  242. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Process.php +7 -40
  243. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/RequestsLibrary.php +1 -4
  244. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php +234 -795
  245. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisParser.php +26 -116
  246. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisValidator.php +1 -1
  247. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Traverser/RecursiveDataStructureTraverser.php +26 -69
  248. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/UpgraderSkin.php +1 -1
  249. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpHttpCacheManager.php +5 -67
  250. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpOrgApi.php +3 -3
  251. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/boot-fs.php +2 -2
  252. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/bootstrap.php +2 -5
  253. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/class-wp-cli.php +62 -311
  254. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Alias_Command.php +60 -292
  255. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Cache_Command.php +1 -1
  256. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php +31 -191
  257. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/Help_Command.php +35 -177
  258. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/config-spec.php +4 -28
  259. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils-wp.php +47 -81
  260. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils.php +200 -512
  261. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-cli.php +2 -2
  262. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-settings-cli.php +465 -0
  263. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man-params.mustache +4 -0
  264. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man.mustache +0 -8
  265. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ArgValidationTest.php +74 -0
  266. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/CommandFactoryTest.php +420 -0
  267. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ConfiguratorTest.php +87 -0
  268. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/DocParserTest.php +213 -0
  269. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ExtractorTest.php +293 -0
  270. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/FileCacheTest.php +207 -0
  271. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/HelpTest.php +119 -0
  272. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/InflectorTest.php +37 -0
  273. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/LoggingTest.php +124 -0
  274. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ProcessTest.php +30 -0
  275. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/SynopsisParserTest.php +194 -0
  276. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/UtilsTest.php +1092 -0
  277. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WPCLITest.php +16 -0
  278. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Iterators/CSVTest.php +109 -0
  279. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Traversers/RecursiveDataStructureTraverserTest.php +151 -0
  280. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/WpOrgApiTest.php +166 -0
  281. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WpVersionCompareTest.php +78 -0
  282. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/bootstrap.php +17 -0
  283. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class-win.php +70 -0
  284. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class.php +70 -0
  285. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function-win.php +19 -0
  286. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function.php +19 -0
  287. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/bar.ab2 +0 -0
  288. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ab1 +0 -0
  289. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ac1 +0 -0
  290. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.efg2 +0 -0
  291. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab1 +0 -0
  292. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab2 +0 -0
  293. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg1 +0 -0
  294. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg2 +0 -0
  295. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/mock-requests-transport.php +34 -0
  296. package/dist/cli/wp-files/sqlite-command/version +1 -1
  297. package/package.json +4 -3
  298. package/patches/archiver+7.0.1.patch +14 -0
  299. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/.php-cs-fixer.php +0 -20
  300. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/README.md +0 -94
  301. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/RenderedString.php +0 -51
  302. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/compat.php +0 -282
  303. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.typos.toml +0 -14
  304. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/AGENTS.md +0 -121
  305. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/proxy.py +0 -5
  306. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/start.sh +0 -19
  307. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/stop.sh +0 -10
  308. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Path.php +0 -260
  309. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/ShutdownHandler.php +0 -329
  310. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli-config.json +0 -218
  311. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli.example.yml +0 -55
  312. /package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/{codecov.yml → tests/data/expand_globs/bar.ab1} +0 -0
@@ -13,7 +13,6 @@ use WP_CLI\DocParser;
13
13
  use WP_CLI\ExitException;
14
14
  use WP_CLI\FileCache;
15
15
  use WP_CLI\Loggers\Execution;
16
- use WP_CLI\Path;
17
16
  use WP_CLI\Process;
18
17
  use WP_CLI\ProcessRun;
19
18
  use WP_CLI\Runner;
@@ -23,15 +22,6 @@ use WP_CLI\WpHttpCacheManager;
23
22
 
24
23
  /**
25
24
  * Various utilities for WP-CLI commands.
26
- *
27
- * @phpstan-type GlobalConfig array{path: string|null, ssh: string|null, 'ssh-args': string[], http: string|null, url: string|null, user: string|null, 'skip-plugins': true|string[], 'skip-themes': true|string[], 'skip-packages': bool, require: string[], exec: string[], context: string, debug: string|true, prompt: false|string, quiet: bool, apache_modules: string[], 'assume-https': bool}
28
- *
29
- * @phpstan-type FlagParameter array{type: 'flag', name: string, description?: string, optional?: bool, repeating?: bool, aliases?: string[]}
30
- * @phpstan-type AssocParameter array{type: 'assoc', name: string, description?: string, options?: string[], default?: string, optional?: bool, value: array{optional: bool, name?: string}, repeating?: bool, aliases?: string[]}
31
- * @phpstan-type PositionalParameter array{type: 'positional', name: string, description?: string, optional?: bool, repeating?: bool}
32
- * @phpstan-type GenericParameter array{type: 'generic', optional?: bool, repeating?: bool}
33
- * @phpstan-type UnknownParameter array{type:'unknown', optional?: bool, repeating?: bool}
34
- * @phpstan-type CommandSynopsis FlagParameter|AssocParameter|PositionalParameter|GenericParameter|UnknownParameter
35
25
  */
36
26
  class WP_CLI {
37
27
 
@@ -45,13 +35,6 @@ class WP_CLI {
45
35
 
46
36
  private static $deferred_additions = [];
47
37
 
48
- /**
49
- * Cached list of global argument names.
50
- *
51
- * @var array|null
52
- */
53
- private static $global_arg_names;
54
-
55
38
  /**
56
39
  * Set the logger instance.
57
40
  *
@@ -85,9 +68,6 @@ class WP_CLI {
85
68
  return $configurator;
86
69
  }
87
70
 
88
- /**
89
- * @return RootCommand
90
- */
91
71
  public static function get_root_command() {
92
72
  static $root;
93
73
 
@@ -116,8 +96,8 @@ class WP_CLI {
116
96
 
117
97
  if ( ! $cache ) {
118
98
  $dir = Utils\get_cache_dir();
119
- $ttl = (int) Utils\get_env_or_config( 'WP_CLI_CACHE_EXPIRY' ) ? : 15552000;
120
- $max_size = (int) Utils\get_env_or_config( 'WP_CLI_CACHE_MAX_SIZE' ) ? : 314572800;
99
+ $ttl = getenv( 'WP_CLI_CACHE_EXPIRY' ) ? : 15552000;
100
+ $max_size = getenv( 'WP_CLI_CACHE_MAX_SIZE' ) ? : 314572800;
121
101
  // 6 months, 300mb
122
102
  $cache = new FileCache( $dir, $ttl, $max_size );
123
103
 
@@ -152,8 +132,6 @@ class WP_CLI {
152
132
  if ( isset( $url_parts['host'] ) ) {
153
133
  if ( isset( $url_parts['scheme'] ) && 'https' === strtolower( $url_parts['scheme'] ) ) {
154
134
  $_SERVER['HTTPS'] = 'on';
155
- } elseif ( ! self::get_config( 'assume-https' ) ) {
156
- unset( $_SERVER['HTTPS'] );
157
135
  }
158
136
 
159
137
  $_SERVER['HTTP_HOST'] = $url_parts['host'];
@@ -282,8 +260,8 @@ class WP_CLI {
282
260
  * @access public
283
261
  * @category Registration
284
262
  *
285
- * @param string $when Identifier for the hook.
286
- * @param callable $callback Callback to execute when hook is called.
263
+ * @param string $when Identifier for the hook.
264
+ * @param mixed $callback Callback to execute when hook is called.
287
265
  * @return void
288
266
  */
289
267
  public static function add_hook( $when, $callback ) {
@@ -376,10 +354,10 @@ class WP_CLI {
376
354
  * @access public
377
355
  * @category Registration
378
356
  *
379
- * @param string $tag Named WordPress action or filter.
380
- * @param callable $function_to_add Callable to execute when the action or filter is evaluated.
381
- * @param integer $priority Priority to add the callback as.
382
- * @param integer $accepted_args Number of arguments to pass to callback.
357
+ * @param string $tag Named WordPress action or filter.
358
+ * @param mixed $function_to_add Callable to execute when the action or filter is evaluated.
359
+ * @param integer $priority Priority to add the callback as.
360
+ * @param integer $accepted_args Number of arguments to pass to callback.
383
361
  * @return true
384
362
  */
385
363
  public static function add_wp_hook( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
@@ -428,14 +406,11 @@ class WP_CLI {
428
406
  }
429
407
 
430
408
  $obj_idx = get_class( $function[0] ) . $function[1];
431
- // @phpstan-ignore property.notFound
432
409
  if ( ! isset( $function[0]->wp_filter_id ) ) {
433
410
  if ( false === $priority ) {
434
411
  return false;
435
412
  }
436
- $obj_idx .= isset( $wp_filter[ $tag ][ $priority ] ) ? count( (array) $wp_filter[ $tag ][ $priority ] ) : $filter_id_count;
437
-
438
- // @phpstan-ignore property.notFound
413
+ $obj_idx .= isset( $wp_filter[ $tag ][ $priority ] ) ? count( (array) $wp_filter[ $tag ][ $priority ] ) : $filter_id_count;
439
414
  $function[0]->wp_filter_id = $filter_id_count;
440
415
  ++$filter_id_count;
441
416
  } else {
@@ -487,9 +462,9 @@ class WP_CLI {
487
462
  * @access public
488
463
  * @category Registration
489
464
  *
490
- * @param string $name Name for the command (e.g. "post list" or "site empty").
491
- * @param callable|object|string|string[] $callable Command implementation as a class, function or closure.
492
- * @param array $args {
465
+ * @param string $name Name for the command (e.g. "post list" or "site empty").
466
+ * @param callable|object|string $callable Command implementation as a class, function or closure.
467
+ * @param array $args {
493
468
  * Optional. An associative array with additional registration parameters.
494
469
  *
495
470
  * @type callable $before_invoke Callback to execute before invoking the command.
@@ -501,8 +476,6 @@ class WP_CLI {
501
476
  * @type bool $is_deferred Whether the command addition had already been deferred.
502
477
  * }
503
478
  * @return bool True on success, false if deferred, hard error if registration failed.
504
- *
505
- * @phpstan-param array{before_invoke?: callable, after_invoke?: callable, shortdesc?: string, longdesc?: string, synopsis?: string|CommandSynopsis[], when?: string, is_deferred?: bool} $args
506
479
  */
507
480
  public static function add_command( $name, $callable, $args = [] ) {
508
481
  // Bail immediately if the WP-CLI executable has not been run.
@@ -513,11 +486,11 @@ class WP_CLI {
513
486
  $valid = false;
514
487
  if ( is_callable( $callable ) ) {
515
488
  $valid = true;
516
- } elseif ( is_string( $callable ) && class_exists( $callable ) ) {
489
+ } elseif ( is_string( $callable ) && class_exists( (string) $callable ) ) {
517
490
  $valid = true;
518
491
  } elseif ( is_object( $callable ) ) {
519
492
  $valid = true;
520
- } elseif ( is_array( $callable ) && Utils\is_valid_class_and_method_pair( $callable ) ) {
493
+ } elseif ( Utils\is_valid_class_and_method_pair( $callable ) ) {
521
494
  $valid = true;
522
495
  }
523
496
  if ( ! $valid ) {
@@ -542,9 +515,9 @@ class WP_CLI {
542
515
  }
543
516
  }
544
517
 
545
- $path = preg_split( '/\s+/', $name ) ?: [];
518
+ $path = preg_split( '/\s+/', $name );
546
519
 
547
- $leaf_name = (string) array_pop( $path );
520
+ $leaf_name = array_pop( $path );
548
521
 
549
522
  $command = self::get_root_command();
550
523
 
@@ -572,10 +545,6 @@ class WP_CLI {
572
545
  } else {
573
546
  self::debug( "Deferring command: {$name}", 'commands' );
574
547
 
575
- /**
576
- * @var callable $callable
577
- */
578
-
579
548
  self::defer_command_addition(
580
549
  $name,
581
550
  $parent,
@@ -646,9 +615,9 @@ class WP_CLI {
646
615
  $long_desc .= ': ' . $arg['description'] . "\n";
647
616
  }
648
617
  $yamlify = [];
649
- foreach ( [ 'default', 'options' ] as $_key ) {
650
- if ( isset( $arg[ $_key ] ) ) {
651
- $yamlify[ $_key ] = $arg[ $_key ];
618
+ foreach ( [ 'default', 'options' ] as $key ) {
619
+ if ( isset( $arg[ $key ] ) ) {
620
+ $yamlify[ $key ] = $arg[ $key ];
652
621
  }
653
622
  }
654
623
  if ( ! empty( $yamlify ) ) {
@@ -672,12 +641,11 @@ class WP_CLI {
672
641
  self::get_runner()->register_early_invoke( $args['when'], $leaf_command );
673
642
  }
674
643
 
675
- $command_type = $leaf_command instanceof CommandNamespace ? 'namespace' : 'command';
676
644
  if ( ! empty( $parent ) ) {
677
645
  $sub_command = trim( str_replace( $parent, '', $name ) );
678
- self::debug( "Adding {$command_type}: {$sub_command} in {$parent} Namespace", 'commands' );
646
+ self::debug( "Adding command: {$sub_command} in {$parent} Namespace", 'commands' );
679
647
  } else {
680
- self::debug( "Adding {$command_type}: {$name}", 'commands' );
648
+ self::debug( "Adding command: {$name}", 'commands' );
681
649
  }
682
650
 
683
651
  $command->add_subcommand( $leaf_name, $leaf_command );
@@ -712,10 +680,10 @@ class WP_CLI {
712
680
  * Defer command addition for a sub-command if the parent command is not yet
713
681
  * registered.
714
682
  *
715
- * @param string $name Name for the sub-command.
716
- * @param string $parent Name for the parent command.
717
- * @param callable $callable Command implementation as a class, function or closure.
718
- * @param array $args Optional. See `WP_CLI::add_command()` for details.
683
+ * @param string $name Name for the sub-command.
684
+ * @param string $parent Name for the parent command.
685
+ * @param string $callable Command implementation as a class, function or closure.
686
+ * @param array $args Optional. See `WP_CLI::add_command()` for details.
719
687
  */
720
688
  private static function defer_command_addition( $name, $parent, $callable, $args = [] ) {
721
689
  $args['is_deferred'] = true;
@@ -762,87 +730,6 @@ class WP_CLI {
762
730
  unset( self::$deferred_additions[ $name ] );
763
731
  }
764
732
 
765
- /**
766
- * Check if a command's arguments conflict with global arguments.
767
- *
768
- * Issues warnings for any command arguments that have the same name as
769
- * global WP-CLI arguments (e.g., --debug, --user, --quiet).
770
- *
771
- * @param string $command_name The name of the command being registered.
772
- * @param Dispatcher\Subcommand $command The command object to check.
773
- */
774
- public static function check_global_arg_conflicts( $command_name, $command ) {
775
- $synopsis = $command->get_synopsis();
776
- if ( ! $synopsis ) {
777
- return;
778
- }
779
-
780
- // Check if command has opted out of this check
781
- if ( self::command_skips_global_arg_check( $command ) ) {
782
- return;
783
- }
784
-
785
- // Get global argument names from config spec (cached)
786
- if ( null === self::$global_arg_names ) {
787
- self::$global_arg_names = [];
788
- foreach ( self::get_configurator()->get_spec() as $key => $details ) {
789
- if ( false === $details['runtime'] ) {
790
- continue;
791
- }
792
- if ( isset( $details['deprecated'] ) ) {
793
- continue;
794
- }
795
- if ( isset( $details['hidden'] ) ) {
796
- continue;
797
- }
798
- self::$global_arg_names[] = $key;
799
- }
800
- }
801
-
802
- // Parse the command's synopsis to get its argument names
803
- $synopsis_params = SynopsisParser::parse( $synopsis );
804
- $conflicts = [];
805
-
806
- foreach ( $synopsis_params as $param ) {
807
- // Check assoc and flag types; generic type has no specific name to conflict
808
- if ( in_array( $param['type'], [ 'assoc', 'flag' ], true ) && isset( $param['name'] ) ) {
809
- if ( in_array( $param['name'], self::$global_arg_names, true ) ) {
810
- $conflicts[] = $param['name'];
811
- }
812
- }
813
- }
814
-
815
- // Warn about any conflicts found
816
- foreach ( $conflicts as $conflict ) {
817
- self::warning(
818
- sprintf(
819
- "The `%s` command is registering an argument '--%s' that conflicts with a global argument of the same name.",
820
- $command_name,
821
- $conflict
822
- )
823
- );
824
- }
825
- }
826
-
827
- /**
828
- * Check if a command has opted out of global argument conflict checking.
829
- *
830
- * Commands can use the @skipglobalargcheck tag in their PHPdoc to disable
831
- * the warning for global argument conflicts.
832
- *
833
- * @param Dispatcher\Subcommand $command The command object to check.
834
- * @return bool True if the command should skip the check, false otherwise.
835
- */
836
- private static function command_skips_global_arg_check( $command ) {
837
- $docparser = $command->get_docparser();
838
-
839
- if ( ! $docparser ) {
840
- return false;
841
- }
842
-
843
- return $docparser->has_tag( 'skipglobalargcheck' );
844
- }
845
-
846
733
  /**
847
734
  * Display informational message without prefix, and ignore `--quiet`.
848
735
  *
@@ -853,11 +740,10 @@ class WP_CLI {
853
740
  * @category Output
854
741
  *
855
742
  * @param string $message Message to display to the end user.
856
- * @param bool $newline Optional. Whether to append a newline to the end of the message. Default true.
857
743
  * @return void
858
744
  */
859
- public static function line( $message = '', $newline = true ) {
860
- echo $message . ( $newline ? "\n" : '' );
745
+ public static function line( $message = '' ) {
746
+ echo $message . "\n";
861
747
  }
862
748
 
863
749
  /**
@@ -874,14 +760,13 @@ class WP_CLI {
874
760
  * @category Output
875
761
  *
876
762
  * @param string $message Message to write to STDOUT.
877
- * @param bool $newline Optional. Whether to append a newline to the end of the message. Default true.
878
763
  */
879
- public static function log( $message, $newline = true ) {
764
+ public static function log( $message ) {
880
765
  if ( null === self::$logger ) {
881
766
  return;
882
767
  }
883
768
 
884
- self::$logger->info( $message, $newline );
769
+ self::$logger->info( $message );
885
770
  }
886
771
 
887
772
  /**
@@ -1005,10 +890,6 @@ class WP_CLI {
1005
890
  * Use `WP_CLI::warning()` instead when script execution should be permitted
1006
891
  * to continue.
1007
892
  *
1008
- * When `--debug` is enabled, this method will also output a backtrace
1009
- * showing where the error was triggered from, making it easier to identify
1010
- * problematic code.
1011
- *
1012
893
  * ```
1013
894
  * # `wp cache flush` considers flush failure to be a fatal error.
1014
895
  * if ( false === wp_cache_flush() ) {
@@ -1020,10 +901,8 @@ class WP_CLI {
1020
901
  * @category Output
1021
902
  *
1022
903
  * @param string|WP_Error|Exception|Throwable $message Message to write to STDERR.
1023
- * @param boolean|int $exit True defaults to exit(1).
904
+ * @param boolean|integer $exit True defaults to exit(1).
1024
905
  * @return null
1025
- *
1026
- * @phpstan-return ($exit is true|positive-int ? never : void)
1027
906
  */
1028
907
  public static function error( $message, $exit = true ) {
1029
908
  if ( null !== self::$logger && ! isset( self::get_runner()->assoc_args['completions'] ) ) {
@@ -1038,7 +917,6 @@ class WP_CLI {
1038
917
  }
1039
918
 
1040
919
  if ( $return_code ) {
1041
- self::debug_backtrace_on_exit();
1042
920
  if ( self::$capture_exit ) {
1043
921
  throw new ExitException( '', $return_code );
1044
922
  }
@@ -1051,10 +929,6 @@ class WP_CLI {
1051
929
  *
1052
930
  * Permits script execution to be overloaded by `WP_CLI::runcommand()`
1053
931
  *
1054
- * When `--debug` is enabled, this method will also output a backtrace
1055
- * showing where the halt was triggered from, making it easier to identify
1056
- * the cause of early termination.
1057
- *
1058
932
  * @access public
1059
933
  * @category Output
1060
934
  *
@@ -1062,7 +936,6 @@ class WP_CLI {
1062
936
  * @return never
1063
937
  */
1064
938
  public static function halt( $return_code ) {
1065
- self::debug_backtrace_on_exit();
1066
939
  if ( self::$capture_exit ) {
1067
940
  throw new ExitException( '', $return_code );
1068
941
  }
@@ -1077,7 +950,7 @@ class WP_CLI {
1077
950
  * @access public
1078
951
  * @category Output
1079
952
  *
1080
- * @param array<string|\WP_Error|\Exception|\Throwable> $message_lines Multi-line error message to be displayed.
953
+ * @param array $message_lines Multi-line error message to be displayed.
1081
954
  */
1082
955
  public static function error_multi_line( $message_lines ) {
1083
956
  if ( null === self::$logger ) {
@@ -1085,14 +958,7 @@ class WP_CLI {
1085
958
  }
1086
959
 
1087
960
  if ( ! isset( self::get_runner()->assoc_args['completions'] ) && is_array( $message_lines ) ) {
1088
- self::$logger->error_multi_line(
1089
- array_map(
1090
- static function ( $message ) {
1091
- return self::error_to_string( $message );
1092
- },
1093
- $message_lines
1094
- )
1095
- );
961
+ self::$logger->error_multi_line( array_map( [ __CLASS__, 'error_to_string' ], $message_lines ) );
1096
962
  }
1097
963
  }
1098
964
 
@@ -1118,7 +984,7 @@ class WP_CLI {
1118
984
  if ( ! Utils\get_flag_value( $assoc_args, 'yes' ) ) {
1119
985
  fwrite( STDOUT, $question . ' [y/n] ' );
1120
986
 
1121
- $answer = strtolower( trim( (string) fgets( STDIN ) ) );
987
+ $answer = strtolower( trim( fgets( STDIN ) ) );
1122
988
 
1123
989
  if ( 'y' !== $answer ) {
1124
990
  exit;
@@ -1136,7 +1002,7 @@ class WP_CLI {
1136
1002
  */
1137
1003
  public static function get_value_from_arg_or_stdin( $args, $index ) {
1138
1004
  if ( isset( $args[ $index ] ) ) {
1139
- $raw_value = (string) $args[ $index ];
1005
+ $raw_value = $args[ $index ];
1140
1006
  } else {
1141
1007
  // We don't use file_get_contents() here because it doesn't handle
1142
1008
  // Ctrl-D properly, when typing in the value interactively.
@@ -1158,7 +1024,7 @@ class WP_CLI {
1158
1024
  * @access public
1159
1025
  * @category Input
1160
1026
  *
1161
- * @param string $raw_value
1027
+ * @param mixed $raw_value
1162
1028
  * @param array $assoc_args
1163
1029
  */
1164
1030
  public static function read_value( $raw_value, $assoc_args = [] ) {
@@ -1181,24 +1047,15 @@ class WP_CLI {
1181
1047
  * @param array $assoc_args Arguments passed to the command, determining format.
1182
1048
  */
1183
1049
  public static function print_value( $value, $assoc_args = [] ) {
1184
- $_value = '';
1185
1050
  if ( Utils\get_flag_value( $assoc_args, 'format' ) === 'json' ) {
1186
- $_value = json_encode( $value );
1051
+ $value = json_encode( $value );
1187
1052
  } elseif ( Utils\get_flag_value( $assoc_args, 'format' ) === 'yaml' ) {
1188
- /**
1189
- * @var array $value
1190
- */
1191
- $_value = Spyc::YAMLDump( $value, 2, 0 );
1053
+ $value = Spyc::YAMLDump( $value, 2, 0 );
1192
1054
  } elseif ( is_array( $value ) || is_object( $value ) ) {
1193
- $_value = var_export( $value, true );
1194
- } else {
1195
- /**
1196
- * @var string|int $_value
1197
- */
1198
- $_value = $value;
1055
+ $value = var_export( $value, true );
1199
1056
  }
1200
1057
 
1201
- echo $_value . "\n";
1058
+ echo $value . "\n";
1202
1059
  }
1203
1060
 
1204
1061
  /**
@@ -1226,14 +1083,16 @@ class WP_CLI {
1226
1083
  if ( $errors instanceof WP_Error ) {
1227
1084
  foreach ( $errors->get_error_messages() as $message ) {
1228
1085
  if ( $errors->get_error_data() ) {
1229
- return $message . ' ' . (string) $render_data( $errors->get_error_data() );
1086
+ return $message . ' ' . $render_data( $errors->get_error_data() );
1230
1087
  }
1231
1088
 
1232
1089
  return $message;
1233
1090
  }
1234
1091
  }
1235
1092
 
1236
- if ( $errors instanceof Throwable ) {
1093
+ // PHP 7+: internal and user exceptions must implement Throwable interface.
1094
+ // PHP 5: internal and user exceptions must extend Exception class.
1095
+ if ( ( interface_exists( 'Throwable' ) && ( $errors instanceof Throwable ) ) || ( $errors instanceof Exception ) ) {
1237
1096
  return get_class( $errors ) . ': ' . $errors->getMessage();
1238
1097
  }
1239
1098
 
@@ -1245,69 +1104,6 @@ class WP_CLI {
1245
1104
  );
1246
1105
  }
1247
1106
 
1248
- /**
1249
- * Output debug backtrace information when --debug is enabled.
1250
- *
1251
- * This is called when WP_CLI is about to exit (via error() or halt())
1252
- * to help identify where the exit originated from.
1253
- *
1254
- * @access private
1255
- */
1256
- private static function debug_backtrace_on_exit() {
1257
- // Only output backtrace when debug mode is enabled.
1258
- if ( ! self::$logger || ! self::get_config( 'debug' ) ) {
1259
- return;
1260
- }
1261
-
1262
- $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
1263
-
1264
- // Skip the first few frames (this method, error/halt method, etc.).
1265
- $skip_frames = 0;
1266
- foreach ( $backtrace as $index => $frame ) {
1267
- // Skip internal WP_CLI methods.
1268
- if ( isset( $frame['class'] ) && 'WP_CLI' === $frame['class'] &&
1269
- in_array( $frame['function'], [ 'debug_backtrace_on_exit', 'error', 'halt' ], true ) ) {
1270
- $skip_frames = $index + 1;
1271
- continue;
1272
- }
1273
- break;
1274
- }
1275
-
1276
- // Get the first relevant frame (where the error/halt was called from).
1277
- if ( isset( $backtrace[ $skip_frames ] ) ) {
1278
- $frame = $backtrace[ $skip_frames ];
1279
- $file = $frame['file'] ?? 'unknown';
1280
- $line = $frame['line'] ?? 'unknown';
1281
-
1282
- self::debug( "Script called exit from: {$file}:{$line}", 'bootstrap' );
1283
-
1284
- // Output a limited backtrace (first 5 frames after skipping internal ones).
1285
- $backtrace_output = [];
1286
- $max_frames = 5;
1287
- $frame_count = 0;
1288
- $backtrace_count = count( $backtrace );
1289
-
1290
- for ( $i = $skip_frames; $i < $backtrace_count && $frame_count < $max_frames; $i++ ) {
1291
- $frame = $backtrace[ $i ];
1292
- $func = $frame['function'];
1293
-
1294
- if ( isset( $frame['class'] ) ) {
1295
- $func = $frame['class'] . ( $frame['type'] ?? '::' ) . $func;
1296
- }
1297
-
1298
- $file = $frame['file'] ?? 'unknown';
1299
- $line = $frame['line'] ?? '?';
1300
-
1301
- $backtrace_output[] = " #{$frame_count} {$func}() called at [{$file}:{$line}]";
1302
- ++$frame_count;
1303
- }
1304
-
1305
- if ( ! empty( $backtrace_output ) ) {
1306
- self::debug( "Backtrace:\n" . implode( "\n", $backtrace_output ), 'bootstrap' );
1307
- }
1308
- }
1309
- }
1310
-
1311
1107
  /**
1312
1108
  * Launch an arbitrary external process that takes over I/O.
1313
1109
  *
@@ -1327,24 +1123,11 @@ class WP_CLI {
1327
1123
  * @param boolean $exit_on_error Whether to exit if the command returns an elevated return code.
1328
1124
  * @param boolean $return_detailed Whether to return an exit status (default) or detailed execution results.
1329
1125
  * @return int|ProcessRun The command exit status, or a ProcessRun object for full details.
1330
- *
1331
- * @phpstan-return ($return_detailed is true ? ProcessRun : int)
1332
1126
  */
1333
1127
  public static function launch( $command, $exit_on_error = true, $return_detailed = false ) {
1334
1128
  Utils\check_proc_available( 'launch' );
1335
1129
 
1336
- // Forward environment variables when available so child processes can still
1337
- // read DB_* (and other) values via getenv() / $_ENV in wp-config.php.
1338
- $env = $_ENV;
1339
-
1340
- if ( ! empty( $env ) ) {
1341
- // Explicit env array, child process inherits only these entries.
1342
- $proc = Process::create( $command, null, $env );
1343
- } else {
1344
- // $_ENV is empty → use null to inherit full parent environment.
1345
- $proc = Process::create( $command, null, null );
1346
- }
1347
-
1130
+ $proc = Process::create( $command );
1348
1131
  $results = $proc->run();
1349
1132
 
1350
1133
  if ( -1 === $results->return_code ) {
@@ -1382,8 +1165,6 @@ class WP_CLI {
1382
1165
  * @param bool $return_detailed Whether to return an exit status (default) or detailed execution results.
1383
1166
  * @param array $runtime_args Override one or more global args (path,url,user,allow-root)
1384
1167
  * @return int|ProcessRun The command exit status, or a ProcessRun instance
1385
- *
1386
- * @phpstan-return ($return_detailed is false ? int : ProcessRun)
1387
1168
  */
1388
1169
  public static function launch_self( $command, $args = [], $assoc_args = [], $exit_on_error = true, $return_detailed = false, $runtime_args = [] ) {
1389
1170
  $reused_runtime_args = [
@@ -1407,23 +1188,16 @@ class WP_CLI {
1407
1188
 
1408
1189
  $php_bin = escapeshellarg( Utils\get_php_binary() );
1409
1190
 
1410
- /**
1411
- * @var string[] $argv
1412
- */
1413
- $argv = $GLOBALS['argv'];
1191
+ $script_path = $GLOBALS['argv'][0];
1414
1192
 
1415
- $script_path = $argv[0];
1416
-
1417
- $wp_cli_config_path = (string) getenv( 'WP_CLI_CONFIG_PATH' );
1418
-
1419
- if ( $wp_cli_config_path ) {
1420
- $config_path = $wp_cli_config_path;
1193
+ if ( getenv( 'WP_CLI_CONFIG_PATH' ) ) {
1194
+ $config_path = getenv( 'WP_CLI_CONFIG_PATH' );
1421
1195
  } else {
1422
- $config_path = Path::get_home_dir() . '/.wp-cli/config.yml';
1196
+ $config_path = Utils\get_home_dir() . '/.wp-cli/config.yml';
1423
1197
  }
1424
1198
  $config_path = escapeshellarg( $config_path );
1425
1199
 
1426
- $args = implode( ' ', array_map( 'escapeshellarg', (array) $args ) );
1200
+ $args = implode( ' ', array_map( 'escapeshellarg', $args ) );
1427
1201
  $assoc_args = Utils\assoc_args_to_str( $assoc_args );
1428
1202
 
1429
1203
  $full_command = "WP_CLI_CONFIG_PATH={$config_path} {$php_bin} {$script_path} {$command} {$args} {$assoc_args}";
@@ -1456,8 +1230,6 @@ class WP_CLI {
1456
1230
  * @param string $key Config parameter key to check.
1457
1231
  *
1458
1232
  * @return bool
1459
- *
1460
- * @phpstan-param key-of<GlobalConfig> $key
1461
1233
  */
1462
1234
  public static function has_config( $key ) {
1463
1235
  return array_key_exists( $key, self::get_runner()->config );
@@ -1478,9 +1250,6 @@ class WP_CLI {
1478
1250
  *
1479
1251
  * @param string $key Get value for a specific global configuration parameter.
1480
1252
  * @return mixed
1481
- *
1482
- * @phpstan-param key-of<GlobalConfig> $key
1483
- * @phpstan-return ($key is null ? GlobalConfig : value-of<GlobalConfig>)
1484
1253
  */
1485
1254
  public static function get_config( $key = null ) {
1486
1255
  if ( null === $key ) {
@@ -1525,11 +1294,11 @@ class WP_CLI {
1525
1294
  * @param array $options {
1526
1295
  * Configuration options for command execution.
1527
1296
  *
1528
- * @type bool $launch Launches a new process (true) or reuses the existing process (false). Default: true.
1529
- * @type bool $exit_error Halts the script on error. Default: true.
1530
- * @type bool|string $return Returns output as an object when set to 'all' (string), return just the 'stdout', 'stderr', or 'return_code' (string) of command, or print directly to stdout/stderr (false). Default: false.
1531
- * @type bool|string $parse Parse returned output as 'json' (string); otherwise, output is unchanged (false). Default: false.
1532
- * @type array $command_args Contains additional command line arguments for the command. Each element represents a single argument. Default: empty array.
1297
+ * @type bool $launch Launches a new process (true) or reuses the existing process (false). Default: true.
1298
+ * @type bool $exit_error Halts the script on error. Default: true.
1299
+ * @type bool|string $return Returns output as an object when set to 'all' (string), return just the 'stdout', 'stderr', or 'return_code' (string) of command, or print directly to stdout/stderr (false). Default: false.
1300
+ * @type bool|string $parse Parse returned output as 'json' (string); otherwise, output is unchanged (false). Default: false.
1301
+ * @param array $command_args Contains additional command line arguments for the command. Each element represents a single argument. Default: empty array.
1533
1302
  * }
1534
1303
  * @return mixed
1535
1304
  */
@@ -1570,21 +1339,12 @@ class WP_CLI {
1570
1339
  ];
1571
1340
  }
1572
1341
 
1573
- /**
1574
- * @var string[] $argv
1575
- */
1576
- $argv = $GLOBALS['argv'];
1577
-
1578
- /**
1579
- * @var array<resource> $descriptors
1580
- */
1581
-
1582
1342
  $php_bin = escapeshellarg( Utils\get_php_binary() );
1583
- $script_path = $argv[0];
1343
+ $script_path = $GLOBALS['argv'][0];
1584
1344
 
1585
1345
  // Persist runtime arguments unless they've been specified otherwise.
1586
1346
  $configurator = self::get_configurator();
1587
- $argv = array_slice( $argv, 1 );
1347
+ $argv = array_slice( $GLOBALS['argv'], 1 );
1588
1348
 
1589
1349
  list( $ignore1, $ignore2, $runtime_config ) = $configurator->parse_args( $argv );
1590
1350
  foreach ( $runtime_config as $k => $v ) {
@@ -1594,30 +1354,21 @@ class WP_CLI {
1594
1354
  }
1595
1355
  $runtime_config = Utils\assoc_args_to_str( $runtime_config );
1596
1356
 
1597
- $alias = self::get_runner()->alias;
1598
- $alias_prefix = '';
1599
- if ( $alias && '@' !== substr( ltrim( $command ), 0, 1 ) ) {
1600
- $alias_prefix = '@' . $alias . ' ';
1601
- }
1602
-
1603
- $runcommand = "{$php_bin} {$script_path} {$alias_prefix}{$runtime_config} {$command}";
1357
+ $runcommand = "{$php_bin} {$script_path} {$runtime_config} {$command}";
1604
1358
 
1605
- /**
1606
- * @phpstan-var array<int, resource> $pipes
1607
- */
1608
1359
  $pipes = [];
1609
- $proc = Utils\proc_open_compat( $runcommand, $descriptors, $pipes, getcwd() ?: null );
1360
+ $proc = Utils\proc_open_compat( $runcommand, $descriptors, $pipes, getcwd() );
1610
1361
 
1611
1362
  $stdout = '';
1612
1363
  $stderr = '';
1613
1364
 
1614
1365
  if ( $return ) {
1615
- $stdout = (string) stream_get_contents( $pipes[1] );
1366
+ $stdout = stream_get_contents( $pipes[1] );
1616
1367
  fclose( $pipes[1] );
1617
- $stderr = (string) stream_get_contents( $pipes[2] );
1368
+ $stderr = stream_get_contents( $pipes[2] );
1618
1369
  fclose( $pipes[2] );
1619
1370
  }
1620
- $return_code = $proc ? proc_close( $proc ) : -1;
1371
+ $return_code = proc_close( $proc );
1621
1372
  if ( -1 === $return_code ) {
1622
1373
  self::warning( 'Spawned process returned exit code -1, which could be caused by a custom compiled version of PHP that uses the --enable-sigchild option.' );
1623
1374
  } elseif ( $return_code && $exit_error ) {
@@ -1685,7 +1436,7 @@ class WP_CLI {
1685
1436
  }
1686
1437
  }
1687
1438
  if ( ( true === $return || 'stdout' === $return )
1688
- && 'json' === $parse && is_string( $retval ) ) {
1439
+ && 'json' === $parse ) {
1689
1440
  $retval = json_decode( $retval, true );
1690
1441
  }
1691
1442
  return $retval;