rfc:process_object_name

Straw poll: How to name the Process resource after it is converted to an object

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 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 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 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

How to name the Process resource (first choice)
Real name Process ProcessHandle OS\Process
alcaeus (alcaeus)   
brzuchal (brzuchal)   
crell (crell)   
derick (derick)   
kocsismate (kocsismate)   
mbeccati (mbeccati)   
nicolasgrekas (nicolasgrekas)   
ocramius (ocramius)   
sergey (sergey)   
timwolla (timwolla)   
Final result: 4 5 1
This poll has been closed.

Second choice

How to name the Process resource (second choice)
Real name Process ProcessHandle OS\Process
alcaeus (alcaeus)   
brzuchal (brzuchal)   
crell (crell)   
derick (derick)   
kocsismate (kocsismate)   
mbeccati (mbeccati)   
ocramius (ocramius)   
sergey (sergey)   
timwolla (timwolla)   
Final result: 4 2 3
This poll has been closed.

Third choice

How to name the Process resource (third choice)
Real name Process ProcessHandle OS\Process
alcaeus (alcaeus)   
brzuchal (brzuchal)   
crell (crell)   
derick (derick)   
kocsismate (kocsismate)   
mbeccati (mbeccati)   
ocramius (ocramius)   
sergey (sergey)   
timwolla (timwolla)   
Final result: 1 3 5
This poll has been closed.
rfc/process_object_name.txt · Last modified: 2023/11/07 21:02 by kocsismate