Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`wmic` deprecated and removed in recent Windows versions

未关闭
#228 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
php
领域
networking

调研方向

Start by reproducing the failure on Windows 11 24H2 and inspect vendor/react/dns/src/Config/Config.php around line 128, where the null warning is reported. Trace how the wmic command is invoked and determine the project-supported behavior when it is unavailable. Done means the reported command failure and resulting warning no longer occur on affected Windows installations.

由索引模型根据 Issue 内容生成。

描述

bug new feature

Hi there,

While testing our software which uses react/dns v1.13.0 on a fresh Windows Installation (Windows 11 24H2, 26100.2605), I encountered the following error:

PS C:\...> expose
'wmic' is not recognized as an internal or external command, operable program or batch file.
[2024-12-16 11:13:45] production.WARNING: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in phar://....phar/vendor/react/dns/src/Config/Config.php on line 128

This is probably because Microsoft deprecated WMIC a few years ago and removed it in recent Windows 10/11 versions: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic

My workaround is manually re-installing WMIC as described here:
https://techcommunity.microsoft.com/blog/windows-itpro-blog/how-to-install-wmic-feature-on-demand-on-windows-11/4189530

Just wanted to give you a heads-up, as this issue might occur more frequently now that WMIC is no longer included by default.

More information
Used reactphp packages:

› composer why react/dns
react/socket v1.16.0 requires react/dns (^1.13)
› composer why react/socket
react/http        v1.11.0     requires react/socket (^1.16)

Let me know if I can provide more details!

主要语言
PHP
星标
542
派生
62
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

reactphp/dns 的其他 Issue

查看 reactphp/dns 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。