- Status changed to Needs work
almost 2 years ago 3:34pm 13 February 2023 - ๐บ๐ธUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request โ as a guide.
This will need a test case showing the issue.
- ๐จ๐ญSwitzerland berdir Switzerland
This can't be tested because that return type is bogus. save() is used as a submit callback, submit callbacks have no return value. This was just copied from the Entity save method for no reason. We should instead remove the @return from \Drupal\Core\Entity\EntityFormInterface::save().
- ๐ฎ๐ณIndia samit.310@gmail.com
samit.310@gmail.com โ made their first commit to this issueโs fork.
- Merge request !8712264370: add return value to function Drupal\Node\NodeForm::save() โ (Open) created by samit.310@gmail.com
- Status changed to Needs review
4 months ago 7:12am 9 July 2024 - ๐ฎ๐ณIndia samit.310@gmail.com
I Created a new MR(with new branch) against 11.x, as per my analysis it should be a small 1 to 2 line fix, Please review it,
It has 1 phpstan error, ideally it should not be there assave()
function has{@inheritdoc}
comment block.Thanks
Samit K. - Status changed to Needs work
4 months ago 2:42pm 9 July 2024 - ๐ฆ๐บAustralia acbramley
Cannot be tested as per #12 I also think this would fall into the bucket of a trivial fix that would be too much effort to test.
Re the rest of #12 - yes it's sort of bogus, but it is used in places to determine if it was a new or existing entity (as per the doc block).
Looking through other parts of core, there are many that are missing return values though, so just fixing NodeForm isn't really going to help us much (See CommentForm, CommentTypeForm, ActionFormBase, etc)
So I agree, we should instead deprecate the return value and remove it entirely at some point.
- ๐ง๐ชBelgium dieterholvoet Brussels
Should the return value from
EntityInterface::save
also be removed? And if so, should we create a separate issue for that or can we deal with that here?