Rename Fiber::this() to Fiber::getCurrent()

From: Date: Tue, 15 Jun 2021 19:01:29 +0000
Subject: Rename Fiber::this() to Fiber::getCurrent()
Groups: php.internals 
Request: Send a blank email to internals+get-114893@lists.php.net to get a copy of this message
Hi all,

During the Fiber RFC vote, several people noted that they objected to the name Fiber::this() for the
method returning the currently executing Fiber object.

I'd like to propose renaming this method to Fiber::getCurrent(). A simple PR for the rename: https://github.com/php/php-src/pull/7155
Nothing has functionally changed about the method, only the name.

Fiber::current() is another possibility, but was not chosen because it may be conflated with
Iterator::current().

Does anyone object to this rename? Shall we have a vote or is that not necessary?

Cheers,
Aaron Piotrowski


Thread (3 messages)

« previous php.internals (#114893) next »