HomePhabricator

Hard deprecate File::userCan() with $user=null
a69355cd6cf8Unpublished

Unpublished Commit · Learn More

  • Publishing Disabled: All publishing is disabled for this repository.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Hard deprecate File::userCan() with $user=null

The ArchivedFile::userCan and OldLocalFile::userCan() methods, along
with a number of other methods where the user parameter was optional,
were deprecated in 1.35, but this case was overlooked. This patch is
intended for backport to 1.35, so that the $user parameter can be
removed in 1.36 in accordance with the deprecation policy.

This path is known to be used by LocalRepo::findFile(),
FileRepo::findFile(), and FileRepo::findFileFromKey(), so hacky
workarounds have been added in this patch to avoid triggering
deprecation warnings in 1.35. T263033 has been filed to fix these
'correctly' in 1.36.

Bug: T263014
Change-Id: I17cab8ce043a5965aeab089392068b91c686025e
(cherry picked from commit 5e703cdf669f85e2924dee76c5a8831633259ce0)

Details

Provenance
cscottAuthored on Sep 16 2020, 2:56 PM
Parents
rMW534a69345051: watch.ajax: Add expiry support to watchpage.mw event
Branches
Unknown
Tags
Unknown
ChangeId
I17cab8ce043a5965aeab089392068b91c686025e

Event Timeline