[go: up one dir, main page]

Page MenuHomePhabricator

Rework auth/session related tests to avoid dynamic properties under php8.2
Closed, ResolvedPublic

Description

Tests in mediawiki about AuthManager and AuthenticationRequest with the subclasses are using dynamic properties on mocks or on the objects to transfer stats within the test.
With php8.2 the use of dynamic properties is deprecated and the tests needs adjust for that.

This affects many tests, here a list I have found so far:

Deprecated: Creation of dynamic property Mock_AuthenticationRequest_3f593528::$foobar is deprecated in /workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php on line 1234

159) MediaWiki\Auth\ButtonAuthenticationRequestTest::testLoadFromSubmission with data set "Button present" (array('foo', 'bar', 'baz'), array('Foobar'), array('foo', 'bar', 'baz', true))
Creation of dynamic property MediaWiki\Auth\ButtonAuthenticationRequest::$foo is deprecated

/workspace/src/includes/auth/AuthenticationRequest.php:173
/workspace/src/tests/phpunit/includes/auth/AuthenticationRequestTestCase.php:89

16) MediaWiki\Auth\AbstractPrimaryAuthenticationProviderTest::testProviderRevokeAccessForUser
Creation of dynamic property Mock_AuthenticationRequest_a7566a60::$done is deprecated

/workspace/src/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php:70

17) MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest::testBeginLinkAttempt
Creation of dynamic property Mock_AuthenticationRequest_008ef495::$id is deprecated

/workspace/src/tests/phpunit/includes/auth/ConfirmLinkSecondaryAuthenticationProviderTest.php:122
/workspace/src/tests/phpunit/includes/auth/ConfirmLinkSecondaryAuthenticationProviderTest.php:183

18) MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest::testContinueLinkAttempt
Creation of dynamic property Mock_AuthenticationRequest_008ef495::$id is deprecated

/workspace/src/tests/phpunit/includes/auth/ConfirmLinkSecondaryAuthenticationProviderTest.php:122
/workspace/src/tests/phpunit/includes/auth/ConfirmLinkSecondaryAuthenticationProviderTest.php:205

19) MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProviderTest::testTryReset
Creation of dynamic property MediaWiki\Auth\PasswordAuthenticationRequest::$allow is deprecated

/workspace/src/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php:125

11) MediaWiki\Auth\AuthManagerTest::testAuthentication with data set "Failure in pre-auth" (StatusValue Object (...), array(), array(), array(MediaWiki\Auth\AuthenticationResponse Object (...), MediaWiki\Auth\AuthenticationResponse Object (...)))
Creation of dynamic property MediaWiki\Auth\RememberMeAuthenticationRequest::$pre is deprecated

/workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php:1011

22) MediaWiki\Auth\AuthManagerTest::testAccountCreation with data set "Pre-creation test fail in pre" (StatusValue Object (...), StatusValue Object (...), StatusValue Object (...), array(), array(), array(MediaWiki\Auth\AuthenticationResponse Object (...)))
Creation of dynamic property Mock_AuthenticationRequest_49376c5e::$preTest is deprecated

/workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php:2094

32) MediaWiki\Auth\AuthManagerTest::testGetAuthenticationRequests with data set #0 ('login', array('pre-login', 'primary-none-login', 'primary-create-login', 'primary-link-login', 'secondary-login', 'generic'))
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$key is deprecated

/workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php:3067

41) MediaWiki\Auth\AuthManagerTest::testGetAuthenticationRequestsRequired
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$key is deprecated

/workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php:3269

48) MediaWiki\Auth\AuthManagerTest::testAccountLink with data set "Primary pass" (StatusValue Object (...), array(MediaWiki\Auth\AuthenticationResponse Object (...)), array(MediaWiki\Auth\AuthenticationResponse Object (...)))
Creation of dynamic property Mock_AuthenticationRequest_49376c5e::$primary is deprecated

/workspace/src/tests/phpunit/includes/auth/AuthManagerTest.php:3620

49) MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest::testProviderAllowsAuthenticationDataChange with data set #0 ('MediaWiki\Auth\AuthenticationRequest', 'UTSysop', Status Object (...), StatusValue Object (...), StatusValue Object (...))
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$password is deprecated

/workspace/src/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php:401

50) MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest::testProviderChangeAuthenticationData with data set #0 (false, 'MediaWiki\Auth\AuthenticationRequest', false, false)
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$password is deprecated

/workspace/src/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php:495

52) MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest::testProviderAllowsAuthenticationDataChange with data set #0 ('MediaWiki\Auth\AuthenticationRequest', 'UTSysop', Status Object (...), StatusValue Object (...), StatusValue Object (...))
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$password is deprecated

/workspace/src/tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php:406

53) MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest::testProviderChangeAuthenticationData with data set #0 ('UTSysop', 'MediaWiki\Auth\AuthenticationRequest', false)
Creation of dynamic property Mock_AuthenticationRequest_e4e9e57d::$password is deprecated

/workspace/src/tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php:484

2) MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest::testProviderChangeAuthenticationData with data set #0 (false, 'MediaWiki\Auth\AuthenticationRequest', false, false)
Creation of dynamic property Mock_AuthenticationRequest_b778f1f8::$password is deprecated

/workspace/src/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php:496

and Session:

155) MediaWiki\Session\SessionManagerTest::testGetSessionForRequest
Creation of dynamic property FauxRequest::$unpersist1 is deprecated

/workspace/src/tests/phpunit/includes/session/SessionManagerTest.php:151

Event Timeline

Umherirrender renamed this task from Rework auth related tests to avoid dynamic properties under php8.2 to Rework auth/session related tests to avoid dynamic properties under php8.2.Jan 7 2023, 8:14 PM
Umherirrender updated the task description. (Show Details)

Change 976853 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/976853

Change 976853 merged by jenkins-bot:

[mediawiki/core@master] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/976853

Change 977222 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/977222

Change 977246 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/977246

Change 977786 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/977786

Change 977246 merged by jenkins-bot:

[mediawiki/core@master] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/977246

Change 977222 merged by jenkins-bot:

[mediawiki/core@master] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/977222

Change 977786 merged by jenkins-bot:

[mediawiki/core@master] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/977786

Change #1017394 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_41] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017394

Change #1017395 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_40] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017395

Change #1017396 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_39] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017396

Change #1017394 merged by jenkins-bot:

[mediawiki/core@REL1_41] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017394

Change #1017395 merged by jenkins-bot:

[mediawiki/core@REL1_40] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017395

Change #1017396 merged by jenkins-bot:

[mediawiki/core@REL1_39] tests: Create new classes to hold dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017396

Change #1017399 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017399

Change #1017400 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017400

Change #1017399 merged by jenkins-bot:

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017399

Change #1017400 merged by jenkins-bot:

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017400

Change #1017405 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017405

Change #1017405 merged by jenkins-bot:

[mediawiki/core@REL1_41] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017405

Change #1017431 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017431

Change #1017432 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017432

Change #1017432 merged by jenkins-bot:

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017432

Change #1017431 merged by jenkins-bot:

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in AuthenticationProvider Test

https://gerrit.wikimedia.org/r/1017431

Change #1017435 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017435

Change #1017438 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017438

Change #1017435 merged by jenkins-bot:

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017435

Change #1017444 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017444

Change #1017438 merged by jenkins-bot:

[mediawiki/core@REL1_40] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017438

Change #1017444 merged by jenkins-bot:

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in auth tests

https://gerrit.wikimedia.org/r/1017444

Change #1017467 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017467

Change #1017467 merged by jenkins-bot:

[mediawiki/core@REL1_39] tests: Avoid dynamic properties in SessionManagerTest

https://gerrit.wikimedia.org/r/1017467