Problem/Motivation

There are a few test modules with .module files to be converted.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3625015

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Status: Active » Needs review
amitgoyal’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed MR !17215 for RTBC.

Changes:
- Removed deprecation_test.module and the deprecation_hook_attribute_test module: deprecation_test_function() moved to DeprecatedController::testDeprecation(), and the deprecated hook/alter implementations from deprecation_hook_attribute_test merged into deprecation_test's DeprecationTestHooks class. Updated expected deprecation messages accordingly in ModuleHandlerDeprecatedHookTest and BrowserTestBaseTest.
- Removed system_test.module: _system_test_first_shutdown_function() and _system_test_second_shutdown_function() converted to static methods SystemTestController::firstShutdown() / ::secondShutdown(), with drupal_register_shutdown_function() calls updated to the new callables.
- Removed the two updated_module.module fixture files under package_manager's build test projects (1.0.0 and 1.1.0). No functional replacement needed here since the only test that exercises this fixture, PackageUpdateTest::testPackageUpdate, is currently skipped pending #3508109.
- Updated .phpstan-baseline.php entry to match the new deprecated method's identifier (staticMethod.deprecated instead of function.deprecated) and message text.

Verification:
- CI pipeline #972049 passed with warnings -- the only failed jobs are PHPUnit Unit (Core/Component): [8.6-ubuntu], which is the intentionally allowed-to-fail "next PHP major" lane (exit_codes: 100 in .gitlab-ci.yml); failures there are pre-existing/unrelated to this diff.
- No open unresolved threads on the MR.
- Checked out the branch locally and ran the affected test classes in DDEV (PHP 8.5):
- ModuleHandlerDeprecatedHookTest -- 3/3 pass
- ShutdownFunctionsTest -- 1/1 pass
- BrowserTestBaseTest::testDeprecationTriggeredInSystemUnderTest -- 1/1 pass
- Ran PHPCS (Drupal, DrupalPractice) on all changed files. SystemTestController.php and BrowserTestBaseTest.php show pre-existing violations (camelCase method names, \Drupal:: calls, missing docblocks, unserialize() warning) -- confirmed these are present on unmodified main too, so not introduced by this change.
- No public API change, so no Change Record needed.

Moving to RTBC.