Problem/Motivation
We are using file_validate functions in MarkerIconService.php:
$this->fileUploadValidators = [
'file_validate_extensions' => !empty($this->geofieldMapSettings->get('theming.markers_extensions')) ? [$this->geofieldMapSettings->get('theming.markers_extensions')] : ['gif png jpg jpeg'],
'file_validate_size' => !empty($this->geofieldMapSettings->get('theming.markers_filesize')) ? [Bytes::toNumber($this->geofieldMapSettings->get('theming.markers_filesize'))] : [Bytes::toNumber('250 KB')],
];
But these have been deprecated in 10.2, and are removed in Drupal 11 (See https://www.drupal.org/node/3363700). This module is marked as D11 compatible, so we should replace these validations with the new Contraint plugins.
Since these new constraint plugins were introduced in 10.2, and geofield_map only works on Drupal versions from 10.2 and up, we don't need to introduce any backwards compatibility. So just replacing the code is fine.
Comments
Comment #3
gueguerreiroOpened an MR with the fix, for review.
Comment #4
itamair commentedThanks @gueguerreiro, nice catch!
Already merged and deployed with new geofield_map 11.1.1 release
Comment #7
itamair commented