HomePhorge

TempFSFile: Use a WeakMap for reference tracking if available

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

TempFSFile: Use a WeakMap for reference tracking if available

Use a WeakMap to track references to TempFSFile instances if available
to avoid deprecation warnings for dynamic property creation on PHP 8.2.
Use an anonymous class rather than an stdClass to test the behavior in
TempFSFileTestTrait to verify that bind() does not trigger dynamic
property creation on PHP 8.2.

Also add a Phan stub for WeakMap for PHP 7.4.

Bug: T324894
Change-Id: Ic413c115e9ed1c750e175152094f3309628e777a
(cherry picked from commit 4e3c6cb25db4423dcc093f63dcbe04d45d8781bb)

Details

Provenance
Máté Szabó <mszabo@fandom.com>Authored on Feb 12 2023, 2:05 PM
Reedy <reedy@wikimedia.org>Committed on Feb 21 2023, 9:48 PM

Event Timeline

Reedy <reedy@wikimedia.org> committed rMWbac194b6197f: TempFSFile: Use a WeakMap for reference tracking if available (authored by Máté Szabó <mszabo@fandom.com>).Feb 21 2023, 9:48 PM

Commit No Longer Exists

This commit no longer exists in the repository.