E530 feat: Add missing class properties to core entities by Levdbas · Pull Request #3198 · timber/timber · GitHub
[go: up one dir, main page]

Skip to content

feat: Add missing class properties to core entities#3198

Merged
Levdbas merged 5 commits into2.xfrom
add-properties
Feb 14, 2026
Merged

feat: Add missing class properties to core entities#3198
Levdbas merged 5 commits into2.xfrom
add-properties

Conversation

@Levdbas
Copy link
Member
@Levdbas Levdbas commented Feb 13, 2026

Related:

Issue

We have quite a few public properties that are missing on our Timber object.

Solution

I've added the missing public properties for Comments, Post, Site,Term, Menu, Menuitem and User

Impact

Better static analysis.

Usage Changes

No

Considerations

Any other Timber class that we need to do the same for?

Testing

no

@codecov
Copy link
codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (d6c4d61) to head (871a866).
⚠️ Report is 2 commits behind head on 2.x.

Additional details and impacted files
@@            Coverage Diff            @@
##                2.x    #3198   +/-   ##
=========================================
  Coverage     89.85%   89.85%           
  Complexity     1632     1632           
=========================================
  Files            57       57           
  Lines          5017     5017           
=========================================
  Hits           4508     4508           
  Misses          509      509           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

… MenuItem, Post, Site, Term, and User classes
Copy link
Member
@nlemoine nlemoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few tweaks to provide better accuracy on types. Otherwise, all good!

Thanks @Levdbas!

Levdbas and others added 2 commits February 13, 2026 12:49
Co-authored-by: Nicolas Lemoine <nico.lemoine@gmail.com>
Co-authored-by: Nicolas Lemoine <nico.lemoine@gmail.com>
@Levdbas Levdbas linked an issue Feb 13, 2026 that may be closed by this pull request
@gchtr gchtr changed the title feat: Add additional properties to Comment, Post, Site, and Term classes feat: Add missing class properties to core entities Feb 13, 2026
Copy link
Member
@gchtr gchtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for going through all the core entity classes.

Just an obvious hint for anyone reading: We don’t add PHP types yet, because we will handle that in a next major version of Timber, because it might mean introducing breaking changes. The properties together with the comments already provide enough type hinting in IDEs for the moment.

@Levdbas Levdbas requested a review from nlemoine February 13, 2026 13:27
@Levdbas Levdbas merged commit 389f0ed into 2.x Feb 14, 2026
17 of 19 checks passed
@Levdbas Levdbas deleted the add-properties branch February 14, 2026 09:54
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
7F10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timber isn't playing nicely with static analysers

3 participants

0