bug: #3631047: Kernel tests fail on Drupal 12

Closes #3631047

Test-only change; the module code is not touched.

Changes

  • ImageImporterTest, CameraTypeVocabTest, OrganizationLabelTest, OrganizationAccessTest: enable filter. In Drupal 12, TextItemBase::applyDefaultValue() asks FilterFormatRepositoryInterface for the fallback format whenever a text field item is created, and kernel tests do not enable the text dependency on filter by themselves.
  • EntityCrudTest: setUp() installs the mapillary_image_type and mapillary_image schemas too, because the mapillary_entity config creates field storages on images. Drupal 11.2 deprecates creating a field storage before its entity schema; Drupal 12 throws a LogicException. The duplicate schema install in testImageCreateLoadDelete() is removed.
  • EntityApiPermissionsTest: testHandlers() and testRoutes() get their own data providers (bundleEntityTypeProvider(), entityTypeIdProvider()), built from entityTypeProvider(), so each data set has only the arguments the test accepts. PHPUnit 12 warned about the extra arguments.
  • CHANGELOG entry under Unreleased.

Upgrade path

None needed: no code, config or schema change.

Tests

The six changed classes pass on:

  • Drupal 11.4.8, PHP 8.5, PHPUnit 11.5, PostgreSQL. The "field storage definition without the entity schema" deprecation is gone from EntityCrudTest.
  • Drupal 12.0.0-beta1, PHP 8.5, PHPUnit 12.5, SQLite, with the Drupal 12 merge requests of Geofield (#3598572), Entity API (#3553240) and Leaflet (#3599631) and || ^12 added locally to the Entity API and Leaflet info files. EntityApiPermissionsTest passes with --fail-on-phpunit-warning.

phpcs (Drupal, DrupalPractice) and phpstan (level 6) report nothing on the changed lines.

Out of scope

The next major jobs stay manual: with the current Geofield release (10.3.4) they fail before reaching these tests, until #3598572 is released.

Merge request reports

Loading
Loading