Chain File setters

Created on 16 April 2019, about 5 years ago
Updated 24 January 2023, over 1 year ago

Problem/Motivation

The file setter functions do not return $this, and do not chain. This is inconsistent with many other objects.

Proposed resolution

Make the file setter functions chain, and use it in a few uncontroversial places to prove/test that they work.

Remaining tasks

Apply setter in more places, where it makes sense, and as that code is changed.

User interface changes

None

API changes

The File setter functions will return $this where they previously returned nothing. This is backwards compatible.

Data model changes

None

Release notes snippet

The File setter functions setFilename(), setFileUri(), setMimetype(), setSize(), setPermanent(), and setTemporary() now return $this and can be used in chained operations.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
File moduleΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States douggreen Winchester, VA

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    If we are going to make the change should make it for setSize() also. If there is no test then we should add to one.

    Taking for a change record for these changes.

Production build 0.69.0 2024