Skip to content

Add key to Versioned extension on Link model #390

Description

@mfendeksilverstripe

Module version(s) affected

4.2.3

Description

Currently, the Versioned extension is hard coded in the Link model which makes it impractical to configure.

private static array $extensions = [
    Versioned::class,
];

How to reproduce

Code snippet to check if Versioned extension is present.

echo Link::has_extension(Versioned::class) ? 'yes' : 'no' . PHP_EOL;

Possible Solution

Remove Versioned extension from the model.

Then either keep it like that or add it to a yaml config with a named key so it can be overridden. Depends on what the module default should be.

Additional Context

This module should not force versioned or non-versioned links, both should be supported.

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions