Generated with the help of an LLM

Problem/Motivation

Update/extend the Drupal Geofield module compatibility / deprecations fixes with Drupal 12,
still guaranteeing backwood compatibility with Drupal 10.3 and Drupal 11.

Data model changes

Move geofield.module helper functions into GeofieldService

Drupal 11.5 deprecates code in .module files, and flags any function
there that has no #[LegacyHook] attribute. geofield.module now holds only
#[LegacyHook] wrappers (plus its constants), like geofield_map.module.

- Add the geofield.service service (Drupal\geofield\Services\
GeofieldService) with radiusOptions() and haversine(), which replace
geofield_radius_options() and geofield_haversine(). The procedural
functions are removed.
- Move hook_field_type_category_info_alter() into
GeofieldHooks::fieldTypeCategoryInfoAlter(), with a #[LegacyHook]
wrapper kept for Drupal 10.3 and 11.0.
- Inject the service into GeofieldProximityFilter and
GeofieldProximityArgument through an optional constructor argument
that falls back to the container, so subclasses keep working.
- Add the new \Drupal calls to the PHPStan baseline.

- .gitlab-ci.yml updated to run the Drupal 12 (next major) CI jobs automatically

Issue fork geofield-3644014

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

itamair created an issue. See original summary.

itamair’s picture

Issue summary: View changes

itamair’s picture

Status: Active » Needs review