Fix getExpectedUnauthorizedEntityAccessCacheability
Open
requested to merge issue/drupal-3469843:3469843-fix-getexpectedunauthorizedentityaccesscacheability-phpstan-0 into 11.x
5 unresolved threads
Closes #3469843
Merge request reports
Activity
829 829 return new CacheableMetadata(); 830 830 } 831 831 832 /** 833 * The cacheability of unauthorized 'view' entity access. 834 * 835 * @param bool $is_authenticated 836 * Whether the current request is authenticated or not. This matters for 837 * some entity access control handlers, but not for most. 838 * 839 * @return \Drupal\Core\Cache\CacheableMetadata 840 * The expected cacheability. 841 */ 842 protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) { changed this line in version 2 of the diff
It is not just CookieResourceTestTrait it is also from BasicAuthResourceTestTrait. But while thinking about solutions I discovered that DbLogResourceTest had the same error message. That was fixed in [#3278052] with this commit. It seem reasonable to re-use that solution, so I copied/pasted it here and adjusted the comment.
added 120 commits
-
83616262...40dfb2b0 - 118 commits from branch
project:11.x
- f043b5ca - Fix getExpectedUnauthorizedEntityAccessCacheability
- 34863b9d - same as DbLogResourceTest
-
83616262...40dfb2b0 - 118 commits from branch
829 829 return new CacheableMetadata(); 830 830 } 831 831 832 /** 833 * Empty function. 834 * 835 * Needed by PHPStan for unused function 836 * BasicAuthResourceTestTrait::assertResponseWhenMissingAuthentication(). 837 * CookieResourceTestTrait::assertResponseWhenMissingAuthentication(). 838 */ 839 protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {} changed this line in version 4 of the diff
269 269 return new CacheableMetadata(); 270 270 } 271 271 272 /** 273 * Empty function. 274 * 275 * Needed by PHPStan for unused function 276 * CookieResourceTestTrait::assertResponseWhenMissingAuthentication(). 277 */ 278 protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {} changed this line in version 4 of the diff
829 829 return new CacheableMetadata(); 830 830 } 831 831 832 /** 833 * Empty function. 834 * 835 * Needed by PHPStan for unused function 836 * BasicAuthResourceTestTrait::assertResponseWhenMissingAuthentication(). 837 * CookieResourceTestTrait::assertResponseWhenMissingAuthentication(). 838 */ 839 protected function getExpectedUnauthorizedEntityAccessCacheability(bool $is_authenticated): void {} changed this line in version 5 of the diff
269 269 return new CacheableMetadata(); 270 270 } 271 271 272 /** 273 * Empty function. 274 * 275 * Needed by PHPStan for unused function 276 * CookieResourceTestTrait::assertResponseWhenMissingAuthentication(). 277 */ 278 protected function getExpectedUnauthorizedEntityAccessCacheability(bool $is_authenticated): void {} changed this line in version 5 of the diff
added 37 commits
-
c8ed8b32...2fddf325 - 36 commits from branch
project:11.x
- 0e470cff - Merge remote-tracking branch 'origin/11.x' into...
-
c8ed8b32...2fddf325 - 36 commits from branch
added 1 commit
added 7 commits
- b46912fd - Fix getExpectedUnauthorizedEntityAccessCacheability
- 974af3ec - same as DbLogResourceTest
- 79a717fd - UserRegistrationRestTest
- 2cea124b - Apply 2 suggestion(s) to 2 file(s)
- 2763a782 - Apply 2 suggestion(s) to 2 file(s)
- e2163673 - #3469843 - Fix getExpectedUnauthorizedEntityAccessCacheability
- 359aea13 - regenerate the baseline
Toggle commit listadded 9 commits
-
ba3a786b - 1 commit from branch
project:11.x
- e38db96b - Fix getExpectedUnauthorizedEntityAccessCacheability
- 5841d488 - same as DbLogResourceTest
- 5e00b731 - UserRegistrationRestTest
- e86a9cc1 - Apply 2 suggestion(s) to 2 file(s)
- 66818394 - Apply 2 suggestion(s) to 2 file(s)
- f57736c4 - #3469843 - Fix getExpectedUnauthorizedEntityAccessCacheability
- 3c3ecfd0 - regenerate the baseline
- 006e27ef - add return
Toggle commit list-
ba3a786b - 1 commit from branch
added 113 commits
-
006e27ef...b5c5a2a3 - 104 commits from branch
project:11.x
- 68edeb45 - Fix getExpectedUnauthorizedEntityAccessCacheability
- b8d3f5da - same as DbLogResourceTest
- d3384df7 - UserRegistrationRestTest
- 77ee6678 - Apply 2 suggestion(s) to 2 file(s)
- b8649ac5 - Apply 2 suggestion(s) to 2 file(s)
- 6e71c7e2 - #3469843 - Fix getExpectedUnauthorizedEntityAccessCacheability
- a4db8f27 - regenerate the baseline
- 88628611 - add return
- e7a40d28 - rebuild baseline
Toggle commit list-
006e27ef...b5c5a2a3 - 104 commits from branch
assigned to @quietone
unassigned @quietone
added 10 commits
-
45106a68 - 1 commit from branch
project:11.x
- f43d185e - Fix getExpectedUnauthorizedEntityAccessCacheability
- 688664e0 - same as DbLogResourceTest
- 41e59e3f - UserRegistrationRestTest
- bbf10e2c - Apply 2 suggestion(s) to 2 file(s)
- 18e457ac - Apply 2 suggestion(s) to 2 file(s)
- 0f7dd4da - #3469843 - Fix getExpectedUnauthorizedEntityAccessCacheability
- d230a5a8 - regenerate the baseline
- 1cd2ac21 - add return
- 91a19835 - rebuild baseline
Toggle commit list-
45106a68 - 1 commit from branch
Please register or sign in to reply