While working on other issue, AI proposed many changes that improve code quality, these changes remove deprecations and phpstan errors, so i will commit then.
Resolved Issues:
1. PHPStan Errors (Static Analysis):
* Unsafe usage of new static(): Changed the CustomFilterDeleteForm class to final.
* Missing return value: Added the required return status in the save() method of CustomFilterForm.
* Undefined variable: Initialized the $result variable in the replaceCallback method of CustomFilterBaseFilter to avoid warnings about potentially undefined variables during eval().
* Deprecated class: Replaced the deprecated DrupalSqlBase class with SqlBase in CustomFilterMigrationSource, ensuring compatibility with Drupal 11/12.
* Missing attribute: Added the correct import for the #[RunTestsInSeparateProcesses] attribute in CustomFilterTest.
2. PHPUnit Deprecations in Drupal 11:
* Added the #[RunTestsInSeparateProcesses] attribute to all Kernel test classes (CustomFilterD6MigrationTest and CustomFilterD7MigrationTest), as required by the latest versions of
Drupal 11.
3. Routing Errors:
* Identified and fixed missing leading slashes (/) in several paths within the customfilter.routing.yml file, which is a common cause of validation failures.
Comments
Comment #3
yukare commented