Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`wmic` deprecated and removed in recent Windows versions

Open
#228 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
networking

Research direction

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.

Written by the indexing model from the issue text.

Description

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!

Dominant language
PHP
Stars
542
Forks
62
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactphp/dns

All issues in reactphp/dns

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.