- Issue created by @quietone
- Status changed to Needs review
4 months ago 7:39am 23 August 2024 - Status changed to RTBC
4 months ago 12:21pm 23 August 2024 - 🇺🇸United States smustgrave
Seems straight forward and failure appears to be random block one.
- Status changed to Needs work
3 months ago 3:19pm 13 September 2024 - 🇳🇿New Zealand quietone
If we can continue to use this solution then the remaining instance, in UserRegistrationRestTest, can be fixed.
- 🇺🇸United States smustgrave
Actually since these aren't doing anything do we need the parameter to be based? Surprised now a phpstan rule that picks up unused parameter
- 🇳🇿New Zealand quietone
What is the work to do here? If there is work to be done from #10, can you be more specific? I do not understand the question in #10.
- 🇺🇸United States smustgrave
I meant why add bool $is_authenticated?
NW for the rebase though.
- First commit to issue fork.
- 🇺🇸United States smustgrave
So seems now we are trading 1 phpstan error for another. Does it need to return something (even empty string)
- 🇳🇿New Zealand quietone
So, void no longer work here. How about adding a return of \Drupal\Core\Cache\CacheableMetadata which is what is expected by the parent method, \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability/
The Needs Review Queue Bot → tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇳🇿New Zealand quietone
Rebase with conflicts in the baseline, which I then rebuilt.
- 🇦🇺Australia mstrelan
I think this fix is just covering up a code smell. The method
getExpectedUnauthorizedEntityAccessCacheability
exists in\Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase
but not in\Drupal\Tests\rest\Functional\ResourceTestBase
, yet the test trait that calls this method is added to classes that don't extend fromEntityResourceTestBase
. If we're saying this method needs to exist in all child classes then we might as well just add it to the base, but that makes it clear that it doesn't belong there. Ideally it should be refactored out of the shared trait, or failing that we should check if$this instanceof EntityResourceTestBase
before calling that function.