Don't use deprecated `GetVersionEx()`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
Description
We're using GetVersionEx() to set EG(windows_version_info), and also GetVersion() in php_get_uname() (the latter might reuse the former; I'll have a closer look). Both functions are deprecated, and the documentation states:
GetVersionExA may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions.
Using the version helper functions in combination with GetProductInfo() is indeed an option, but changing EG(windows_version_info) to no longer hold an OSVERSIONINFOEX structure would be a BC break, which is exacerbated by the fact that we make the fields available as userland constants:
Either we find a way to populate the (relevant) fields of OSVERSIONINFOEX without calling any deprecated functions, or we may consider to deprecate some of the userland constants. Maybe we should do both.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Den Windows-spezifischen Code finden, der EG(windows_version_info) befüllt, sowie den von php_get_uname() verwendeten Aufruf von GetVersion(), und diese anschließend mit den in main/main.stub.php deklarierten Konstanten vergleichen. Ermitteln, ob die relevanten OSVERSIONINFOEX-Felder ohne veraltete APIs kompatibel bleiben können oder ob betroffene Userland-Konstanten als veraltet markiert werden müssen; als abgeschlossen gilt die Aufgabe, wenn die Kompatibilitätsentscheidung dokumentiert und beide veralteten Aufrufe behandelt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, php
- Bereich
- operating-systems
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100