upskill-event-manager/wordpress-dev/vendor/phpunit/phpunit/DEPRECATIONS.md
bengizmo 37f7b426b6 feat: Implement auto page creation & fix login E2E tests
Implements automatic creation of required plugin pages (Community Login,
Trainer Registration, Trainer Dashboard) upon plugin activation. This
addresses E2E test failures caused by missing pages in the test
environment.

- Adds activation hook in `hvac-community-events.php` to call
  `hvac_ce_create_required_pages`.
- The callback function checks for existing pages by slug and creates
  them using `wp_insert_post` if missing. Includes debug logging.

Also fixes issues identified during E2E test debugging:
- Corrects fatal error in `includes/community/class-login-handler.php`
  by replacing undefined constant `HVAC_COMMUNITY_EVENTS_PATH` with
  `HVAC_CE_PLUGIN_DIR`.
- Updates `tests/e2e/tests/login.spec.ts` to use the correct selector
  `#wp-submit` for the login form submit button instead of
  `button[type="submit"]`.

Documentation updates:
- Adds `docs/automatic-page-creation-plan.md`.
- Updates `README.md` regarding automatic page creation.
- Updates Memory Bank files (`decisionLog.md`, `progress.md`,
  `activeContext.md`).

Note: Activation hook logging did not appear during WP-CLI activation,
requiring further investigation if page creation issues persist. E2E
test confirmation pending.
2025-03-28 17:18:21 -03:00

11 KiB

Deprecations

Soft Deprecations

This functionality is currently soft-deprecated:

Writing Tests

Test Double API

Issue Description Since Replacement
#3687 MockBuilder::setMethods() 8.3.0
#3687 MockBuilder::setMethodsExcept() 9.6.0

Hard Deprecations

This functionality is currently hard-deprecated:

Writing Tests

Assertions, Constraints, and Expectations

Issue Description Since Replacement
#4062 TestCase::assertNotIsReadable() 9.1.0 TestCase::assertIsNotReadable()
#4065 TestCase::assertNotIsWritable() 9.1.0 TestCase::assertIsNotWritable()
#4068 TestCase::assertDirectoryNotExists() 9.1.0 TestCase::assertDirectoryDoesNotExist()
#4071 TestCase::assertDirectoryNotIsReadable() 9.1.0 TestCase::assertDirectoryIsNotReadable()
#4074 TestCase::assertDirectoryNotIsWritable() 9.1.0 TestCase::assertDirectoryIsNotWritable()
#4077 TestCase::assertFileNotExists() 9.1.0 TestCase::assertFileDoesNotExist()
#4080 TestCase::assertFileNotIsReadable() 9.1.0 TestCase::assertFileIsNotReadable()
#4083 TestCase::assertFileNotIsWritable() 9.1.0 TestCase::assertFileIsNotWritable()
#4086 TestCase::assertRegExp() 9.1.0 TestCase::assertMatchesRegularExpression()
#4089 TestCase::assertNotRegExp() 9.1.0 TestCase::assertDoesNotMatchRegularExpression()
#4091 TestCase::assertEqualXMLStructure() 9.1.0
#5062 TestCase::expectDeprecation() 9.6.0
#5062 TestCase::expectDeprecationMessage() 9.6.0
#5062 TestCase::expectDeprecationMessageMatches() 9.6.0
#5062 TestCase::expectError() 9.6.0
#5062 TestCase::expectErrorMessage() 9.6.0
#5062 TestCase::expectErrorMessageMatches() 9.6.0
#5062 TestCase::expectNotice() 9.6.0
#5062 TestCase::expectNoticeMessage() 9.6.0
#5062 TestCase::expectNoticeMessageMatches() 9.6.0
#5062 TestCase::expectWarning() 9.6.0
#5062 TestCase::expectWarningMessage() 9.6.0
#5062 TestCase::expectWarningMessageMatches() 9.6.0
#4601 TestCase::assertClassHasAttribute() 9.6.1
#4601 TestCase::assertClassNotHasAttribute() 9.6.1
#4601 TestCase::assertClassHasStaticAttribute() 9.6.1
#4601 TestCase::assertClassNotHasStaticAttribute() 9.6.1
#4601 TestCase::assertObjectHasAttribute() 9.6.1 TestCase::assertObjectHasProperty()
#4601 TestCase::assertObjectNotHasAttribute() 9.6.1 TestCase::assertObjectNotHasProperty()
#4601 TestCase::classHasAttribute() 9.6.1
#4601 TestCase::classHasStaticAttribute() 9.6.1
#4601 TestCase::objectHasAttribute() 9.6.1
#4601 ClassHasAttribute 9.6.1
#4601 ClassHasStaticAttribute 9.6.1
#4601 ObjectHasAttribute 9.6.1 ObjectHasProperty

Test Double API

Issue Description Since Replacement
#4141 TestCase::prophesize() 9.1.0 phpspec/prophecy-phpunit
#4297 TestCase::at() 9.3.0
#4297 InvokedAtIndex 9.3.0
#5063 InvocationMocker::withConsecutive() 9.6.0
#5063 ConsecutiveParameters 9.6.0
#5064 TestCase::getMockClass() 9.6.0

Miscellaneous

Issue Description Since Replacement
#5132 Test suffix for abstract test case classes
TestCase::$backupGlobalsBlacklist 9.3.0 TestCase::$backupGlobalsExcludeList
TestCase::$backupStaticAttributesBlacklist 9.3.0 TestCase::$backupStaticAttributesExcludeList

Extending PHPUnit

Issue Description Since Replacement
#4676 TestListener 8.0.0 Event System
#4039 Command::handleLoader() 9.1.0
#4039 TestSuiteLoader 9.1.0
#4039 StandardTestSuiteLoader 9.1.0
#4676 TestListenerDefaultImplementation 8.2.4 Event System