Deprecated: Required parameter $stroke_width, $padding, $definition, $highlight , follows optional parameter $width

Created on 2 September 2022, about 2 years ago
Updated 7 February 2023, almost 2 years ago

Problem/Motivation

Deprecated: Required parameter $stroke_width follows optional parameter $width in layout_settings/src/Plugin/LayoutSettingsManager.php on line 214
Deprecated: Required parameter $padding follows optional parameter $width in layout_settings/src/Plugin/LayoutSettingsManager.php on line 214
Deprecated: Required parameter $definition follows optional parameter $width in layout_settings/src/Plugin/LayoutSettingsManager.php on line 214
Deprecated: Required parameter $highlight follows optional parameter $width in layout_settings/src/Plugin/LayoutSettingsManager.php on line 214

Steps to reproduce

Drupal 9.4.5, PHP VersiΓ³n 8+

Layout settings 2.0.0-beta3.

When declaring a function or a method, adding a required parameter after optional parameters is deprecated since PHP 8.0.

Proposed resolution

Make a patch that optional parameters ($width = 125, $height = 150) at the end of the parameter list. in web/modules/contrib/layout_settings/src/Plugin/LayoutSettingsManager.php line 214 function getIconHighlighted

public function getIconHighlighted($width = 125, $height = 150, $stroke_width, $padding, LayoutDefinition $definition, string $highlight)

and refactor.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain fjmurillo

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024