Task #91272

Use static function reference in test case

Added by Oliver Hader 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2020-05-03
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Invoking call_user_func_array([ExampleClass::class, 'methodName'], []) on a static method throws a PHP warning.

Associated revisions

Revision 25aa35b3 (diff)
Added by Oliver Hader 2 months ago

[TASK] Use proper function reference for backend route in test case

Invoking `call_user_func_array([ExampleClass::class, 'methodName'], [])`
on a non-static method throws a PHP warning. The function reference is
declared static as `ExampleClass::class . '::methodName'` and changed
internally to a proper callable reference like
`[new ExampleClass(), 'methodName']`.

Resolves: #91272
Releases: 9.5
Change-Id: Ib6a884680c5d003447f57844888dbcb6d7313c68
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64392
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Reviewed-by: Oliver Hader <>

History

#1 Updated by Oliver Hader 2 months ago

  • Description updated (diff)

#2 Updated by Gerrit Code Review 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64392

#3 Updated by Gerrit Code Review 2 months ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64392

#4 Updated by Oliver Hader 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF