====== Straw poll: How to name the Process resource after it is converted to an object ======
* Date: 2023-10-19
* Author: Máté Kocsis kocsismate@php.net
* Status: Closed
* Implementation: https://github.com/php/php-src/pull/12098/
===== Introduction =====
Since PHP 8.0, PHP resources are actively converted to "opaque" objects as part of the https://github.com/php/php-tasks/issues/6 project. After a two-year pause, new resources will be affected for PHP 8.4: most importantly, the "Process" resource returned by ''proc_open()''. However, a naming debate started during its migration.
Originally, the implementation used the ''Process'' class name, then various other suggestions were received [[https://externals.io/message/121164|in the mail thread]] and privately as well: ''OS\Process'', ''Proc'', ''ProcessHandle''. As none of the names appear to have a consensus, I decided to create a straw poll.
===== Discussion =====
==== Process ====
The most straightforward and clearest name, since this is also how the respective resource is called. On the other hand, the name might clash with userspace class names, although it should be mentioned that the global namespace is reserved for PHP itself.
==== Proc ====
This name is consistent with the name of the related functions. However, according to the [[rfc:class-naming|Class Naming]] RFC, abbreviations should be avoided where possible, and this is clearly a case, when an abbreviation is not necessary. Thus, this option is not proposed for the vote.
==== ProcessHandle ====
This name is a good compromise between clarity and addressing the backward compatibility concerns. Using the ''Handle'' postfix is not without precedent, as there are already some classes with a similar name which were introduced lately: ''CurlHandle'', ''CurlMultiHandle'', and ''CurlShareHandle''.
==== OS\Process ====
Using the ''OS'' namespace would mitigate any possible backward compatibility concerns. On the other hand, the ''OS'' namespace would have no other symbols besides ''Process'', and as far as I know, currently there is no plan to add anything into it.
===== Vote =====
This is a ranked-choice poll (following [[https://en.wikipedia.org/wiki/Single_transferable_vote#Example|STV]]) between the naming alternatives. Vote starts on 2023-10-24 18:00:00 UTC and ends on 2023-11-07 18:00:00 UTC.
==== First choice ====
* Process
* ProcessHandle
* OS\Process
==== Second choice ====
* Process
* ProcessHandle
* OS\Process
==== Third choice ====
* Process
* ProcessHandle
* OS\Process