Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jul 2024 at 17:03 UTC
Updated:
14 Aug 2025 at 22:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #5
nishtha.pradhan commentedAdded a deprecation notice for use of $variables['view'].
Comment #6
nishtha.pradhan commentedComment #7
ankitv18 commentedHi,
I've reviewed the MR and left a comment.
Please cover the deprecation part and revert the other changes.
Note: Issue URL should be replaced with the document URL of the deprecation.
cc: @catch
Comment #8
nishtha.pradhan commentedThank you for your feedbacks @guptahemant & @ankitv18.
I have worked upon them and updated the MR.
Please do let me know if any other changes are required.
Comment #9
quietone commented@nishtha.pradhan, thanks for creating a change record for this issue, that is most helpful. Change records are published after an issue is committed and doing that is part of a core committer's tasks. So, please leave change records at draft. Thanks.
Comment #10
smustgrave commentedLeft a comment on the MR.
But can we also add a deprecation test for this.
Comment #11
nishtha.pradhan commentedComment #12
vinmayiswamy commentedHi,
I have verified MR !8663 on Drupal 11.x. The suggested changes have been updated. I checked the deprecation message by creating a sample view for testing, and I can confirm that the deprecation message appears on the dump.
Please see the attached screenshot for reference.
Additionally, @smustgrave mentioned in comment #10 the possibility of adding a deprecation test for this. Do we need to include a deprecation test? If so, we may need to move this issue to NW. Otherwise, I'm giving a +1 to RTBC.
Thanks!
Comment #13
ankitv18 commentedTests are failing ~~ moving back to NW
Comment #14
ankitv18 commentedRebased the forked branch and pipelines are executed without any failure, hence moving into review
Comment #15
ankitv18 commentedComment #16
smustgrave commentedShould have some sort of test coverage
Comment #17
quietone commentedThere is no special logic related to the deprecation so tests should not be needed. See point 3 of How to deprecate. And we can see a previous example here, #3458183: Deprecate $variables['teaser'].
I updated the change record so the variable name and code are in code blocks. Also removed the phrase 'for now' as there is no intention to replace this.
Comment #18
quietone commentedForgot to add that I searched for usages and found none.
Comment #21
nod_Committed 892c404 and pushed to 11.x. Thanks!
Comment #23
berdirThis missed the same in comment preprocess, I'm going to try and deprecate that as part of #2728419: Deprecate node/comment views-based theme suggestions and variables
I also updated the change record to clarify that this isn't about using node.view instead. Neither is safe and has caching bugs and should not be used at all.