Missing Style and Weight Definition in font_display.schema.yml

Created on 15 October 2024, about 1 month ago

Problem/Motivation

The `font_display.schema.yml` file is missing the `style` and `weight` definitions. This omission leads to errors when attempting to install the module or create and display fonts during tests using PHPUnit and `KernelTestBase`. Specifically, the error is:

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for fontyourface.font_display.arial with the following errors: fontyourface.font_display.arial:style missing schema, fontyourface.font_display.arial:weight missing schema

Steps to Reproduce

  1. Attempt to install the module that includes the `font_display.schema.yml` configuration.
  2. Use PHPUnit with `KernelTestBase` to test the creation and display of a font.
  3. Observe the `SchemaIncompleteException` error indicating that `style` and `weight` definitions are missing.

Proposed Resolution

Add the missing `style` and `weight` definitions to the `font_display.schema.yml` file. The corrected schema file should include the following:

    style:
      type: string
      label: 'Style'
    weight:
      type: string
      label: 'Weight'

Remaining Tasks

  1. Update the `font_display.schema.yml` file to include the `style` and `weight` definitions.
  2. Re-run the installation process to ensure the module installs without errors.
  3. Execute PHPUnit tests to verify that font creation and display functionality work as expected.

User Interface Changes

There are no anticipated user interface changes due to this schema update.

API Changes

No API changes are expected. This update only involves adding missing schema definitions.

Data Model Changes

The data model will now include the `style` and `weight` attributes for font configurations. This change ensures that the schema is complete and prevents errors during installation and testing.

🐛 Bug report
Status

Active

Version

4.0

Component

Code (general)

Created by

🇧🇷Brazil opauwlo

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

Comments & Activities

Production build 0.71.5 2024