- Issue created by @raileanu.nalexandru
- Status changed to Closed: won't fix
over 1 year ago 2:56pm 8 January 2024 - πΊπ¦Ukraine t1mm1 Kiev
I got same problem..
It's not critical.
Added patch.
Maybe, will helps someone.
Some plugins incorrectly extend the SchemaNameBase "form()" function definition, by not declaring the "array" return type:
Fatal error: Declaration of Drupal\schema_recipe\Plugin\metatag\Tag\SchemaRecipeRecipeIngredient::form(array $element = []) must be compatible with Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::form(array $element = []): array in /var/www/html/docroot/modules/contrib/schema_metatag/schema_recipe/src/Plugin/metatag/Tag/SchemaRecipeRecipeIngredient.php on line 34
On a new/clean project:
Add the module to a project, enable and configure the recipe related schema - fatal error due to "recipeInstructions" and "recipeIngredient" fields plugin definition.
Update the "form()" function definition by adding the return type:
public function form(array $element = []) {
to
public function form(array $element = []): array {
Active
3.0
Code
I got same problem..
It's not critical.
Added patch.
Maybe, will helps someone.