Skip to content

Use constants in the names of the two fields that are currently readable or writable in file versioning #52088

@bdovaz

Description

@bdovaz

Is your feature request related to a problem? Please describe.

Currently the use of author or label fields is referenced without constants:

$this->versionManager->setMetadataValue($node, $node->getMTime(), 'author', $author);

$propFind->handle(self::VERSION_LABEL, fn () => $node->getMetadataValue('label'));

$propFind->handle(self::VERSION_AUTHOR, fn () => $node->getMetadataValue('author'));

$propPatch->handle(self::VERSION_LABEL, fn (string $label) => $node->setMetadataValue('label', $label));

Describe the solution you'd like

In my app I set by code through IVersionManager the label metadata value and I would like the reference to be more secure through that constant.

I can create a PR if you approve.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapenhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions