Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

DOCUMENTATION for setFieldCasting

Open
#22 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
documentation

Research direction

Start with the linked src/Forms/GridField/GridFieldDataColumns.php lines 102-106 and compare the three setFieldCasting examples in the issue. Locate the corresponding setFieldCasting documentation in this developer-docs repository, clarify which syntax is supported, and document the correct form with an example.

Written by the indexing model from the issue text.

Description

affects/v4 complexity/low impact/low type/docs

Affected Version

SS4+

Description

It would be great to have a bit more detail for about setFieldCasting.

see: https://github.com/silverstripe/silverstripe-framework/blob/909723f8e709a5d1720d84739a80e6a9cfa14b17/src/Forms/GridField/GridFieldDataColumns.php#L102-L106

In particular, it is unclear which one we should use:


    'MyField' => DBDatetime::class.'->Nice', //OR

    'MyField' => 'Datetime->Nice', //OR

    'MyField' => 'DBDatetime->Nice'
Dominant language
No language data
Stars
7
Forks
75
Avg merge
1d 12h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from silverstripe/developer-docs

All issues in silverstripe/developer-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.