- ๐บ๐ธUnited States lhridley
From what I've been able to determine, there are no tests in Core that actually pass a value for the first parameter,
$match
. All calls that I can locate call this method with no values passed for the parameters, instead taking the default values. I limited my search to Drupal Core versions 10 and 11.The Core Kernel test that exists calls the method without any parameters, so default values are used.
In addition, all of the tests that I have located are in core modules that have bundles, so I don't think that a test exists for this.
So, this begs the question:
* Are there Core or contrib entities that exist without a bundle?
* Do we need a test for this in Core?If the answer to both is no, then:
* what is the purpose of the first parameter, and what is a use case where a value would be passed?
* If it has no real world purpose, should the API be changed to remove it? - Status changed to Needs review
3 months ago 3:13am 2 April 2025 - ๐ฎ๐ณIndia andol
We need more info on this ticket to proceed further. Updates to this ticket hasn't been made in a while.
The Needs Review Queue Bot โ tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request โ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- ๐ฎ๐ณIndia priya.chat
Hey,
Adding a patch for documentation of the return type as I'm currently facing issues with the merge request setup, so submitting this as a patch instead (though MR is the preferred method).Tried to add example for better understanding of the return type especially for entity types without bundlesโwhere the array should use an empty string ('') as the top-level key.
Please review and share feedback. Happy to revise if needed.