Closed (fixed)
Project:
Geocoder
Version:
8.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2026 at 09:31 UTC
Updated:
1 Oct 2026 at 20:50 UTC
Jump to comment: Most recent
phpcs is green now, but phpstan still fails on 8.x-4.x with 5 errors not covered by the baseline:
FieldItemInterface::$value — in the geocode field formatters.drupal.entityStorageDirectInjection — in GeocoderProviderListBuilder.Real fixes, no baseline/ignores:
$item->getValue()['value'] instead of the magic $item->value (PHPStan can't resolve it on the generic FieldItemInterface).EntityTypeManagerInterface into the list builder and derive the storage from it.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
Comment #3
velmir_taky commentedNo baseline/ignores — fixed all 5 for real.
- Formatters read the item value via
$item->getValue()['value']instead of the magic$item->value. Same value at runtime — checked the file/address case too, where the preprocessor setsvaluedynamically andgetValue()still returns it. PHPStan just couldn't resolve the magic property onFieldItemInterface.-
GeocoderProviderListBuildernow takesentity_type.managerand derives the storage from it, as the rule suggests.Added kernel tests for the changed paths (Geocode formatter, reverse-geocode geofield formatter, provider list builder). phpstan and phpunit are green.
Comment #6
itamair commented