Drupal 10 has dropped toInt and drupal_get_path

Created on 14 December 2023, 11 months ago
Updated 17 December 2023, 11 months ago

Problem/Motivation

Drupal 10 has dropped deprecated methods toInt and drupal_get_path

Steps to reproduce

Install Block Upload in Drupal 10

Proposed resolution

Fix BlockUploadBuild.php:
- 'file_validate_size' => [Bytes::toInt($settings['max_filesize'])],
+ 'file_validate_size' => [Bytes::toNumber($settings['max_filesize'])],

Fix BlockUploadForm.php:
- $module_path = drupal_get_path('module', 'block_upload');
+ $module_path = \Drupal::service('extension.list.module')->getPath('block_upload');

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇸🇪Sweden gugrim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024