It's a simple wrapper around a service. Use the service instead.

Files: 
CommentFileSizeAuthor
#15 deprecate-file-usage-2104229-15.patch20.42 KBclaudiu.cristea
PASSED: [[SimpleTest]]: [MySQL] 59,052 pass(es).
[ View ]
#11 deprecate-file-usage-2104229-11.patch20.38 KBclaudiu.cristea
PASSED: [[SimpleTest]]: [MySQL] 58,978 pass(es).
[ View ]
#10 interdiff.txt670 bytesclaudiu.cristea
#10 deprecate-file-usage-2104229-10.patch21.93 KBclaudiu.cristea
PASSED: [[SimpleTest]]: [MySQL] 60,119 pass(es).
[ View ]
#4 deprecate-file-usage-2104229-4.patch21.81 KBclaudiu.cristea
PASSED: [[SimpleTest]]: [MySQL] 59,030 pass(es).
[ View ]
#2 deprecate-file-usage-2104229-1.patch24.92 KBclaudiu.cristea
PASSED: [[SimpleTest]]: [MySQL] 58,809 pass(es).
[ View ]

Comments

Priority:Normal» Minor
Status:Active» Needs review
Issue tags:+API clean-up

Patch.

StatusFileSize
new24.92 KB
PASSED: [[SimpleTest]]: [MySQL] 58,809 pass(es).
[ View ]

Ah, missed the patch :)

Status:Needs review» Postponed

Postponing this to be sure that I don't have to rework this if it goes in before #2073033: Optimize file usage updates in file/image fields.

Status:Postponed» Needs review
StatusFileSize
new21.81 KB
PASSED: [[SimpleTest]]: [MySQL] 59,030 pass(es).
[ View ]

Reviewers? :)

#4: deprecate-file-usage-2104229-4.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

We do know use \Drupal:: in tests, but I don't think this is important if we don't have a dedicated method on the Drupal class for file usage.

Thank you. I have verified and no usage left of file_usage() other then function definition. Patch is green so RTBC.

Issue summary:View changes
Status:Reviewed & tested by the community» Needs work

+++ b/core/includes/file.inc
@@ -916,7 +916,6 @@ function file_create_filename($basename, $directory) {
- * @see file_usage()->listUsage()
@@ -933,7 +932,6 @@ function file_delete($fid) {
- * @see file_usage()->listUsage()

Do we really want to remove the @see. These seem helpful to me. I would change these to @see \Drupal\file\FileUsage\FileUsageBase::delete()

Status:Needs work» Needs review
StatusFileSize
new21.93 KB
PASSED: [[SimpleTest]]: [MySQL] 60,119 pass(es).
[ View ]
new670 bytes

Oh! OK, then.

StatusFileSize
new20.38 KB
PASSED: [[SimpleTest]]: [MySQL] 58,978 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

Back to RTBC.

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Status:Fixed» Needs work

Sorry, this conflicted with #2131851: Form errors must be specific to a form and not a global which was a critical issue so I ended up reverting this so that one could make it in. So this will need a small re-roll.

Status:Needs work» Needs review
StatusFileSize
new20.42 KB
PASSED: [[SimpleTest]]: [MySQL] 59,052 pass(es).
[ View ]

Rerolled.

Status:Needs review» Reviewed & tested by the community

Back to RTBC

Status:Reviewed & tested by the community» Fixed

Ok, re-committed to 8.x. :) Thanks.

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.