- Issue created by @bvoynick
- Merge request !33Issue #3464156: Module does not provide schema for media.source.svg β (Open) created by bvoynick
- Status changed to Needs review
4 months ago 6:00pm 27 July 2024
The module does not provide schema for media.source.svg. Because of this, media bundles that use the "svg" source do not pass strict config validation.
I'm not aware of scenarios where this produces a hard error in actual use. I ran into this in the context of writing a test for integration with this module:
<?php
declare(strict_types=1);
namespace Drupal\Tests\my_module\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\media\Traits\MediaTypeCreationTrait;
/**
* Produces a schema error.
*/
final class ReproduceSchemaErrorTest extends KernelTestBase {
use MediaTypeCreationTrait;
/**
* {@inheritdoc}
*/
protected static $modules = [
'field',
'file',
'image',
'media',
'svg_image_field',
'system',
'user',
];
public function testMediaTypeCreation(): void {
$this->createMediaType('svg', [
'id' => 'svg',
'label' => 'SVG',
]);
}
}
Add config schema for media.source.svg, modeled after the schema definitions in the core Media module.
Needs review
2.3
Code